--- loncom/interface/spreadsheet/studentcalc.pm 2003/05/16 20:55:11 1.1 +++ loncom/interface/spreadsheet/studentcalc.pm 2003/05/19 15:48:18 1.3 @@ -1,5 +1,5 @@ # -# $Id: studentcalc.pm,v 1.1 2003/05/16 20:55:11 matthew Exp $ +# $Id: studentcalc.pm,v 1.3 2003/05/19 15:48:18 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -48,9 +48,11 @@ package Apache::studentcalc; use strict; use Apache::Constants qw(:common :http); use Apache::lonnet; +use Apache::loncommon(); +use Apache::loncoursedata(); use Apache::lonnavmaps; -use Apache::Spreadsheet; -use Apache::assesscalc; +use Apache::Spreadsheet(); +use Apache::assesscalc(); use HTML::Entities(); use Spreadsheet::WriteExcel; use Time::HiRes; @@ -76,7 +78,7 @@ sub initialize_sequence_cache { &Apache::loncoursedata::get_sequence_assessment_data(); if (! defined($top) || ! ref($top)) { # There has been an error, better report it - &Apache::lonnet::logthis('top is undefined'); + &Apache::lonnet::logthis('top is undefined (studentcalc.pm)'); return; } @Sequences = @{$sequences} if (ref($sequences) eq 'ARRAY'); @@ -90,8 +92,22 @@ sub clear_package { sub get_title { my $self = shift; my $title = ''; - $title .= '
Student | @@ -151,6 +170,7 @@ END # # Prepare to output rows $tableheader =<<"END"; +
---|
Row | Assessment | END @@ -176,22 +196,31 @@ END next if ($resource->{'type'} ne 'assessment'); my $rownum = $self->get_row_number_from_key($resource->{'symb'}); my $assess_filename = $self->{'row_source'}->{$rownum}; - my $row_output = '|
---|---|---|
'.$rownum.' | '; - $row_output .= ''. - ''. - $resource->{'title'}.''; - $row_output .= &assess_file_selector($rownum, - $assess_filename, - \@AssessFileNames); - $row_output .= ' | '.$self->html_row($num_uneditable,$rownum). + my $row_output = '|
'.$rownum.' | '; + $row_output .= ''.
+ ''.
+ $resource->{'title'}.' '; + $row_output .= &assess_file_selector($rownum, + $assess_filename, + \@AssessFileNames). + ' | ';
+ } else {
+ $row_output .= '\n"; $r->print($row_output); } $r->print(" |