--- loncom/interface/Attic/lonspreadsheet.pm 2002/12/09 21:11:12 1.158 +++ loncom/interface/Attic/lonspreadsheet.pm 2003/01/15 19:34:03 1.163 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.158 2002/12/09 21:11:12 matthew Exp $ +# $Id: lonspreadsheet.pm,v 1.163 2003/01/15 19:34:03 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2391,7 +2391,7 @@ sub updatestudentassesssheet { unless ((exists($sheet->{'rowlabel'}->{$usy}) && (defined($sheet->{'rowlabel'}->{$usy})) || (!$1) || ($formula =~ /^(~~~|---)/) )) { - $f{$_}='!!! Obsolete'; + $f{$cell}='!!! Obsolete'; $changed=1; } } @@ -2417,11 +2417,10 @@ 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::currentdump($sheet->{'cid'}, + $sheet->{'udom'}, + $sheet->{'uname'}); + if ((scalar @tmp > 0) && ($tmp[0] !~ /^error:/)) { %cachedstores = @tmp; } undef @tmp; @@ -2551,23 +2550,16 @@ 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.':'.$_}; - } + if (exists($cachedstores{$symb})) { + %returnhash = %{$cachedstores{$symb}}; + } else { + %returnhash = (); } } else { # # restore individual # %returnhash = &Apache::lonnet::restore($symb,$namespace,$udom,$uname); - for (my $version=1;$version<=$returnhash{'version'};$version++) { - foreach (split(/\:/,$returnhash{$version.':keys'})) { - $returnhash{$_}=$returnhash{$version.':'.$_}; - } - } } # # returnhash now has all stores for this resource @@ -2915,7 +2907,8 @@ sub cachedssheets { $uname = $uname || $sheet->{'uname'}; $udom = $udom || $sheet->{'udom'}; if (! $loadedcaches{$uname.'_'.$udom}) { - my @tmp = &Apache::lonnet::dump('nohist_calculatedsheets', + my @tmp = &Apache::lonnet::dump('nohist_calculatedsheets_'. + $ENV{'request.course.id'}, $sheet->{'udom'}, $sheet->{'uname'}); if ($tmp[0] !~ /^error/) {