Diff for /loncom/interface/Attic/lonspreadsheet.pm between versions 1.155 and 1.157

version 1.155, 2002/12/05 15:31:05 version 1.157, 2002/12/09 16:06:56
Line 1839  sub readsheet { Line 1839  sub readsheet {
             }              }
             %f=%{&parse_sheet(\$sheetxml)};              %f=%{&parse_sheet(\$sheetxml)};
         } else {          } else {
             my $sheet='';  
             my %tmphash = &Apache::lonnet::dump($fn,$cdom,$cnum);              my %tmphash = &Apache::lonnet::dump($fn,$cdom,$cnum);
             my ($tmp) = keys(%tmphash);              my ($tmp) = keys(%tmphash);
             unless ($tmp =~ /^(con_lost|error|no_such_host)/i) {              if ($tmp !~ /^(con_lost|error|no_such_host)/i) {
                 foreach (keys(%tmphash)) {                  foreach (keys(%tmphash)) {
                     $f{$_}=$tmphash{$_};                      $f{$_}=$tmphash{$_};
                 }                  }
               } else {
                   # Unable to grab the specified spreadsheet,
                   # so we get the default ones instead.
                   $fn = 'default_'.$stype;
                   $sheet->{'filename'} = $fn;
                   my $dfn = $fn;
                   $dfn =~ s/\_/\./g;
                   my $sheetxml;
                   if (my $fh=Apache::File->new($includedir.'/'.$dfn)) {
                       $sheetxml = join('',<$fh>);
                   } else {
                       $sheetxml='<field row="0" col="A">'.
                           '"Unable to load spreadsheet"</field>';
                   }
                   %f=%{&parse_sheet(\$sheetxml)};
             }              }
         }          }
         # Cache and set          # Cache and set
Line 3129  ENDSCRIPT Line 3143  ENDSCRIPT
     # If a new formula had been entered, go from work copy      # If a new formula had been entered, go from work copy
     if ($ENV{'form.unewfield'}) {      if ($ENV{'form.unewfield'}) {
         $r->print('<h2>Modified Workcopy</h2>');          $r->print('<h2>Modified Workcopy</h2>');
         $ENV{'form.unewformula'}=~s/\'/\"/g;          #$ENV{'form.unewformula'}=~s/\'/\"/g;
         $r->print('<p>Cell '.$ENV{'form.unewfield'}.' = <pre>');          $r->print('<p>Cell '.$ENV{'form.unewfield'}.' = <pre>');
         $r->print(&HTML::Entities::encode($ENV{'form.unewformula'}).          $r->print(&HTML::Entities::encode($ENV{'form.unewformula'}).
                   '</pre></p>');                    '</pre></p>');

Removed from v.1.155  
changed lines
  Added in v.1.157


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