version 1.465, 2007/10/26 00:27:55
|
version 1.467, 2007/10/26 00:39:09
|
Line 332 sub cleanRecord {
|
Line 332 sub cleanRecord {
|
$bottomrow.='<td>'.$grayFont.$foil.'</span> </td>'; |
$bottomrow.='<td>'.$grayFont.$foil.'</span> </td>'; |
} |
} |
return '<blockquote><table border="1">'. |
return '<blockquote><table border="1">'. |
'<tr valign="top"><td>Answer</td>'.$toprow.'</tr>'. |
'<tr valign="top"><td>'.&mt('Answer').'</td>'.$toprow.'</tr>'. |
'<tr valign="top"><td>'.$grayFont.'Option ID</span></td>'. |
'<tr valign="top"><td>'.$grayFont.&mt('Option ID').'</span></td>'. |
$grayFont.$bottomrow.'</tr>'.'</table></blockquote>'; |
$grayFont.$bottomrow.'</tr>'.'</table></blockquote>'; |
} elsif ($response eq 'match') { |
} elsif ($response eq 'match') { |
my %answer=&Apache::lonnet::str2hash($answer); |
my %answer=&Apache::lonnet::str2hash($answer); |
Line 352 sub cleanRecord {
|
Line 352 sub cleanRecord {
|
$bottomrow.='<td>'.$grayFont.$foil.'</span> </td>'; |
$bottomrow.='<td>'.$grayFont.$foil.'</span> </td>'; |
} |
} |
return '<blockquote><table border="1">'. |
return '<blockquote><table border="1">'. |
'<tr valign="top"><td>Answer</td>'.$toprow.'</tr>'. |
'<tr valign="top"><td>'.&mt('Answer').'</td>'.$toprow.'</tr>'. |
'<tr valign="top"><td>'.$grayFont.'Item ID</span></td>'. |
'<tr valign="top"><td>'.$grayFont.&mt('Item ID').'</span></td>'. |
$middlerow.'</tr>'. |
$middlerow.'</tr>'. |
'<tr valign="top"><td>'.$grayFont.'Option ID</span></td>'. |
'<tr valign="top"><td>'.$grayFont.&mt('Option ID').'</span></td>'. |
$bottomrow.'</tr>'.'</table></blockquote>'; |
$bottomrow.'</tr>'.'</table></blockquote>'; |
} elsif ($response eq 'radiobutton') { |
} elsif ($response eq 'radiobutton') { |
my %answer=&Apache::lonnet::str2hash($answer); |
my %answer=&Apache::lonnet::str2hash($answer); |
Line 365 sub cleanRecord {
|
Line 365 sub cleanRecord {
|
foreach my $foil (@$order) { |
foreach my $foil (@$order) { |
if (exists($answer{$foil})) { |
if (exists($answer{$foil})) { |
if ($foil eq $correct) { |
if ($foil eq $correct) { |
$toprow.='<td><b>true</b></td>'; |
$toprow.='<td><b>'.&mt('true').'</b></td>'; |
} else { |
} else { |
$toprow.='<td><i>true</i></td>'; |
$toprow.='<td><i>'.&mt('true').'</i></td>'; |
} |
} |
} else { |
} else { |
$toprow.='<td>false</td>'; |
$toprow.='<td>'.&mt('false').'</td>'; |
} |
} |
$bottomrow.='<td>'.$grayFont.$foil.'</span> </td>'; |
$bottomrow.='<td>'.$grayFont.$foil.'</span> </td>'; |
} |
} |
return '<blockquote><table border="1">'. |
return '<blockquote><table border="1">'. |
'<tr valign="top"><td>Answer</td>'.$toprow.'</tr>'. |
'<tr valign="top"><td>'.&mt('Answer').'</td>'.$toprow.'</tr>'. |
'<tr valign="top"><td>'.$grayFont.'Option ID</span></td>'. |
'<tr valign="top"><td>'.$grayFont.&mt('Option ID').'</span></td>'. |
$grayFont.$bottomrow.'</tr>'.'</table></blockquote>'; |
$grayFont.$bottomrow.'</tr>'.'</table></blockquote>'; |
} elsif ($response eq 'essay') { |
} elsif ($response eq 'essay') { |
if (! exists ($env{'form.'.$symb})) { |
if (! exists ($env{'form.'.$symb})) { |
Line 1615 sub gradeBox {
|
Line 1615 sub gradeBox {
|
'" src="'.$request->dir_config('lonIconsURL'). |
'" src="'.$request->dir_config('lonIconsURL'). |
'/check.gif" height="16" border="0" />'; |
'/check.gif" height="16" border="0" />'; |
my $wgt = &Apache::lonnet::EXT('resource.'.$partid.'.weight',$symb,$udom,$uname); |
my $wgt = &Apache::lonnet::EXT('resource.'.$partid.'.weight',$symb,$udom,$uname); |
my $wgtmsg = ($wgt > 0 ? '(problem weight)' : |
my $wgtmsg = ($wgt > 0) ? &mt('(problem weight)') |
'<span class="LC_info">problem weight assigned by computer</span>'); |
: '<span class="LC_info">'.&mt('problem weight assigned by computer').'</span>'; |
$wgt = ($wgt > 0 ? $wgt : '1'); |
$wgt = ($wgt > 0 ? $wgt : '1'); |
my $score = ($$record{'resource.'.$partid.'.awarded'} eq '' ? |
my $score = ($$record{'resource.'.$partid.'.awarded'} eq '' ? |
'' : &compute_points($$record{'resource.'.$partid.'.awarded'},$wgt)); |
'' : &compute_points($$record{'resource.'.$partid.'.awarded'},$wgt)); |
my $result='<input type="hidden" name="WGT'.$counter.'_'.$partid.'" value="'.$wgt.'" />'."\n"; |
my $result='<input type="hidden" name="WGT'.$counter.'_'.$partid.'" value="'.$wgt.'" />'."\n"; |
my $display_part=&get_display_part($partid,$symb); |
my $display_part= &get_display_part($partid,$symb); |
my %last_resets = &get_last_resets($symb,$env{'request.course.id'}, |
my %last_resets = &get_last_resets($symb,$env{'request.course.id'}, |
[$partid]); |
[$partid]); |
my $aggtries = $$record{'resource.'.$partid.'.tries'}; |
my $aggtries = $$record{'resource.'.$partid.'.tries'}; |
Line 1703 sub handback_box {
|
Line 1703 sub handback_box {
|
'<span class="LC_filename">'.$file_disp.'</span>'); |
'<span class="LC_filename">'.$file_disp.'</span>'); |
$result.='<input type="file" name="'.$prefix.'returndoc'.$file_counter.'" />'."\n"; |
$result.='<input type="file" name="'.$prefix.'returndoc'.$file_counter.'" />'."\n"; |
$result.='<input type="hidden" name="'.$prefix.'origdoc'.$file_counter.'" value="'.$file.'" /><br />'; |
$result.='<input type="hidden" name="'.$prefix.'origdoc'.$file_counter.'" value="'.$file.'" /><br />'; |
$result.='(File will be uploaded when you click on Save & Next below.)<br />'; |
$result.='(File will be uploaded when you click on Save & Next below.)<br />'; |
$file_counter++; |
$file_counter++; |
} |
} |
} |
} |
Line 2248 sub check_collaborators {
|
Line 2248 sub check_collaborators {
|
} |
} |
} |
} |
if (scalar(@good_collaborators) != 0) { |
if (scalar(@good_collaborators) != 0) { |
$result.='<b>Collaborators: </b>'; |
$result.='<br />'.&mt('Collaborators: '); |
foreach my $name (@good_collaborators) { |
foreach my $name (@good_collaborators) { |
my ($lastname,$givenn) = split(/,/,$$fullname{$name}); |
my ($lastname,$givenn) = split(/,/,$$fullname{$name}); |
push(@col_fullnames, $givenn.' '.$lastname); |
push(@col_fullnames, $givenn.' '.$lastname); |
$result.=$fullname->{$name}.' '; |
$result.=$fullname->{$name}.' '; |
} |
} |
$result.='<br />'."\n"; |
$result.='<br />'."\n"; |
my ($part)=split(/\./,$_); |
my ($part)=split(/\./,$part); |
$result.='<input type="hidden" name="collaborator'.$counter. |
$result.='<input type="hidden" name="collaborator'.$counter. |
'" value="'.$part.':'.(join ':',@good_collaborators).'" />'. |
'" value="'.$part.':'.(join ':',@good_collaborators).'" />'. |
"\n"; |
"\n"; |
} |
} |
if (scalar(@bad_collaborators) > 0) { |
if (scalar(@bad_collaborators) > 0) { |
$result.='<div class="LC_error">'; |
$result.='<div class="LC_warning">'; |
$result.=&mt('This student has submitted [quant,_1,invalid collaborator]: [_2]',scalar(@bad_collaborators),join(', ',@bad_collaborators)); |
$result.=&mt('This student has submitted [quant,_1,invalid collaborator]: [_2]',scalar(@bad_collaborators),join(', ',@bad_collaborators)); |
$result .= '</div>'; |
$result .= '</div>'; |
} |
} |
if (scalar(@bad_collaborators > $ncol)) { |
if (scalar(@bad_collaborators > $ncol)) { |
$result .= '<div class="LC_error">'; |
$result .= '<div class="LC_warning">'; |
$result .= &mt('This student has submitted too many '. |
$result .= &mt('This student has submitted too many '. |
'collaborators. Maximum is [_1].',$ncol); |
'collaborators. Maximum is [_1].',$ncol); |
$result .= '</div>'; |
$result .= '</div>'; |
Line 4273 sub displaySubByDates {
|
Line 4273 sub displaySubByDates {
|
my $isCODE=0; |
my $isCODE=0; |
my $isTask = ($symb =~/\.task$/); |
my $isTask = ($symb =~/\.task$/); |
if (exists($record->{'resource.CODE'})) { $isCODE=1; } |
if (exists($record->{'resource.CODE'})) { $isCODE=1; } |
my $studentTable='<table border="0" width="100%"><tr><td bgcolor="#777777">'. |
my $studentTable=&Apache::loncommon::start_data_table(). |
'<table border="0" width="100%"><tr bgcolor="#e6ffff">'. |
&Apache::loncommon::start_data_table_header_row(). |
'<td><b>Date/Time</b></td>'. |
'<th>'.&mt('Date/Time').'</th>'. |
($isCODE?'<td><b>CODE</b></td>':''). |
($isCODE?'<th>'.&mt('CODE').'</th>':''). |
'<td><b>Submission</b></td>'. |
'<th>'.&mt('Submission').'</th>'. |
'<td><b>Status </b></td></tr>'; |
'<th>'.&mt('Status').'</th>'. |
|
&Apache::loncommon::end_data_table_header_row(); |
my ($version); |
my ($version); |
my %mark; |
my %mark; |
my %orders; |
my %orders; |
$mark{'correct_by_student'} = $checkIcon; |
$mark{'correct_by_student'} = $checkIcon; |
if (!exists($$record{'1:timestamp'})) { |
if (!exists($$record{'1:timestamp'})) { |
return '<br /> <span class="LC_warning">Nothing submitted - no attempts</span><br />'; |
return '<br /> <span class="LC_warning">'.&mt('Nothing submitted - no attempts').'</span><br />'; |
} |
} |
|
|
my $interaction; |
my $interaction; |
for ($version=1;$version<=$$record{'version'};$version++) { |
for ($version=1;$version<=$$record{'version'};$version++) { |
my $timestamp = scalar(localtime($$record{$version.':timestamp'})); |
my $timestamp = |
|
&Apache::lonlocal::locallocaltime($$record{$version.':timestamp'}); |
if (exists($$record{$version.':resource.0.version'})) { |
if (exists($$record{$version.':resource.0.version'})) { |
$interaction = $$record{$version.':resource.0.version'}; |
$interaction = $$record{$version.':resource.0.version'}; |
} |
} |
|
|
my $where = ($isTask ? "$version:resource.$interaction" |
my $where = ($isTask ? "$version:resource.$interaction" |
: "$version:resource"); |
: "$version:resource"); |
$studentTable.='<tr bgcolor="#ffffff" valign="top"><td>'.$timestamp.'</td>'; |
$studentTable.=&Apache::loncommon::start_data_table_row(). |
|
'<td>'.$timestamp.'</td>'; |
if ($isCODE) { |
if ($isCODE) { |
$studentTable.='<td>'.$record->{$version.':resource.CODE'}.'</td>'; |
$studentTable.='<td>'.$record->{$version.':resource.CODE'}.'</td>'; |
} |
} |
Line 4315 sub displaySubByDates {
|
Line 4318 sub displaySubByDates {
|
|
|
my ($responseId)= ($isTask ? ($matchKey=~ /^resource\.(.*?)\.\Q$partid\E\.award$/) |
my ($responseId)= ($isTask ? ($matchKey=~ /^resource\.(.*?)\.\Q$partid\E\.award$/) |
: ($matchKey=~ /^resource\.\Q$partid\E\.(.*?)\.submission$/)); |
: ($matchKey=~ /^resource\.\Q$partid\E\.(.*?)\.submission$/)); |
$displaySub[0].='<b>Part:</b> '.$display_part.' '; |
$displaySub[0].='<b>'.&mt('Part:').'</b> '.$display_part.' '; |
$displaySub[0].='<span class="LC_internal_info">(ID '. |
$displaySub[0].='<span class="LC_internal_info">('.&mt('ID').' '. |
$responseId.')</span> <b>'; |
$responseId.')</span> <b>'; |
if ($$record{"$where.$partid.tries"} eq '') { |
if ($$record{"$where.$partid.tries"} eq '') { |
$displaySub[0].='Trial not counted'; |
$displaySub[0].=&mt('Trial not counted'); |
} else { |
} else { |
$displaySub[0].='Trial '. |
$displaySub[0].=&mt('Trial [_1]', |
$$record{"$where.$partid.tries"}; |
$$record{"$where.$partid.tries"}); |
} |
} |
my $responseType=($isTask ? 'Task' |
my $responseType=($isTask ? 'Task' |
: $responseType->{$partid}->{$responseId}); |
: $responseType->{$partid}->{$responseId}); |
Line 4362 sub displaySubByDates {
|
Line 4365 sub displaySubByDates {
|
} |
} |
$studentTable.='<td>'.$displaySub[0].' </td><td>'.$displaySub[1]; |
$studentTable.='<td>'.$displaySub[0].' </td><td>'.$displaySub[1]; |
if ($displaySub[2]) { |
if ($displaySub[2]) { |
$studentTable.='Manually graded by '.$displaySub[2]; |
$studentTable.=&mt('Manually graded by [_1]',$displaySub[2]); |
} |
} |
$studentTable.=' </td></tr>'; |
$studentTable.=' </td>'. |
|
&Apache::loncommon::end_data_table_row(); |
} |
} |
$studentTable.='</table></td></tr></table>'; |
$studentTable.=&Apache::loncommon::end_data_table(); |
return $studentTable; |
return $studentTable; |
} |
} |
|
|