[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Thu, 13 May 2004 13:55:35 -0000
matthew Thu May 13 09:55:35 2004 EDT
Modified files:
/loncom/interface loncoursedata.pm
Log:
Bug 3007: Degree of Difficulty should not be negative. #YES (aka $Solved)
was being computed as the sum of the awards on the problem. Now it is
computed as the sum of the awards on the problem minus the sum of the
awards given by override.
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.132 loncom/interface/loncoursedata.pm:1.133
--- loncom/interface/loncoursedata.pm:1.132 Fri Apr 30 10:36:52 2004
+++ loncom/interface/loncoursedata.pm Thu May 13 09:55:35 2004
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursedata.pm,v 1.132 2004/04/30 14:36:52 matthew Exp $
+# $Id: loncoursedata.pm,v 1.133 2004/05/13 13:55:35 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2030,12 +2030,14 @@
}
my ($solved) = &execute_SQL_request($dbh,$request);
#
+ $Solved -= $solved;
+ #
$num = 0 if (! defined($num));
$tries = 0 if (! defined($tries));
$max = 0 if (! defined($max));
$min = 0 if (! defined($min));
$STD = 0 if (! defined($STD));
- $Solved = 0 if (! defined($Solved));
+ $Solved = 0 if (! defined($Solved) || $Solved < 0);
$solved = 0 if (! defined($solved));
#
# Compute the more complicated statistics