--- loncom/interface/statistics/lonstudentsubmissions.pm 2010/08/04 01:56:07 1.60 +++ loncom/interface/statistics/lonstudentsubmissions.pm 2011/11/18 21:08:22 1.64 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentsubmissions.pm,v 1.60 2010/08/04 01:56:07 raeburn Exp $ +# $Id: lonstudentsubmissions.pm,v 1.64 2011/11/18 21:08:22 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -30,6 +30,7 @@ use strict; use Apache::lonnet; use Apache::loncommon(); use Apache::lonhtmlcommon(); +use Apache::lonquickgrades(); use Apache::loncoursedata(); use Apache::lonstatistics; use Apache::lonlocal; @@ -61,6 +62,8 @@ sub BuildStudentSubmissionsPage { # &Apache::lonstatistics::PrepareClasslist(); # + $r->print( &Apache::lonhtmlcommon::breadcrumbs('Student Submission Reports')); + &Apache::lonquickgrades::startGradeScreen($r,'statistics'); $r->print(&CreateInterface()); # my @Students = @Apache::lonstatistics::Students; @@ -177,11 +180,28 @@ sub BuildStudentSubmissionsPage { &array_shuffle(\@Students); } # + + my $threshold = $env{'course.'.$env{'request.course.id'}.'.internal.anonsurvey_threshold'}; + if ($threshold eq '') { + my %domconfig = + &Apache::lonnet::get_dom('configuration',['coursedefaults'], + $env{'course.'.$env{'request.course.id'}.'.domain'}); + if (ref($domconfig{'coursedefaults'}) eq 'HASH') { + $threshold = $domconfig{'coursedefaults'}{'anonsurvey_threshold'}; + if ($threshold eq '') { + $threshold = 10; + } + } else { + $threshold = 10; + } + } $r->print('
'. - &mt('Computing correct answers greatly increasese the amount of time required to prepare a report.'). + &mt('Computing correct answers greatly increases the amount of time required to prepare a report.'). '
'); $r->print(''.
&mt('Please select problems and use the [_1]Prepare Report[_2] button to continue.','','').
@@ -877,16 +897,6 @@ sub prepare_excel_output {
last if ($c->aborted());
$cols_output = 0;
my $student_row = $max_row;
- foreach my $field (@StudentColumns) {
- if ($show_named) {
- $worksheet->write($student_row,$cols_output++,
- $student->{$field});
- } else {
- $worksheet->write($student_row,$cols_output++,
- &mt('Anonymized'));
- }
- }
- my $last_student_col = $cols_output-1;
foreach my $prob (@$Problems) {
my $symb = $prob->symb();
foreach my $partid (@{$prob->parts}) {
@@ -941,8 +951,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) {
@@ -1266,7 +1276,6 @@ sub CreateInterface {
##
## Environment variable initialization
my $Str = '';
- $Str .= &Apache::lonhtmlcommon::breadcrumbs('Student Submission Reports');
$Str .= '
';
$Str .= &Apache::loncommon::start_data_table();
$Str .= &Apache::loncommon::start_data_table_header_row();