--- loncom/interface/Attic/lonspreadsheet.pm 2002/11/19 22:36:09 1.143 +++ loncom/interface/Attic/lonspreadsheet.pm 2002/11/20 16:46:31 1.144 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.143 2002/11/19 22:36:09 matthew Exp $ +# $Id: lonspreadsheet.pm,v 1.144 2002/11/20 16:46:31 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2651,7 +2651,11 @@ sub loadrows { sub checkthis { my ($keyname,$time)=@_; - return ($time<$expiredates{$keyname}); + if (! exists($expiredates{$keyname})) { + return 0; + } else { + return ($time<$expiredates{$keyname}); + } } sub forcedrecalc { @@ -2779,17 +2783,19 @@ sub exportsheet { # # Store away the new value # + my $timekey = $key.'.time'; if ($stype eq 'studentcalc') { - &Apache::lonnet::put('nohist_calculatedsheets', - { $key => $newstore, - $key.time => $now }, - $sheet->{'cdom'},$sheet->{'cnum'}); - } else { - &Apache::lonnet::put('nohist_calculatedsheets_'.$sheet->{'cid'}, - { $key => $newstore, - $key.time => $now }, - $sheet->{'udom'}, - $sheet->{'uname'}) + my $result = &Apache::lonnet::put('nohist_calculatedsheets', + { $key => $newstore, + $timekey => $now }, + $sheet->{'cdom'}, + $sheet->{'cnum'}); + } else { + my $result = &Apache::lonnet::put('nohist_calculatedsheets_'.$sheet->{'cid'}, + { $key => $newstore, + $timekey => $now }, + $sheet->{'udom'}, + $sheet->{'uname'}); } return @exportarr; }