--- loncom/interface/statistics/lonstudentsubmissions.pm 2005/02/03 00:25:01 1.33 +++ loncom/interface/statistics/lonstudentsubmissions.pm 2005/03/14 20:28:22 1.37 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentsubmissions.pm,v 1.33 2005/02/03 00:25:01 matthew Exp $ +# $Id: lonstudentsubmissions.pm,v 1.37 2005/03/14 20:28:22 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -110,6 +110,9 @@ sub BuildStudentSubmissionsPage { push(@Problems,$resource); } # + $r->print('
'.&mt("Unable to create new Excel file. ". - "This error has been logged. ". - "Please alert your LON-CAPA administrator"). - '
'); - return undef; - } - # - $workbook->set_tempdir('/home/httpd/perl/tmp'); - # - my $format = &Apache::loncommon::define_excel_formats($workbook); + my ($workbook,$filename,$format) = + &Apache::loncommon::create_workbook($r); + return if (! defined($workbook)); my $worksheet = $workbook->addworksheet('Student Submission Data'); # # Add headers to the worksheet @@ -756,14 +747,13 @@ sub prepare_excel_output { } } # Fill in the remaining rows with the students data - for (my $row = $student_row+1;$row<=$max_row;$row++) { + for (my $row = $student_row+1;$row<$max_row;$row++) { my $cols = 0; foreach my $field (@StudentColumns) { $worksheet->write($row,$cols++, $student->{$field}); } } - $rows_output++; &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state, 'last student'); }