[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 26 Oct 2007 00:32:09 -0000
albertel Thu Oct 25 20:32:09 2007 EDT
Modified files:
/loncom/homework grades.pm
Log:
- &mt()
- switch to warning
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.465 loncom/homework/grades.pm:1.466
--- loncom/homework/grades.pm:1.465 Thu Oct 25 20:27:55 2007
+++ loncom/homework/grades.pm Thu Oct 25 20:32:06 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.465 2007/10/26 00:27:55 albertel Exp $
+# $Id: grades.pm,v 1.466 2007/10/26 00:32:06 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -332,8 +332,8 @@
$bottomrow.='<td>'.$grayFont.$foil.'</span> </td>';
}
return '<blockquote><table border="1">'.
- '<tr valign="top"><td>Answer</td>'.$toprow.'</tr>'.
- '<tr valign="top"><td>'.$grayFont.'Option ID</span></td>'.
+ '<tr valign="top"><td>'.&mt('Answer').'</td>'.$toprow.'</tr>'.
+ '<tr valign="top"><td>'.$grayFont.&mt('Option ID').'</span></td>'.
$grayFont.$bottomrow.'</tr>'.'</table></blockquote>';
} elsif ($response eq 'match') {
my %answer=&Apache::lonnet::str2hash($answer);
@@ -352,10 +352,10 @@
$bottomrow.='<td>'.$grayFont.$foil.'</span> </td>';
}
return '<blockquote><table border="1">'.
- '<tr valign="top"><td>Answer</td>'.$toprow.'</tr>'.
- '<tr valign="top"><td>'.$grayFont.'Item ID</span></td>'.
+ '<tr valign="top"><td>'.&mt('Answer').'</td>'.$toprow.'</tr>'.
+ '<tr valign="top"><td>'.$grayFont.&mt('Item ID').'</span></td>'.
$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>';
} elsif ($response eq 'radiobutton') {
my %answer=&Apache::lonnet::str2hash($answer);
@@ -365,18 +365,18 @@
foreach my $foil (@$order) {
if (exists($answer{$foil})) {
if ($foil eq $correct) {
- $toprow.='<td><b>true</b></td>';
+ $toprow.='<td><b>'.&mt('true').'</b></td>';
} else {
- $toprow.='<td><i>true</i></td>';
+ $toprow.='<td><i>'.&mt('true').'</i></td>';
}
} else {
- $toprow.='<td>false</td>';
+ $toprow.='<td>'.&mt('false').'</td>';
}
$bottomrow.='<td>'.$grayFont.$foil.'</span> </td>';
}
return '<blockquote><table border="1">'.
- '<tr valign="top"><td>Answer</td>'.$toprow.'</tr>'.
- '<tr valign="top"><td>'.$grayFont.'Option ID</span></td>'.
+ '<tr valign="top"><td>'.&mt('Answer').'</td>'.$toprow.'</tr>'.
+ '<tr valign="top"><td>'.$grayFont.&mt('Option ID').'</span></td>'.
$grayFont.$bottomrow.'</tr>'.'</table></blockquote>';
} elsif ($response eq 'essay') {
if (! exists ($env{'form.'.$symb})) {
@@ -1615,13 +1615,13 @@
'" src="'.$request->dir_config('lonIconsURL').
'/check.gif" height="16" border="0" />';
my $wgt = &Apache::lonnet::EXT('resource.'.$partid.'.weight',$symb,$udom,$uname);
- my $wgtmsg = ($wgt > 0 ? '(problem weight)' :
- '<span class="LC_info">problem weight assigned by computer</span>');
+ my $wgtmsg = ($wgt > 0) ? &mt('(problem weight)')
+ : '<span class="LC_info">'.&mt('problem weight assigned by computer').'</span>';
$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 $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'},
[$partid]);
my $aggtries = $$record{'resource.'.$partid.'.tries'};
@@ -1703,7 +1703,7 @@
'<span class="LC_filename">'.$file_disp.'</span>');
$result.='<input type="file" name="'.$prefix.'returndoc'.$file_counter.'" />'."\n";
$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++;
}
}
@@ -2248,25 +2248,25 @@
}
}
if (scalar(@good_collaborators) != 0) {
- $result.='<b>Collaborators: </b>';
+ $result.='<br />'.&mt('Collaborators: ');
foreach my $name (@good_collaborators) {
my ($lastname,$givenn) = split(/,/,$$fullname{$name});
push(@col_fullnames, $givenn.' '.$lastname);
$result.=$fullname->{$name}.' ';
}
$result.='<br />'."\n";
- my ($part)=split(/\./,$_);
+ my ($part)=split(/\./,$part);
$result.='<input type="hidden" name="collaborator'.$counter.
'" value="'.$part.':'.(join ':',@good_collaborators).'" />'.
"\n";
}
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 .= '</div>';
}
if (scalar(@bad_collaborators > $ncol)) {
- $result .= '<div class="LC_error">';
+ $result .= '<div class="LC_warning">';
$result .= &mt('This student has submitted too many '.
'collaborators. Maximum is [_1].',$ncol);
$result .= '</div>';