--- loncom/interface/Attic/lonspreadsheet.pm 2003/01/13 14:58:28 1.161 +++ loncom/interface/Attic/lonspreadsheet.pm 2003/01/13 21:52:11 1.162 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.161 2003/01/13 14:58:28 matthew Exp $ +# $Id: lonspreadsheet.pm,v 1.162 2003/01/13 21:52:11 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2417,12 +2417,18 @@ sub loadstudent{ my %formulas=&getformulas($sheet); $cachedassess=$sheet->{'uname'}.':'.$sheet->{'udom'}; # Get ALL the student preformance data - my @tmp = &Apache::lonnet::dump($sheet->{'cid'}, - $sheet->{'udom'}, - $sheet->{'uname'}, - undef); - if ($tmp[0] !~ /^error:/) { + my @tmp = &Apache::lonnet::dumpcurrent($sheet->{'cid'}, +# my @tmp = &Apache::lonnet::dump($sheet->{'cid'}, + $sheet->{'udom'}, + $sheet->{'uname'}, + undef); + if ((scalar @tmp > 0) && ($tmp[0] !~ /^error:/)) { %cachedstores = @tmp; +# &Apache::lonnet::logthis("-------------------------------------"); +# foreach (keys(%cachedstores)) { +# &Apache::lonnet::logthis("data for ".$_); +# } +# &Apache::lonnet::logthis("-------------------------------------"); } undef @tmp; # @@ -2551,12 +2557,18 @@ sub loadassessment { # # get data out of the dumped stores # - my $version=$cachedstores{'version:'.$symb}; - my $scope; - for ($scope=1;$scope<=$version;$scope++) { - foreach (split(/\:/,$cachedstores{$scope.':keys:'.$symb})) { - $returnhash{$_}=$cachedstores{$scope.':'.$symb.':'.$_}; - } +# my $version=$cachedstores{'version:'.$symb}; +# my $scope; +# for ($scope=1;$scope<=$version;$scope++) { +# foreach (split(/\:/,$cachedstores{$scope.':keys:'.$symb})) { +# $returnhash{$_}=$cachedstores{$scope.':'.$symb.':'.$_}; +# } +# } + if (exists($cachedstores{$symb})) { + %returnhash = %{$cachedstores{$symb}}; + } else { +# &Apache::lonnet::logthis("No data for ".$symb); + %returnhash = (); } } else { #