Diff for /loncom/interface/Attic/lonspreadsheet.pm between versions 1.95 and 1.96

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

Removed from v.1.95  
changed lines
  Added in v.1.96


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>