--- loncom/homework/grades.pm 2007/10/26 00:27:55 1.465 +++ loncom/homework/grades.pm 2007/10/26 00:32:06 1.466 @@ -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 @@ sub cleanRecord { $bottomrow.=''.$grayFont.$foil.' '; } return '
'. - ''.$toprow.''. - ''. + ''.$toprow.''. + ''. $grayFont.$bottomrow.''.'
Answer
'.$grayFont.'Option ID
'.&mt('Answer').'
'.$grayFont.&mt('Option ID').'
'; } elsif ($response eq 'match') { my %answer=&Apache::lonnet::str2hash($answer); @@ -352,10 +352,10 @@ sub cleanRecord { $bottomrow.=''.$grayFont.$foil.' '; } return '
'. - ''.$toprow.''. - ''. + ''.$toprow.''. + ''. $middlerow.''. - ''. + ''. $bottomrow.''.'
Answer
'.$grayFont.'Item ID
'.&mt('Answer').'
'.$grayFont.&mt('Item ID').'
'.$grayFont.'Option ID
'.$grayFont.&mt('Option ID').'
'; } elsif ($response eq 'radiobutton') { my %answer=&Apache::lonnet::str2hash($answer); @@ -365,18 +365,18 @@ sub cleanRecord { foreach my $foil (@$order) { if (exists($answer{$foil})) { if ($foil eq $correct) { - $toprow.='true'; + $toprow.=''.&mt('true').''; } else { - $toprow.='true'; + $toprow.=''.&mt('true').''; } } else { - $toprow.='false'; + $toprow.=''.&mt('false').''; } $bottomrow.=''.$grayFont.$foil.' '; } return '
'. - ''.$toprow.''. - ''. + ''.$toprow.''. + ''. $grayFont.$bottomrow.''.'
Answer
'.$grayFont.'Option ID
'.&mt('Answer').'
'.$grayFont.&mt('Option ID').'
'; } elsif ($response eq 'essay') { if (! exists ($env{'form.'.$symb})) { @@ -1615,13 +1615,13 @@ sub gradeBox { '" 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)' : - 'problem weight assigned by computer'); + my $wgtmsg = ($wgt > 0) ? &mt('(problem weight)') + : ''.&mt('problem weight assigned by computer').''; $wgt = ($wgt > 0 ? $wgt : '1'); my $score = ($$record{'resource.'.$partid.'.awarded'} eq '' ? '' : &compute_points($$record{'resource.'.$partid.'.awarded'},$wgt)); my $result=''."\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 @@ sub handback_box { ''.$file_disp.''); $result.=''."\n"; $result.='
'; - $result.='(File will be uploaded when you click on Save & Next below.)
'; + $result.='(File will be uploaded when you click on Save & Next below.)
'; $file_counter++; } } @@ -2248,25 +2248,25 @@ sub check_collaborators { } } if (scalar(@good_collaborators) != 0) { - $result.='Collaborators: '; + $result.='
'.&mt('Collaborators: '); foreach my $name (@good_collaborators) { my ($lastname,$givenn) = split(/,/,$$fullname{$name}); push(@col_fullnames, $givenn.' '.$lastname); $result.=$fullname->{$name}.'     '; } $result.='
'."\n"; - my ($part)=split(/\./,$_); + my ($part)=split(/\./,$part); $result.=''. "\n"; } if (scalar(@bad_collaborators) > 0) { - $result.='
'; + $result.='
'; $result.=&mt('This student has submitted [quant,_1,invalid collaborator]: [_2]',scalar(@bad_collaborators),join(', ',@bad_collaborators)); $result .= '
'; } if (scalar(@bad_collaborators > $ncol)) { - $result .= '
'; + $result .= '
'; $result .= &mt('This student has submitted too many '. 'collaborators. Maximum is [_1].',$ncol); $result .= '
';