version 1.60, 2010/08/04 01:56:07
|
version 1.63, 2011/09/19 04:02:20
|
Line 30 use strict;
|
Line 30 use strict;
|
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonhtmlcommon(); |
use Apache::lonhtmlcommon(); |
|
use Apache::lonquickgrades(); |
use Apache::loncoursedata(); |
use Apache::loncoursedata(); |
use Apache::lonstatistics; |
use Apache::lonstatistics; |
use Apache::lonlocal; |
use Apache::lonlocal; |
Line 61 sub BuildStudentSubmissionsPage {
|
Line 62 sub BuildStudentSubmissionsPage {
|
# |
# |
&Apache::lonstatistics::PrepareClasslist(); |
&Apache::lonstatistics::PrepareClasslist(); |
# |
# |
|
$r->print( &Apache::lonhtmlcommon::breadcrumbs('Student Submission Reports')); |
|
&Apache::lonquickgrades::startGradeScreen($r,'statistics'); |
$r->print(&CreateInterface()); |
$r->print(&CreateInterface()); |
# |
# |
my @Students = @Apache::lonstatistics::Students; |
my @Students = @Apache::lonstatistics::Students; |
Line 177 sub BuildStudentSubmissionsPage {
|
Line 180 sub BuildStudentSubmissionsPage {
|
&array_shuffle(\@Students); |
&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('<h4>'. |
$r->print('<h4>'. |
&Apache::lonstatistics::section_and_enrollment_description(). |
&Apache::lonstatistics::section_and_enrollment_description(). |
'</h4>'); |
'</h4>'); |
if (! scalar(@Problems) || ! defined($Problems[0])) { |
if (! scalar(@Problems) || ! defined($Problems[0])) { |
$r->print('resource is undefined'); |
$r->print(&mt('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.')); |
} else { |
} else { |
if (scalar(@Problems) == 1) { |
if (scalar(@Problems) == 1) { |
my $resource = $Problems[0]; |
my $resource = $Problems[0]; |
Line 206 sub BuildStudentSubmissionsPage {
|
Line 226 sub BuildStudentSubmissionsPage {
|
&mt('Prepare Report').'" />'); |
&mt('Prepare Report').'" />'); |
$r->print(' 'x5); |
$r->print(' 'x5); |
$r->print('<p>'. |
$r->print('<p>'. |
&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.'). |
'</p>'); |
'</p>'); |
$r->print('<p>'. |
$r->print('<p>'. |
&mt('Please select problems and use the [_1]Prepare Report[_2] button to continue.','<b>','</b>'). |
&mt('Please select problems and use the [_1]Prepare Report[_2] button to continue.','<b>','</b>'). |
Line 878 sub prepare_excel_output {
|
Line 898 sub prepare_excel_output {
|
$cols_output = 0; |
$cols_output = 0; |
my $student_row = $max_row; |
my $student_row = $max_row; |
foreach my $field (@StudentColumns) { |
foreach my $field (@StudentColumns) { |
if ($show_named) { |
$cols_output ++; |
$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) { |
foreach my $prob (@$Problems) { |
my $symb = $prob->symb(); |
my $symb = $prob->symb(); |
foreach my $partid (@{$prob->parts}) { |
foreach my $partid (@{$prob->parts}) { |
Line 941 sub prepare_excel_output {
|
Line 954 sub prepare_excel_output {
|
} |
} |
} |
} |
} |
} |
# Fill in the remaining rows with the students data |
# Prepend current student's user information to all rows |
for (my $row = $student_row+1;$row<$max_row;$row++) { |
for (my $row = $student_row;$row<$max_row;$row++) { |
my $cols = 0; |
my $cols = 0; |
foreach my $field (@StudentColumns) { |
foreach my $field (@StudentColumns) { |
if ($show_named) { |
if ($show_named) { |
Line 1266 sub CreateInterface {
|
Line 1279 sub CreateInterface {
|
## |
## |
## Environment variable initialization |
## Environment variable initialization |
my $Str = ''; |
my $Str = ''; |
$Str .= &Apache::lonhtmlcommon::breadcrumbs('Student Submission Reports'); |
|
$Str .= '<br />'; |
$Str .= '<br />'; |
$Str .= &Apache::loncommon::start_data_table(); |
$Str .= &Apache::loncommon::start_data_table(); |
$Str .= &Apache::loncommon::start_data_table_header_row(); |
$Str .= &Apache::loncommon::start_data_table_header_row(); |