--- loncom/interface/spreadsheet/studentcalc.pm 2003/05/16 20:55:11 1.1 +++ loncom/interface/spreadsheet/studentcalc.pm 2003/05/19 14:34:54 1.2 @@ -1,5 +1,5 @@ # -# $Id: studentcalc.pm,v 1.1 2003/05/16 20:55:11 matthew Exp $ +# $Id: studentcalc.pm,v 1.2 2003/05/19 14:34:54 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -76,7 +76,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'); @@ -111,12 +111,15 @@ sub outsheet_html { # Get the list of assessment files # #################################### my @AssessFileNames = $self->othersheets('assesscalc'); + my $editing_is_allowed = &Apache::lonnet::allowed('mgr', + $ENV{'request.course.id'}); #################################### # Determine table structure # #################################### my $num_uneditable = 26; my $num_left = 52-$num_uneditable; my $tableheader =<<"END"; +
Student | @@ -151,6 +154,7 @@ END # # Prepare to output rows $tableheader =<<"END"; +
---|
Row | Assessment | END @@ -176,22 +180,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(" |