Diff for /loncom/interface/Attic/lonspreadsheet.pm between versions 1.173 and 1.177

version 1.173, 2003/03/03 22:00:03 version 1.177, 2003/03/11 15:00:47
Line 183  sub handler { Line 183  sub handler {
     # Header....      # Header....
     #      #
     $r->print('<html><head><title>LON-CAPA Spreadsheet</title>');      $r->print('<html><head><title>LON-CAPA Spreadsheet</title>');
     my $nothing = "''";      my $nothing = &Apache::lonhtmlcommon::javascript_nothing();
     if ($ENV{'browser.type'} eq 'explorer') {  
         $nothing = "'javascript:void(0);'";  
     }  
   
     if ($ENV{'request.role'} !~ /^st\./) {      if ($ENV{'request.role'} !~ /^st\./) {
         $r->print(<<ENDSCRIPT);          $r->print(<<ENDSCRIPT);
Line 722  sub parmval { Line 719  sub parmval {
     # second, check map parms      # second, check map parms
     my $thisparm = $parmhash{$symbparm};      my $thisparm = $parmhash{$symbparm};
     return $thisparm if (defined($thisparm));      return $thisparm if (defined($thisparm));
   
     # first, check default      # first, check default
     return &Apache::lonnet::metadata($fn,$rwhat.'.default');      $thisparm = &Apache::lonnet::metadata($fn,$rwhat.'.default');
       return $thisparm if (defined($thisparm));
   
       #Cascade Up
       my $space=$what;
       $space=~s/\.\w+$//;
       if ($space ne '0') {
    my @parts=split(/_/,$space);
    my $id=pop(@parts);
    my $part=join('_',@parts);
    if ($part eq '') { $part='0'; }
    my $newwhat=$rwhat;
    $newwhat=~s/\Q$space\E/$part/;
    my $partgeneral=&parmval($newwhat,$symb,$uname,$udom,$csec);
    if (defined($partgeneral)) { return $partgeneral; }
       }
   
       #nothing defined
       return '';
 }  }
   
 #  #
Line 1507  sub expandnamed { Line 1523  sub expandnamed {
  foreach my $varname ( @vars ) {   foreach my $varname ( @vars ) {
             if ($varname=~/\D/) {              if ($varname=~/\D/) {
                $formula=~s/$varname/'$c{\''.$varname.'\'}'/ge;                 $formula=~s/$varname/'$c{\''.$varname.'\'}'/ge;
                $varname=~s/$var/\(\\w\+\)/g;                 $varname=~s/$var/\([\\w:\\- ]\+\)/g;
        foreach (keys(%{$self->{'constants'}})) {         foreach (keys(%{$self->{'constants'}})) {
   if ($_=~/$varname/) {    if ($_=~/$varname/) {
       $values{$1}=1;        $values{$1}=1;

Removed from v.1.173  
changed lines
  Added in v.1.177


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