version 1.12, 2004/06/25 20:43:33
|
version 1.13, 2004/08/31 15:22:51
|
Line 162 sub prepare_excel_output {
|
Line 162 sub prepare_excel_output {
|
&mt('See the status bar above for student answer computation progress'). |
&mt('See the status bar above for student answer computation progress'). |
'</p>'); |
'</p>'); |
# |
# |
&Apache::lonstathelpers::GetStudentAnswers($r,$problem,$Students, |
if ($ENV{'form.correctans'} eq 'true') { |
'Statistics','stats_status'); |
&Apache::lonstathelpers::GetStudentAnswers($r,$problem,$Students, |
|
'Statistics', |
|
'stats_status'); |
|
} |
# |
# |
$r->print('<script>'. |
$r->print('<script>'. |
'window.document.Statistics.stats_status.value="'. |
'window.document.Statistics.stats_status.value="'. |
'Done computing student answers. Compiling spreadsheet.'. |
'Done computing student answers. Compiling spreadsheet.'. |
'";</script>'); |
'";</script>'); |
$r->rflush(); |
$r->rflush(); |
my @Columns = ( 'username','domain','attempt','time', |
my @Columns; |
'submission','correct', 'grading','awarded','weight', |
push(@Columns,'username'); |
'score'); |
push(@Columns,'domain'); |
my $awarded_col = 7; |
push(@Columns,'attempt'); |
my $weight_col = 8; |
push(@Columns,'time'); |
|
push(@Columns,'submission'); |
|
if ($ENV{'form.correctans'} eq 'true') { push(@Columns,'correct'); } |
|
push(@Columns,'grading'); |
|
push(@Columns,'awarded'); |
|
push(@Columns,'weight'); |
|
push(@Columns,'score'); |
|
my ($awarded_col,$weight_col); |
|
if ($ENV{'form.correctans'} eq 'true') { |
|
$awarded_col = 7; |
|
$weight_col = 8; |
|
} else { |
|
$awarded_col = 6; |
|
$weight_col = 7; |
|
} |
# |
# |
# Create excel worksheet |
# Create excel worksheet |
my $filename = '/prtspool/'. |
my $filename = '/prtspool/'. |
Line 213 sub prepare_excel_output {
|
Line 230 sub prepare_excel_output {
|
my %row; |
my %row; |
$row{'username'} = $student->{'username'}; |
$row{'username'} = $student->{'username'}; |
$row{'domain'} = $student->{'domain'}; |
$row{'domain'} = $student->{'domain'}; |
$row{'correct'} = $student->{'answer'}; |
$row{'correct'} = $student->{'answer'}; |
$row{'weight'} = &Apache::lonnet::EXT |
$row{'weight'} = &Apache::lonnet::EXT |
('resource.'.$partid.'.weight',$resource->{'symb'}, |
('resource.'.$partid.'.weight',$resource->{'symb'}, |
undef,undef,undef); |
undef,undef,undef); |
Line 309 sub CreateInterface {
|
Line 326 sub CreateInterface {
|
$Str .= '<tr>'; |
$Str .= '<tr>'; |
$Str .= '<td align="center"><b>'.&mt('Sections').'</b></td>'; |
$Str .= '<td align="center"><b>'.&mt('Sections').'</b></td>'; |
$Str .= '<td align="center"><b>'.&mt('Enrollment Status').'</b></td>'; |
$Str .= '<td align="center"><b>'.&mt('Enrollment Status').'</b></td>'; |
|
$Str .= '<td> </td>'; |
$Str .= '</tr>'."\n"; |
$Str .= '</tr>'."\n"; |
# |
# |
$Str .= '<tr><td align="center">'."\n"; |
$Str .= '<tr><td align="center">'."\n"; |
Line 319 sub CreateInterface {
|
Line 337 sub CreateInterface {
|
$Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5); |
$Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5); |
$Str .= '</td>'; |
$Str .= '</td>'; |
# |
# |
|
my $checkbox = '<input type="checkbox" name="correctans" '; |
|
if (exists($ENV{'form.correctans'}) && $ENV{'form.correctans'} eq 'true') { |
|
$checkbox .= ' checked '; |
|
} |
|
$checkbox .= 'value="true" />'; |
|
$Str .= '<td align="center">'.'<label><b>'. |
|
&mt('compute correct answers [_1]',$checkbox).'</b></label>'.'</td>'; |
|
# |
$Str .= '</tr>'."\n"; |
$Str .= '</tr>'."\n"; |
$Str .= '</table>'."\n"; |
$Str .= '</table>'."\n"; |
# |
# |