--- loncom/interface/statistics/lonstudentsubmissions.pm 2009/04/21 13:28:23 1.54
+++ loncom/interface/statistics/lonstudentsubmissions.pm 2010/03/26 13:25:17 1.57
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentsubmissions.pm,v 1.54 2009/04/21 13:28:23 bisitz Exp $
+# $Id: lonstudentsubmissions.pm,v 1.57 2010/03/26 13:25:17 onken Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -225,7 +225,12 @@ sub prepare_html_output {
my @extra_resp_headers = &get_extra_response_headers();
#
# Create the table header
- my @student_columns = ('username','domain','id','section');
+ my @student_columns = @Apache::lonstatistics::SelectedStudentData;
+ foreach (@student_columns) {
+ if($_ eq 'all') {
+ @student_columns = ('fullname','username','domain','id','section','status','groups','comments');
+ }
+ }
#
my %headers;
my $student_column_count = scalar(@student_columns);
@@ -326,8 +331,16 @@ sub prepare_html_output {
}
last if ($c->aborted());
foreach my $field (@student_columns) {
- $student_row_data .=
- '
'.$student->{$field}.' ';
+ $student_row_data .= '';
+ # handle comments like in lonstudentassessment.pm
+ if($field eq 'comments') {
+ $student_row_data .=
+ ''.&mt('Comments').' ';
+ } else {
+ $student_row_data .= $student->{$field};
+ }
+ $student_row_data .= ' ';
}
#
# Figure out what it is we need to output for this student
@@ -931,11 +944,13 @@ sub prepare_csv_output {
time.'_'.rand(1000000000).'.csv';
unless ($outputfile = Apache::File->new('>/home/httpd'.$filename)) {
$r->log_error("Couldn't open $filename for output $!");
- $r->print(''
- .&mt('Problems occurred in writing the CSV file. '
- .'This error has been logged. '
- .'Please alert your LON-CAPA administrator.')
- .'
');
+ $r->print(
+ ''
+ .&mt('Problems occurred in writing the CSV file.')
+ .' '.&mt('This error has been logged.')
+ .' '.&mt('Please alert your LON-CAPA administrator.')
+ .'
'
+ );
$outputfile = undef;
}
#
@@ -1095,6 +1110,7 @@ sub CreateInterface {
$Str .= &Apache::loncommon::start_data_table_header_row();
$Str .= ''.&mt('Sections').' ';
$Str .= ''.&mt('Groups').' ';
+ $Str .= ''.&mt('Student Data').&Apache::loncommon::help_open_topic("Chart_Student_Data").' ';
$Str .= ''.&mt('Access Status').' ';
$Str .= ''.&mt('Options').' ';
$Str .= ''.&mt('Output Format').' ';
@@ -1109,6 +1125,10 @@ sub CreateInterface {
$Str .= &Apache::lonstatistics::GroupSelect('Group','multiple',5);
$Str .= '';
#
+ $Str .= ''."\n";
+ $Str .= &Apache::lonstatistics::StudentDataSelect('StudentData','multiple', 5,undef);
+ $Str .= ' ';
+ #
$Str .= '';
$Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);
$Str .= ' ';
@@ -1143,18 +1163,21 @@ sub CreateInterface {
}
$prob_status_checkbox .= 'value="true" />';
#
- $Str .= ''.
- ''.
- &mt('Show problem').' '.$prob_checkbox.' '.
- ''.
- &mt('Show correct answers').' '.$ans_checkbox.' '.
- ''.
- &mt('Show all submissions').' '.$all_sub_checkbox.
- ' '.
- ''.
- &mt('Show problem grading').' '.$prob_status_checkbox.
- ' '.
- ' ';
+ $Str .=
+ ''
+ .''
+ .$prob_checkbox.&mt('Show problem')
+ .' '
+ .''
+ .' '.$ans_checkbox.&mt('Show correct answers')
+ .' '
+ .''
+ .$all_sub_checkbox.&mt('Show all submissions')
+ .' '
+ .''
+ .$prob_status_checkbox.&mt('Show problem grading')
+ .' '
+ .' ';
#
$Str .= ''.$output_selector.' ';
#