--- loncom/interface/Attic/lonspreadsheet.pm 2002/11/15 18:19:10 1.140 +++ loncom/interface/Attic/lonspreadsheet.pm 2002/11/15 18:59:28 1.141 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.140 2002/11/15 18:19:10 matthew Exp $ +# $Id: lonspreadsheet.pm,v 1.141 2002/11/15 18:59:28 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1332,6 +1332,19 @@ END foreach my $rownum (@Rows) { my ($rowlabel,@rowdata) = &get_row($sheet,$rownum); 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'; # @@ -1753,7 +1766,8 @@ sub readsheet { if ($fh=Apache::File->new($includedir.'/'.$dfn)) { $sheetxml=join('',<$fh>); } else { - $sheetxml='"Error"'; + # $sheetxml='"Error"'; + $sheetxml=''; } %f=%{&parse_sheet(\$sheetxml)}; } elsif($fn=~/\/*\.spreadsheet$/) { @@ -3115,7 +3129,7 @@ ENDSCRIPT # Write the modified worksheet $r->print('Current sheet: '.$sheet->{'filename'}.'

'); &tmpwrite($sheet); - if ($sheet->{'sheettype'} eq 'studentcalc') { + if ($sheet->{'sheettype'} eq 'assesscalc') { $r->print('

Show rows with empty A column: '); } else { $r->print('

Show empty rows: ');