[LON-CAPA-cvs] cvs: loncom /homework grades.pm
bisitz
bisitz at source.lon-capa.org
Tue Jul 16 13:17:33 EDT 2013
bisitz Tue Jul 16 17:17:33 2013 EDT
Modified files:
/loncom/homework grades.pm
Log:
Manual Grading
- Internationalization:
- Added missing &mt() calls
- Corrected plural switch
- XHTML:
- Proper inclusion by corrected XHTML structure (handback file row and WGT input field)
- Message icon and file type icon: alt attribute
- lower case class attribute
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.694 loncom/homework/grades.pm:1.695
--- loncom/homework/grades.pm:1.694 Mon Jul 15 16:13:12 2013
+++ loncom/homework/grades.pm Tue Jul 16 17:17:33 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.694 2013/07/15 16:13:12 bisitz Exp $
+# $Id: grades.pm,v 1.695 2013/07/16 17:17:33 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1702,7 +1702,7 @@
$wgt = ($wgt > 0 ? $wgt : '1');
my $score = ($$record{'resource.'.$partid.'.awarded'} eq '' ?
'' : &compute_points($$record{'resource.'.$partid.'.awarded'},$wgt));
- my $result='<input type="hidden" name="WGT'.$counter.'_'.$partid.'" value="'.$wgt.'" />'."\n";
+ my $data_WGT='<input type="hidden" name="WGT'.$counter.'_'.$partid.'" value="'.$wgt.'" />'."\n";
my $display_part= &get_display_part($partid,$symb);
my %last_resets = &get_last_resets($symb,$env{'request.course.id'},
[$partid]);
@@ -1710,7 +1710,7 @@
if ($last_resets{$partid}) {
$aggtries = &get_num_tries($record,$last_resets{$partid},$partid);
}
- $result.=&Apache::loncommon::start_data_table_row();
+ my $result=&Apache::loncommon::start_data_table_row();
my $ctr = 0;
my $thisweight = 0;
my $increment = &get_increment();
@@ -1747,8 +1747,9 @@
$result .=
- '<td>'.$display_part.'</td><td>'.$radio.'</td><td>'.&mt('or').'</td><td>'.$line.'</td>';
+ '<td>'.$data_WGT.$display_part.'</td><td>'.$radio.'</td><td>'.&mt('or').'</td><td>'.$line.'</td>';
$result.=&Apache::loncommon::end_data_table_row();
+ $result.=&Apache::loncommon::start_data_table_row().'<td colspan="6">';
$result.='<input type="hidden" name="stores'.$counter.'_'.$partid.'" value="" />'."\n".
'<input type="hidden" name="oldpts'.$counter.'_'.$partid.'" value="'.$score.'" />'."\n".
'<input type="hidden" name="solved'.$counter.'_'.$partid.'" value="'.
@@ -1759,6 +1760,7 @@
$aggtries.'" />'."\n";
my $res_error;
$result.=&handback_box($symb,$uname,$udom,$counter,$partid,$record,\$res_error);
+ $result.='</td>'.&Apache::loncommon::end_data_table_row();
if ($res_error) {
return &navmap_errormsg();
}
@@ -2051,7 +2053,7 @@
<br /><b>$lt{'keyw'}:</b>
<a href="javascript:keywords(document.SCORE);" target="_self">$lt{'list'}</a>
<a href="#" onmousedown="javascript:getSel(); return false"
- CLASS="page">$lt{'past'}</a>
+ class="page">$lt{'past'}</a>
<a href="javascript:kwhighlight();" target="_self">$lt{'high'}</a><br /><br />
KEYWORDS
#
@@ -2167,13 +2169,14 @@
if ($env{"form.$uname:$udom:$partid:submitted_by"}) {
if (exists($seenparts{$partid})) { next; }
$seenparts{$partid}=1;
- my $submitby='<b>Part:</b> '.$display_part.
- ' <b>Collaborative submission by:</b> '.
- '<a href="javascript:viewSubmitter(\''.
- $env{"form.$uname:$udom:$partid:submitted_by"}.
- '\');" target="_self">'.
- $$fullname{$env{"form.$uname:$udom:$partid:submitted_by"}}.'</a><br />';
- $request->print($submitby);
+ $request->print(
+ '<b>'.&mt('Part: [_1]',$display_part).'</b>'.
+ ' <b>'.&mt('Collaborative submission by: [_1]',
+ '<a href="javascript:viewSubmitter(\''.
+ $env{"form.$uname:$udom:$partid:submitted_by"}.
+ '\');" target="_self">'.
+ $$fullname{$env{"form.$uname:$udom:$partid:submitted_by"}}.'</a>').
+ '<br />');
next;
}
my $responsetype = $responseType->{$partid}->{$respid};
@@ -2243,7 +2246,7 @@
$lastsubonly.='<br /><span class="LC_warning">'.&mt('Like all files provided by users, this file may contain viruses').'</span><br />';
foreach my $file (@$files) {
&Apache::lonnet::allowuploaded('/adm/grades',$file);
- $lastsubonly.='<br /><a href="'.$file.'?rawmode=1" target="lonGRDs"><img src="'.&Apache::loncommon::icon($file).'" border="0" /> '.$file.'</a>';
+ $lastsubonly.='<br /><a href="'.$file.'?rawmode=1" target="lonGRDs"><img src="'.&Apache::loncommon::icon($file).'" border="0" alt="" /> '.$file.'</a>';
}
}
$lastsubonly.='<br />';
@@ -2300,10 +2303,10 @@
'<input type="hidden" name="newmsg'.$counter.'" value="" />'."\n";
$result.=' <a href="javascript:msgCenter(document.SCORE,'.$counter.
',\''.$msgfor.'\');" target="_self">'.
- &mt('Compose message to student').(scalar(@$col_fullnames) >= 1 ? 's' : '').'</a><label> ('.
+ &mt('Compose message to student'.(scalar(@$col_fullnames) >= 1 ? 's' : '')).'</a><label> ('.
&mt('incl. grades').' <input type="checkbox" name="withgrades'.$counter.'" /></label>)'.
- '<img src="'.$request->dir_config('lonIconsURL').
- '/mailbkgrd.gif" width="14" height="10" name="mailicon'.$counter.'" />'."\n".
+ ' <img src="'.$request->dir_config('lonIconsURL').
+ '/mailbkgrd.gif" width="14" height="10" alt="" name="mailicon'.$counter.'" />'."\n".
'<br /> ('.
&mt('Message will be sent when you click on Save & Next below.').")\n";
$result.='</div></div>';
More information about the LON-CAPA-cvs
mailing list