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

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 22 Jul 2004 17:33:29 -0000


matthew		Thu Jul 22 13:33:29 2004 EDT

  Modified files:              
    /loncom/interface/statistics	lonproblemstatistics.pm 
  Log:
  &statistics_html_table_data: do not send 'nan' or other text into sprintf
  with a numeric format as the data is reported as 0.0.
  
  
Index: loncom/interface/statistics/lonproblemstatistics.pm
diff -u loncom/interface/statistics/lonproblemstatistics.pm:1.91 loncom/interface/statistics/lonproblemstatistics.pm:1.92
--- loncom/interface/statistics/lonproblemstatistics.pm:1.91	Thu Jul 22 11:56:41 2004
+++ loncom/interface/statistics/lonproblemstatistics.pm	Thu Jul 22 13:33:29 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonproblemstatistics.pm,v 1.91 2004/07/22 15:56:41 matthew Exp $
+# $Id: lonproblemstatistics.pm,v 1.92 2004/07/22 17:33:29 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -819,7 +819,7 @@
         if (exists($field->{'special'}) && $field->{'special'} eq 'link') {
             $row .= '<a href="'.$data->{$field->{'name'}.'.link'}.'">';
         }
-        if (exists($field->{'format'})) {
+        if (exists($field->{'format'}) && $data->{$field->{'name'}} !~ /[A-Z]/i) {
             $row .= sprintf($field->{'format'},$data->{$field->{'name'}});
         } else {
             $row .= $data->{$field->{'name'}};