version 1.50, 2008/10/30 17:45:25
|
version 1.56, 2010/01/14 17:20:51
|
Line 265 sub prepare_html_output {
|
Line 265 sub prepare_html_output {
|
$headers{'response'} .= |
$headers{'response'} .= |
'<th colspan="'.scalar(@headers).'">'. |
'<th colspan="'.scalar(@headers).'">'. |
&mt('Response [_1]',$responses->[$i]).'</th>'; |
&mt('Response [_1]',$responses->[$i]).'</th>'; |
$headers{'student'}.= '<th>'.join('</th><th><nobr>', |
$headers{'student'}.= '<th><span class="LC_nobreak">'. |
|
join('</span></th><th><span class="LC_nobreak">', |
@headers). |
@headers). |
'</nobr></th>'; |
'</span></th>'; |
} |
} |
} |
} |
if ($part_span == 0) { |
if ($part_span == 0) { |
Line 284 sub prepare_html_output {
|
Line 285 sub prepare_html_output {
|
$headers{'part'} .= qq{<th colspan="$part_span">$tmpname</th>}; |
$headers{'part'} .= qq{<th colspan="$part_span">$tmpname</th>}; |
$nonempty_part_headers = 1; |
$nonempty_part_headers = 1; |
} else { |
} else { |
$headers{'part'} .= qq{<th colspan="$part_span"> </th>}; |
$headers{'part'} .= qq{<th colspan="$part_span"> </th>}; |
} |
} |
$prob_span += $part_span; |
$prob_span += $part_span; |
} |
} |
Line 501 sub html_essay_results {
|
Line 502 sub html_essay_results {
|
if (defined($respid)) { |
if (defined($respid)) { |
$id .= ' '.$respid; |
$id .= ' '.$respid; |
} |
} |
$Str .= '<nobr>'.$id.'</nobr>'.(' 'x4); |
$Str .= '<span class="LC_nobreak">'.$id.'</span>'.(' 'x4); |
} |
} |
# |
# |
shift(@$headers); # Get rid of the Submission header |
shift(@$headers); # Get rid of the Submission header |
Line 510 sub html_essay_results {
|
Line 511 sub html_essay_results {
|
$correct = &html_format_essay_sub($response->{'Correct'}); |
$correct = &html_format_essay_sub($response->{'Correct'}); |
shift(@$headers); |
shift(@$headers); |
} |
} |
$Str .= '<nobr>'. |
$Str .= '<span class="LC_nobreak">'. |
join('', |
join('', |
map { |
map { |
(' 'x4).&mt($_.': [_1]',$response->{$_}); |
(' 'x4).&mt($_.': [_1]',$response->{$_}); |
} @$headers).'</nobr>'; |
} @$headers).'</span>'; |
if (@$headers || ! $single_response) { |
if (@$headers || ! $single_response) { |
$Str .= '<br />'; |
$Str .= '<br />'; |
} |
} |
Line 567 sub html_non_essay_results {
|
Line 568 sub html_non_essay_results {
|
if ($resptype eq 'radiobutton') { |
if ($resptype eq 'radiobutton') { |
$submission = &HTML::Entities::encode($submission,'<>&"'); |
$submission = &HTML::Entities::encode($submission,'<>&"'); |
$submission =~ s/=([^=])$//; |
$submission =~ s/=([^=])$//; |
$submission = '<nobr>'.$submission.'</nobr>'; |
$submission = '<span class="LC_nobreak">'.$submission.'</span>'; |
} |
} |
$response->{'Submission'} = $submission; |
$response->{'Submission'} = $submission; |
# |
# |
Line 930 sub prepare_csv_output {
|
Line 931 sub prepare_csv_output {
|
time.'_'.rand(1000000000).'.csv'; |
time.'_'.rand(1000000000).'.csv'; |
unless ($outputfile = Apache::File->new('>/home/httpd'.$filename)) { |
unless ($outputfile = Apache::File->new('>/home/httpd'.$filename)) { |
$r->log_error("Couldn't open $filename for output $!"); |
$r->log_error("Couldn't open $filename for output $!"); |
$r->print('<div class="LC_error">' |
$r->print( |
.&mt('Problems occurred in writing the CSV file. ' |
'<p class="LC_error">' |
.'This error has been logged. ' |
.&mt('Problems occurred in writing the CSV file.') |
.'Please alert your LON-CAPA administrator.') |
.' '.&mt('This error has been logged.') |
.'</div>'); |
.' '.&mt('Please alert your LON-CAPA administrator.') |
|
.'</p>' |
|
); |
$outputfile = undef; |
$outputfile = undef; |
} |
} |
# |
# |
Line 1095 sub CreateInterface {
|
Line 1098 sub CreateInterface {
|
$Str .= '<th>'.&mt('Sections').'</th>'; |
$Str .= '<th>'.&mt('Sections').'</th>'; |
$Str .= '<th>'.&mt('Groups').'</th>'; |
$Str .= '<th>'.&mt('Groups').'</th>'; |
$Str .= '<th>'.&mt('Access Status').'</th>'; |
$Str .= '<th>'.&mt('Access Status').'</th>'; |
# $Str .= '<th>'.&mt('Output as [_1]',$output_selector).'</th>'; |
|
$Str .= '<th>'.&mt('Options').'</th>'; |
$Str .= '<th>'.&mt('Options').'</th>'; |
$Str .= '<th>'.&mt('Output Format').'</th>'; |
$Str .= '<th>'.&mt('Output Format').'</th>'; |
$Str .= &Apache::loncommon::end_data_table_header_row(); |
$Str .= &Apache::loncommon::end_data_table_header_row(); |
Line 1143 sub CreateInterface {
|
Line 1145 sub CreateInterface {
|
} |
} |
$prob_status_checkbox .= 'value="true" />'; |
$prob_status_checkbox .= 'value="true" />'; |
# |
# |
$Str .= '<td align="right" valign="top">'. |
$Str .= |
'<label><b>'. |
'<td valign="top">' |
&mt('Show problem [_1]',$prob_checkbox).'</b></label><br />'. |
.'<label>' |
'<label><b>'. |
.$prob_checkbox.&mt('Show problem') |
&mt('Show correct answers [_1]',$ans_checkbox).'</b></label><br />'. |
.'</label><br />' |
'<label><b>'. |
.'<label>' |
&mt('Show all submissions [_1]',$all_sub_checkbox). |
.' '.$ans_checkbox.&mt('Show correct answers') |
'</b></label><br />'. |
.'</label><br />' |
'<label><b>'. |
.'<label>' |
&mt('Show problem grading [_1]',$prob_status_checkbox). |
.$all_sub_checkbox.&mt('Show all submissions') |
'</b></label><br />'. |
.'</label><br />' |
'</td>'; |
.'<label>' |
|
.$prob_status_checkbox.&mt('Show problem grading') |
|
.'</label>' |
|
.'</td>'; |
# |
# |
$Str .= '<td align="center" valign="top">'.$output_selector.'</td>'; |
$Str .= '<td align="center" valign="top">'.$output_selector.'</td>'; |
# |
# |
Line 1166 sub CreateInterface {
|
Line 1171 sub CreateInterface {
|
'<input type="text" name="stats_status"' |
'<input type="text" name="stats_status"' |
.' size="60" value="" readonly="readonly" />') |
.' size="60" value="" readonly="readonly" />') |
.'</span></p>'; |
.'</span></p>'; |
|
$Str .= '</p>'; |
## |
## |
return $Str; |
return $Str; |
} |
} |