--- loncom/interface/Attic/lonspreadsheet.pm 2002/12/13 19:11:00 1.159 +++ loncom/interface/Attic/lonspreadsheet.pm 2003/01/13 21:52:11 1.162 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.159 2002/12/13 19:11:00 matthew Exp $ +# $Id: lonspreadsheet.pm,v 1.162 2003/01/13 21:52:11 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,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,23 +2557,24 @@ 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 { # # 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