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

matthew lon-capa-cvs@mail.lon-capa.org
Wed, 06 Oct 2004 14:21:58 -0000


matthew		Wed Oct  6 10:21:58 2004 EDT

  Modified files:              
    /loncom/interface/statistics	loncorrectproblemplot.pm 
  Log:
  No longer ISE when there is no data.
  
  
Index: loncom/interface/statistics/loncorrectproblemplot.pm
diff -u loncom/interface/statistics/loncorrectproblemplot.pm:1.11 loncom/interface/statistics/loncorrectproblemplot.pm:1.12
--- loncom/interface/statistics/loncorrectproblemplot.pm:1.11	Fri Jun  4 17:42:18 2004
+++ loncom/interface/statistics/loncorrectproblemplot.pm	Wed Oct  6 10:21:57 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncorrectproblemplot.pm,v 1.11 2004/06/04 21:42:18 matthew Exp $
+# $Id: loncorrectproblemplot.pm,v 1.12 2004/10/06 14:21:57 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -148,8 +148,8 @@
     my ($score_data,$title,$total_parts) = @_;
     #
     # Basic check first
-    if (@$score_data < 1) {
-        return '<h2>There is no data to plot</h2>';
+    if (ref($score_data) ne 'ARRAY' || @$score_data < 1) {
+        return '<h2>'.&mt('There is no data to plot').'</h2>';
     }
     #
     # Determine which bins to use