--- loncom/interface/spreadsheet/studentcalc.pm 2003/05/19 15:48:18 1.3 +++ loncom/interface/spreadsheet/studentcalc.pm 2003/05/22 21:16:35 1.4 @@ -1,5 +1,5 @@ # -# $Id: studentcalc.pm,v 1.3 2003/05/19 15:48:18 matthew Exp $ +# $Id: studentcalc.pm,v 1.4 2003/05/22 21:16:35 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -156,24 +156,40 @@ END $label_num++; } $tableheader .="\n"; - # - $r->print($tableheader); - # - # Print out template row - $r->print('Template '. - $self->html_template_row($num_uneditable)."\n"); - # - # Print out summary/export row - $r->print('Export0'. - $self->html_export_row()."\n"); + if ($self->blackout()) { + $r->print('

'. + 'Some computations are not available at this time.
'. + 'There are problems whose status you are allowed to view.'. + '

'."\n"); + } else { + $r->print($tableheader); + # + # Print out template row + if (exists($ENV{'request.role.adv'}) && $ENV{'request.role.adv'}) { + $r->print('Template '. + $self->html_template_row($num_uneditable)."\n"); + } + # + # Print out summary/export row + $r->print('Summary0'. + $self->html_export_row()."\n"); + } $r->print("\n"); # # Prepare to output rows - $tableheader =<<"END"; + if (exists($ENV{'request.role.adv'}) && $ENV{'request.role.adv'}) { + $tableheader =<<"END";

END + } else { + $tableheader =<<"END"; +

+

RowAssessment
+ +END + } foreach (split(//,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')){ if ($label_num<$num_uneditable) { $tableheader.=''; } else { $row_output .= ''; } - $row_output .= $self->html_row($num_uneditable,$rownum). - "\n"; + if ($self->blackout() && $self->{'blackout_rows'}->{$rownum}>0) { + $row_output .= + ''."\n"; + } else { + $row_output .= $self->html_row($num_uneditable,$rownum). + "\n"; + } $r->print($row_output); } $r->print("
 Assessment'; @@ -203,19 +219,25 @@ END ''. - $resource->{'title'}.'
'; + '&usymb='.&Apache::lonnet::escape($resource->{'symb'}). + '">'.$resource->{'title'}.'
'; $row_output .= &assess_file_selector($rownum, $assess_filename, \@AssessFileNames). '
Go To'; $row_output .= ''.$resource->{'title'}.'
Unavailable at this time
\n"); @@ -356,6 +378,10 @@ sub compute { $assess_filename, $resource->{'symb'}); my @exportdata = $assessSheet->export_data(); + if ($assessSheet->blackout()) { + $self->blackout(1); + $self->{'blackout_rows'}->{$rownum} = 1; + } # # Be sure not to disturb the formulas in the 'A' column my $data = shift(@exportdata);