--- loncom/interface/spreadsheet/studentcalc.pm 2003/05/29 18:31:27 1.9 +++ loncom/interface/spreadsheet/studentcalc.pm 2003/07/16 20:30:36 1.15 @@ -1,5 +1,5 @@ # -# $Id: studentcalc.pm,v 1.9 2003/05/29 18:31:27 matthew Exp $ +# $Id: studentcalc.pm,v 1.15 2003/07/16 20:30:36 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -65,6 +65,7 @@ my %Exportrows = (); my $current_course; sub initialize { + &Apache::assesscalc::initialize(); &initialize_sequence_cache(); } @@ -143,9 +144,29 @@ sub parent_link { return $link; } +sub convenience_links { + my $self = shift; + my ($resource) = @_; + my $symb = &Apache::lonnet::escape($resource->{'symb'}); + my $result = <<"END"; + + + + + + + + + +END + return $result; +} + sub outsheet_html { my $self = shift; my ($r) = @_; + my $importcolor = '#FFFFAA'; + my $exportcolor = '#88FF88'; #################################### # Get the list of assessment files # #################################### @@ -162,7 +183,7 @@ sub outsheet_html { - @@ -171,7 +192,7 @@ END my $label_num = 0; foreach (split(//,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')){ if ($label_num<$num_uneditable) { - $tableheader .=''. - $self->html_template_row($num_uneditable)."\n"); + $self->html_template_row($num_uneditable, + $importcolor)."\n"); } # # Print out summary/export row $r->print(''. - $self->html_export_row()."\n"); + $self->html_export_row($exportcolor)."\n"); } $r->print("
Student + Import Calculations'; + $tableheader .=''; } else { $tableheader .=''; } @@ -190,12 +211,13 @@ END # Print out template row if (exists($ENV{'request.role.adv'}) && $ENV{'request.role.adv'}) { $r->print('
Template 
Summary0
\n"); # @@ -204,7 +226,7 @@ END $tableheader =<<"END";

- + END } else { $tableheader =<<"END"; @@ -238,6 +260,7 @@ END my $row_output = ''; if ($editing_is_allowed) { $row_output .= ''; + $row_output .= ''; $row_output .= ''."\n"; } else { - $row_output .= $self->html_row($num_uneditable,$rownum). + $row_output .= $self->html_row($num_uneditable,$rownum, + $exportcolor,$importcolor). "\n"; } $r->print($row_output); @@ -332,7 +356,7 @@ sub csv_rows { # # Write a header row $self->csv_output_row($filehandle,undef, - ('Container','Assessment title')); + ('Sequence or Folder','Assessment title')); # # Write each assessments row if (scalar(@Sequences)< 1) { @@ -591,6 +615,8 @@ sub export_data { my $self = shift; my $student = $self->{'name'}.':'.$self->{'domain'}; if (! exists($Exportrows{$student}) || + ! defined($Exportrows{$student}) || + ! defined($Exportrows{$student}->{'data'}) || ! $self->check_expiration_time($Exportrows{$student}->{'time'})) { $self->compute(); }
RowAssessment
Row Assessment
'.$rownum.''.$self->convenience_links($resource).''. 'Unavailable at this time