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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 14 Jul 2005 02:28:29 -0000


albertel		Wed Jul 13 22:28:29 2005 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
  Log:
  - stop tring to store data if there isn't any to store
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.148 loncom/interface/loncoursedata.pm:1.149
--- loncom/interface/loncoursedata.pm:1.148	Tue Apr 19 11:44:40 2005
+++ loncom/interface/loncoursedata.pm	Wed Jul 13 22:28:25 2005
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursedata.pm,v 1.148 2005/04/19 15:44:40 matthew Exp $
+# $Id: loncoursedata.pm,v 1.149 2005/07/14 02:28:25 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1280,7 +1280,7 @@
                 $num_parameters ++;
                 if ($sql_parameter !~ /''/) {
                     $store_parameters_command .= $sql_parameter;
-                    $rows_stored++;
+                    #$rows_stored++;
                 }
             }
         }
@@ -1314,6 +1314,7 @@
             $rows_stored++;
         }
     }
+    if (! $rows_stored) { return ($returnstatus, undef); }
     $store_parameters_command =~ s|,\n$||;
     $store_performance_command =~ s|,\n$||;
     my $start = Time::HiRes::time;