[LON-CAPA-cvs] cvs: loncom /homework grades.pm
bowersj2
lon-capa-cvs@mail.lon-capa.org
Mon, 27 Feb 2006 02:06:55 -0000
bowersj2 Sun Feb 26 21:06:55 2006 EDT
Modified files:
/loncom/homework grades.pm
Log:
Change grade computations in this file to use compute_points for
proper rounding.
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.318 loncom/homework/grades.pm:1.319
--- loncom/homework/grades.pm:1.318 Sat Feb 25 21:55:11 2006
+++ loncom/homework/grades.pm Sun Feb 26 21:06:52 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.318 2006/02/26 02:55:11 banghart Exp $
+# $Id: grades.pm,v 1.319 2006/02/27 02:06:52 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1421,7 +1421,7 @@
'<font color="red">problem weight assigned by computer</font>');
$wgt = ($wgt > 0 ? $wgt : '1');
my $score = ($$record{'resource.'.$partid.'.awarded'} eq '' ?
- '' : $$record{'resource.'.$partid.'.awarded'}*$wgt);
+ '' : compute_points($$record{'resource.'.$partid.'.awarded'},$wgt));
my $result='<input type="hidden" name="WGT'.$counter.'_'.$partid.'" value="'.$wgt.'" />'."\n";
$result.='<br />'.$partid.' - '.$respid.'<br />';
my $display_part=&get_display_part($partid,undef,$symb);
@@ -2893,7 +2893,7 @@
$aggregates{$part} = 1;
}
if ($type eq 'awarded') {
- my $pts = $score eq '' ? '' : $score*$$weight{$part};
+ my $pts = $score eq '' ? '' : compute_points($score,$$weight{$part});
$result.='<input type="hidden" name="'.
'GD_'.$student.'_'.$part.'_awarded_s" value="'.$pts.'" />'."\n";
$result.='<input type="text" name="'.