version 1.54.10.3, 2011/11/18 22:20:20
|
version 1.54.10.4, 2011/11/18 22:35:33
|
Line 77 sub BuildStudentSubmissionsPage {
|
Line 77 sub BuildStudentSubmissionsPage {
|
'<div class="LC_info">'.&mt('Loading student data...').'</div>'); |
'<div class="LC_info">'.&mt('Loading student data...').'</div>'); |
$r->rflush(); |
$r->rflush(); |
# |
# |
if (exists($env{'form.problemchoice'}) && |
if ((exists($env{'form.problemchoice'}) || (exists($env{'form.allproblems'}))) && |
! exists($env{'form.SelectAnother'})) { |
! exists($env{'form.SelectAnother'})) { |
foreach my $button (@SubmitButtons) { |
foreach my $button (@SubmitButtons) { |
if ($button->{'name'} eq 'break') { |
if ($button->{'name'} eq 'break') { |
Line 95 sub BuildStudentSubmissionsPage {
|
Line 95 sub BuildStudentSubmissionsPage {
|
$r->print('<hr />'.$/); |
$r->print('<hr />'.$/); |
$r->rflush(); |
$r->rflush(); |
# |
# |
|
|
|
# |
|
# Get resource objects |
|
my $navmap = Apache::lonnavmaps::navmap->new(); |
|
|
# Determine which problems we are to analyze |
# Determine which problems we are to analyze |
my @Symbs = |
my @Symbs = |
&Apache::lonstathelpers::get_selected_symbs('problemchoice'); |
&Apache::lonstathelpers::get_selected_symbs('problemchoice'); |
|
if (defined($navmap)) { |
|
if ($env{'form.allproblems'}) { |
|
my $iterator = $navmap->getIterator(undef, undef, undef, 1); |
|
while (my $curRes = $iterator->next()) { |
|
next if (! ref($curRes)); |
|
if ($curRes->is_problem) { |
|
my $symb = $curRes->symb; |
|
unless(grep(/^\Q$symb\E$/,@Symbs)) { |
|
push(@Symbs,$symb); |
|
} |
|
} |
|
} |
|
} |
|
} |
foreach my $selected (@Symbs) { |
foreach my $selected (@Symbs) { |
$r->print('<input type="hidden" name="problemchoice" value="'. |
$r->print('<input type="hidden" name="problemchoice" value="'. |
$selected.'" />'.$/); |
$selected.'" />'.$/); |
} |
} |
# |
|
# Get resource objects |
|
my $navmap = Apache::lonnavmaps::navmap->new(); |
|
if (!defined($navmap)) { |
if (!defined($navmap)) { |
$r->print('<div class="LC_error">'.&mt("Internal error").'</div>'); |
$r->print('<div class="LC_error">'.&mt("Internal error").'</div>'); |
return; |
return; |
Line 112 sub BuildStudentSubmissionsPage {
|
Line 128 sub BuildStudentSubmissionsPage {
|
my %already_seen; |
my %already_seen; |
my (@Problems,$show_named); |
my (@Problems,$show_named); |
unless (&Apache::loncommon::needs_gci_custom()) { |
unless (&Apache::loncommon::needs_gci_custom()) { |
$show_named = 1; |
unless ($env{'form.anonymized'} eq 'true') { |
|
$show_named = 1; |
|
} |
} |
} |
foreach my $symb (@Symbs) { |
foreach my $symb (@Symbs) { |
my $resource = $navmap->getBySymb($symb); |
my $resource = $navmap->getBySymb($symb); |
Line 136 sub BuildStudentSubmissionsPage {
|
Line 154 sub BuildStudentSubmissionsPage {
|
$threshold = 10; |
$threshold = 10; |
} |
} |
} |
} |
|
unless (&Apache::loncommon::needs_gci_custom()) { |
|
$threshold = 0; |
|
} |
# |
# |
$r->print('<h4>'. |
$r->print('<h4>'. |
&Apache::lonstatistics::section_and_enrollment_description(). |
&Apache::lonstatistics::section_and_enrollment_description(). |
Line 341 sub prepare_html_output {
|
Line 362 sub prepare_html_output {
|
$prob_span += $part_span; |
$prob_span += $part_span; |
} |
} |
my $title = $prob->compTitle; |
my $title = $prob->compTitle; |
|
unless (&Apache::loncommon::needs_gci_custom()) { |
|
($title) = ($prob->src =~ m{/([^/]+)$}); |
|
} |
if ($prob_span > 0) { |
if ($prob_span > 0) { |
$headers{'problem'}.= qq{<th colspan="$prob_span">$title</th>}; |
$headers{'problem'}.= qq{<th colspan="$prob_span">$title</th>}; |
} elsif ($single_response) { |
} elsif ($single_response) { |
Line 778 sub prepare_excel_output {
|
Line 802 sub prepare_excel_output {
|
my %start_col; |
my %start_col; |
foreach my $prob (@$Problems) { |
foreach my $prob (@$Problems) { |
my $title = $prob->compTitle; |
my $title = $prob->compTitle; |
|
unless (&Apache::loncommon::needs_gci_custom()) { |
|
($title) = ($prob->src =~ m{/([^/]+)$}); |
|
} |
$worksheet->write($title_row,$cols_output, |
$worksheet->write($title_row,$cols_output, |
$title,$format->{'h3'}); |
$title,$format->{'h3'}); |
foreach my $partid (@{$prob->parts}) { |
foreach my $partid (@{$prob->parts}) { |
Line 867 sub prepare_excel_output {
|
Line 894 sub prepare_excel_output {
|
} |
} |
} |
} |
} |
} |
# Prepend current student's user information to all rows |
# Fill in the remaining rows with the students data |
for (my $row = $student_row;$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) { |
Line 1042 sub prepare_csv_output {
|
Line 1069 sub prepare_csv_output {
|
foreach my $prob (@$problems) { |
foreach my $prob (@$problems) { |
my %analysis = &Apache::lonstathelpers::get_problem_data($prob->src); |
my %analysis = &Apache::lonstathelpers::get_problem_data($prob->src); |
$problem_analysis{$prob->src}=\%analysis; |
$problem_analysis{$prob->src}=\%analysis; |
$headers{'problem'}->[$max_column] = $prob->compTitle; |
my $title = $prob->compTitle; |
|
unless (&Apache::loncommon::needs_gci_custom()) { |
|
($title) = ($prob->src =~ m{/([^/]+)$}); |
|
} |
|
$headers{'problem'}->[$max_column] = $title; |
foreach my $partid (@{$prob->parts}) { |
foreach my $partid (@{$prob->parts}) { |
$headers{'part'}->[$max_column] = $prob->part_display($partid); |
$headers{'part'}->[$max_column] = $prob->part_display($partid); |
my $responses = [$prob->responseIds($partid)]; |
my $responses = [$prob->responseIds($partid)]; |
Line 1234 sub CreateInterface {
|
Line 1265 sub CreateInterface {
|
$prob_status_checkbox .= 'checked="checked" '; |
$prob_status_checkbox .= 'checked="checked" '; |
} |
} |
$prob_status_checkbox .= 'value="true" />'; |
$prob_status_checkbox .= 'value="true" />'; |
# |
my $anon_checkbox; |
|
unless (&Apache::loncommon::needs_gci_custom()) { |
|
# |
|
# anonymized checkbox |
|
# |
|
$anon_checkbox = '<input type="checkbox" name="anonymized" '; |
|
if (exists($env{'form.anonymized'}) && |
|
$env{'form.anonymized'} eq 'true') { |
|
$anon_checkbox .= 'checked="checked" '; |
|
} |
|
$anon_checkbox .= ' value="true" />'; |
|
} |
|
|
$Str .= '<td align="right" valign="top">'. |
$Str .= '<td align="right" valign="top">'. |
'<label><b>'. |
'<label><b>'. |
&mt('Show problem').' '.$prob_checkbox.'</b></label><br />'. |
&mt('Show problem').' '.$prob_checkbox.'</b></label><br />'. |
Line 1245 sub CreateInterface {
|
Line 1288 sub CreateInterface {
|
'</b></label><br />'. |
'</b></label><br />'. |
'<label><b>'. |
'<label><b>'. |
&mt('Show problem grading').' '.$prob_status_checkbox. |
&mt('Show problem grading').' '.$prob_status_checkbox. |
'</b></label><br />'. |
'</b></label><br />'; |
'</td>'; |
|
|
unless (&Apache::loncommon::needs_gci_custom()) { |
|
$Str .= '<label><b>'. |
|
&mt('Anonymized').' '.$anon_checkbox. |
|
'</b></label><br />'; |
|
} |
|
$Str .= '</td>'; |
# |
# |
$Str .= '<td align="center" valign="top">'.$output_selector.'</td>'; |
$Str .= '<td align="center" valign="top">'.$output_selector.'</td>'; |
# |
# |