[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Tue, 30 Sep 2003 15:35:56 -0000
matthew Tue Sep 30 11:35:56 2003 EDT
Modified files:
/loncom/interface loncoursedata.pm
Log:
Store the performance table first since it has the highest priority.
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.93 loncom/interface/loncoursedata.pm:1.94
--- loncom/interface/loncoursedata.pm:1.93 Tue Sep 30 11:34:34 2003
+++ loncom/interface/loncoursedata.pm Tue Sep 30 11:35:56 2003
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursedata.pm,v 1.93 2003/09/30 15:34:34 matthew Exp $
+# $Id: loncoursedata.pm,v 1.94 2003/09/30 15:35:56 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1433,6 +1433,13 @@
chop $store_performance_command;
chop $store_performance_command;
my $start = Time::HiRes::time;
+ $dbh->do($store_performance_command);
+ if ($dbh->err()) {
+ &Apache::lonnet::logthis(' bigass insert error:'.$dbh->errstr());
+ &Apache::lonnet::logthis('command = '.$store_performance_command);
+ $returnstatus = 'error: unable to insert performance into database';
+ return ($returnstatus,$student_data);
+ }
$dbh->do($store_parameters_command) if ($num_parameters>0);
if ($dbh->err()) {
&Apache::lonnet::logthis(' bigass insert error:'.$dbh->errstr());
@@ -1440,13 +1447,6 @@
&Apache::lonnet::logthis('rows_stored = '.$rows_stored);
&Apache::lonnet::logthis('student_id = '.$student_id);
$returnstatus = 'error: unable to insert parameters into database';
- return ($returnstatus,$student_data);
- }
- $dbh->do($store_performance_command);
- if ($dbh->err()) {
- &Apache::lonnet::logthis(' bigass insert error:'.$dbh->errstr());
- &Apache::lonnet::logthis('command = '.$store_performance_command);
- $returnstatus = 'error: unable to insert performance into database';
return ($returnstatus,$student_data);
}
$elapsed += Time::HiRes::time - $start;