--- loncom/interface/loncoursedata.pm 2004/04/30 14:36:52 1.132 +++ loncom/interface/loncoursedata.pm 2004/05/13 13:55:35 1.133 @@ -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 @@ sub get_problem_statistics { } 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