--- loncom/interface/statistics/lonstudentsubmissions.pm 2005/02/23 19:41:27 1.35 +++ loncom/interface/statistics/lonstudentsubmissions.pm 2005/03/17 18:50:06 1.39 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentsubmissions.pm,v 1.35 2005/02/23 19:41:27 matthew Exp $ +# $Id: lonstudentsubmissions.pm,v 1.39 2005/03/17 18:50:06 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 @@ -658,7 +648,7 @@ sub prepare_excel_output { $worksheet->write($partid_row,0,'Part ID',$format->{'bold'}); $worksheet->write($respid_row,0,'Response ID',$format->{'bold'}); # Student headers - my @StudentColumns = ('username','domain','id'); + my @StudentColumns = ('username','domain','id','section'); foreach (@StudentColumns) { $worksheet->write($header_row,$cols_output++,ucfirst($_), $format->{'bold'}); @@ -902,7 +892,7 @@ sub prepare_csv_output { my @extra_resp_headers = &get_extra_response_headers(); # # Create the table header - my @student_columns = ('username','domain','id'); + my @student_columns = ('username','domain','id','section'); # my %headers; push(@{$headers{'student'}},@student_columns); @@ -1096,7 +1086,7 @@ sub CreateInterface { } $prob_status_checkbox .= 'value="true" />'; # - $Str .= '