--- loncom/interface/statistics/lonstudentsubmissions.pm 2012/03/20 17:52:23 1.67 +++ loncom/interface/statistics/lonstudentsubmissions.pm 2012/05/03 11:21:33 1.68 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentsubmissions.pm,v 1.67 2012/03/20 17:52:23 bisitz Exp $ +# $Id: lonstudentsubmissions.pm,v 1.68 2012/05/03 11:21:33 goltermann Exp $ # # Copyright Michigan State University Board of Trustees # @@ -196,9 +196,9 @@ sub BuildStudentSubmissionsPage { $threshold = 10; } } - $r->print('

'. + $r->print('

'. &Apache::lonstatistics::section_and_enrollment_description(). - '

'); + '

'); if (! scalar(@Problems) || ! defined($Problems[0])) { $r->print(&mt('resource is undefined')); } elsif (!$show_named && @Students < $threshold) { @@ -414,7 +414,8 @@ sub prepare_html_output { qq{\ }. $headers{'response'}; } - my $full_header = $/.''.$/; + #my $full_header = $/.'
'.$/; + my $full_header = $/.&Apache::loncommon::start_data_table().$/; $full_header .= ''.$headers{'problem'}.''.$/; if ($nonempty_part_headers) { $full_header .= ''.$headers{'part'}.''.$/; @@ -425,11 +426,10 @@ sub prepare_html_output { # Main loop my $count; $r->print($/.$full_header.$/); - my $row_class = 'odd'; # css foreach my $student (@$students) { my $student_row_data; if ($count++ >= 30) { - $r->print('
'.$/.$full_header.$/); + $r->print(&Apache::loncommon::end_data_table().$/.$full_header.$/); $count = 0; } last if ($c->aborted()); @@ -527,11 +527,6 @@ sub prepare_html_output { next if (! $maxrow && ! scalar(@essays)); # # Go through the problem data and output a row. - if ($row_class eq 'even') { - $row_class = 'odd'; - } else { - $row_class = 'even'; - } my $printed_something; for (my $rows_output = 0;$rows_output<$maxrow;$rows_output++) { my $html; @@ -555,22 +550,23 @@ sub prepare_html_output { } } if (! $no_data) { - $r->print(qq{$student_row_data$html}.$/); + $r->print(&Apache::loncommon::start_data_table_row().$student_row_data.$html. + &Apache::loncommon::end_data_table_row().$/); $printed_something=1; } } if (@essays) { - my $tr = qq{}; + my $tr = &Apache::loncommon::start_data_table_row(); my $td = qq{}; if (! $printed_something) { - $r->print($tr.$student_row_data.''.$/); + $r->print($tr.$student_row_data.&Apache::loncommon::end_data_table_row().$/); } $r->print($tr.$td. join(''.$/.$tr.$td,@essays).''.$/); undef(@essays); } } # end of student loop - $r->print(''.$/); + $r->print(&Apache::loncommon::end_data_table().$/); return; } @@ -787,9 +783,9 @@ sub prepare_excel_output { $lastprob = $prob; } if ($columncount > 255) { - $r->print('

'.&mt('Unable to complete request').'

'.$/. - '

'.&mt('LON-CAPA is unable to produce your Excel spreadsheet because your selections will result in more than 255 columns. Excel allows only 255 columns in a spreadsheet.').'

'.$/. - '

'.&mt('Consider selecting fewer problems to generate reports on, or reducing the number of items per problem. Or use HTML or CSV output.').'

'.$/); + $r->print('

'.&mt('Unable to complete request').'

'.$/. + '

'.&mt('LON-CAPA is unable to produce your Excel spreadsheet because your selections will result in more than 255 columns. Excel allows only 255 columns in a spreadsheet.').'

'.$/. + '

'.&mt('Consider selecting fewer problems to generate reports on, or reducing the number of items per problem. Or use HTML or CSV output.').'

'.$/); if (ref($lastprob)) { $r->print('

'.&mt('The last problem that will fit in the current spreadsheet is [_1].',$lastprob->compTitle).'

'); } @@ -799,14 +795,14 @@ sub prepare_excel_output { # # Print out a message telling them what we are doing if (scalar(@$Problems) > 1) { - $r->print('

'. + $r->print('

'. &mt('Preparing Excel spreadsheet of student responses to [_1] problems', scalar(@$Problems)). - '

'); + '

'); } else { - $r->print('

'. + $r->print('

'. &mt('Preparing Excel spreadsheet of student responses'). - '

'); + '

'); } $r->rflush(); # @@ -1071,8 +1067,8 @@ sub prepare_csv_output { my ($r,$problems,$students,$anoncounter,$show_named) = @_; my $c = $r->connection(); # - $r->print('

'. - &mt('Generating CSV report of student responses').'

'); + $r->print('

'. + &mt('Generating CSV report of student responses').'

'); # # Progress window my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,scalar(@$students));