[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstudentassessment.pm

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 07 Oct 2003 14:38:30 -0000


matthew		Tue Oct  7 10:38:30 2003 EDT

  Modified files:              
    /loncom/interface/statistics	lonstudentassessment.pm 
  Log:
  Bug 2269: Chart should round 0.999999 to 1 and not display '*'.
  
  
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.69 loncom/interface/statistics/lonstudentassessment.pm:1.70
--- loncom/interface/statistics/lonstudentassessment.pm:1.69	Thu Oct  2 13:07:41 2003
+++ loncom/interface/statistics/lonstudentassessment.pm	Tue Oct  7 10:38:30 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentassessment.pm,v 1.69 2003/10/02 17:07:41 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.70 2003/10/07 14:38:30 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1522,6 +1522,9 @@
             $partscore = $weight*$awarded;
             $score += $partscore;
             $symbol = $partscore; 
+            if (abs($symbol - sprintf("%.0f",$symbol)) < 0.001) {
+                $symbol = sprintf("%.0f",$symbol);
+            }
             if (length($symbol) > 1) {
                 $symbol = '*';
             }