--- loncom/interface/statistics/lonstudentsubmissions.pm 2010/09/11 19:08:22 1.54.10.1 +++ loncom/interface/statistics/lonstudentsubmissions.pm 2011/11/18 22:20:20 1.54.10.3 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentsubmissions.pm,v 1.54.10.1 2010/09/11 19:08:22 raeburn Exp $ +# $Id: lonstudentsubmissions.pm,v 1.54.10.3 2011/11/18 22:20:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -143,7 +143,7 @@ sub BuildStudentSubmissionsPage { if (! scalar(@Problems) || ! defined($Problems[0])) { $r->print('resource is undefined'); } elsif (!$show_named && @Students < $threshold) { - $r->print(&mt('The number of students matching the selection criteria is too few for display of submission data for anonymous surveys.').'<br />'.&mt('There must be at least [quant,_1,student].',$threshold).' '.&mt('Contact a Domain Coordinator if you need the threshold to be changed for this course.')); + $r->print(&mt('The number of students matching the selection criteria is too few for display of submission data for anonymous surveys.').'<br />'.&mt('There must be at least [quant,_1,student].',$threshold).' '.&mt('Contact the LON-CAPA [_1]Helpdesk[_2] if you need the threshold to be changed for this course.','<a href="/adm/helpdesk?origurl=%2fadm%2fstatistics>','</a>')); } else { if (scalar(@Problems) == 1) { my $resource = $Problems[0]; @@ -774,10 +774,6 @@ sub prepare_excel_output { $worksheet->write($header_row,$cols_output++,ucfirst($_), $format->{'bold'}); } - foreach (@StudentColumns) { - $worksheet->write($header_row,$cols_output++,ucfirst($_), - $format->{'bold'}); - } # Problem headers my %start_col; foreach my $prob (@$Problems) { @@ -823,16 +819,6 @@ sub prepare_excel_output { my $anonid = &Crypt::PasswdMD5::unix_md5_crypt($student->{'username'}, $salt); $anonid = substr($anonid,length($salt)+1); - foreach my $field (@StudentColumns) { - if ($show_named) { - $worksheet->write($student_row,$cols_output++, - $student->{$field}); - } else { - $worksheet->write($student_row,$cols_output++, - $anonid); - } - } - my $last_student_col = $cols_output-1; foreach my $prob (@$Problems) { foreach my $partid (@{$prob->parts}) { my @Response = $prob->responseIds($partid); @@ -881,8 +867,8 @@ sub prepare_excel_output { } } } - # Fill in the remaining rows with the students data - for (my $row = $student_row+1;$row<$max_row;$row++) { + # Prepend current student's user information to all rows + for (my $row = $student_row;$row<$max_row;$row++) { my $cols = 0; foreach my $field (@StudentColumns) { if ($show_named) {