--- loncom/interface/Attic/lonspreadsheet.pm 2002/07/05 01:31:25 1.95 +++ loncom/interface/Attic/lonspreadsheet.pm 2002/07/05 21:44:50 1.96 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.95 2002/07/05 01:31:25 www Exp $ +# $Id: lonspreadsheet.pm,v 1.96 2002/07/05 21:44:50 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -112,6 +112,7 @@ my %parmhash; my %starttimes; my %usedtimes; +my %numbertimes; # Stuff that only the screen handler can know @@ -129,6 +130,7 @@ sub initsheet { $safeeval->permit("sort"); $safeeval->deny(":base_io"); $safehole->wrap(\&Apache::lonnet::EXT,$safeeval,'&EXT'); + $safeeval->share('$@'); my $code=<<'ENDDEFS'; # ---------------------------------------------------- Inside of the safe space @@ -835,15 +837,14 @@ sub calc { &sett(); my $notfinished=1; my $depth=0; - my $errormsg; while ($notfinished) { $notfinished=0; foreach (keys(%t)) { my $old=$v{$_}; - $v{$_}=eval($t{$_}); + $v{$_}=eval $t{$_}; if ($@) { - $v{$_}='"error"'; - $errormsg.=$_.': '.$@."\n"; + undef %v; + return $_.': '.$@; } if ($v{$_} ne $old) { $notfinished=1; } } @@ -853,7 +854,7 @@ sub calc { return 'Maximum calculation depth exceeded'; } } - return $errormsg; + return ''; } sub templaterow {