Diff for /loncom/interface/Attic/lonspreadsheet.pm between versions 1.140 and 1.141

version 1.140, 2002/11/15 18:19:10 version 1.141, 2002/11/15 18:59:28
Line 1332  END Line 1332  END
     foreach my $rownum (@Rows) {      foreach my $rownum (@Rows) {
         my ($rowlabel,@rowdata) = &get_row($sheet,$rownum);          my ($rowlabel,@rowdata) = &get_row($sheet,$rownum);
         next if ($rowlabel =~ /^\s*$/);          next if ($rowlabel =~ /^\s*$/);
           next if (($sheet->{'sheettype'} eq 'assesscalc') && 
                    (! $ENV{'form.showall'})                &&
                    ($rowdata[0]->{'value'} =~ /^\s*$/));
           if ($sheet->{'sheettype'} =~ /^(studentcalc|classcalc)$/) {
               my $row_is_empty = 1;
               foreach my $cell (@rowdata) {
                   if ($cell->{'value'} !~  /^\s*$/) {
                       $row_is_empty = 0;
                       last;
                   }
               }
               next if $row_is_empty;
           }
         #          #
         my $defaultbg='#E0FF';          my $defaultbg='#E0FF';
         #          #
Line 1753  sub readsheet { Line 1766  sub readsheet {
             if ($fh=Apache::File->new($includedir.'/'.$dfn)) {              if ($fh=Apache::File->new($includedir.'/'.$dfn)) {
                 $sheetxml=join('',<$fh>);                  $sheetxml=join('',<$fh>);
             } else {              } else {
                 $sheetxml='<field row="0" col="A">"Error"</field>';                  # $sheetxml='<field row="0" col="A">"Error"</field>';
                   $sheetxml='<field row="0" col="A"></field>';
             }              }
             %f=%{&parse_sheet(\$sheetxml)};              %f=%{&parse_sheet(\$sheetxml)};
         } elsif($fn=~/\/*\.spreadsheet$/) {          } elsif($fn=~/\/*\.spreadsheet$/) {
Line 3115  ENDSCRIPT Line 3129  ENDSCRIPT
     # Write the modified worksheet      # Write the modified worksheet
     $r->print('<b>Current sheet:</b> '.$sheet->{'filename'}.'</p>');      $r->print('<b>Current sheet:</b> '.$sheet->{'filename'}.'</p>');
     &tmpwrite($sheet);      &tmpwrite($sheet);
     if ($sheet->{'sheettype'} eq 'studentcalc') {      if ($sheet->{'sheettype'} eq 'assesscalc') {
         $r->print('<p>Show rows with empty A column: ');          $r->print('<p>Show rows with empty A column: ');
     } else {      } else {
         $r->print('<p>Show empty rows: ');          $r->print('<p>Show empty rows: ');

Removed from v.1.140  
changed lines
  Added in v.1.141


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