[LON-CAPA-cvs] cvs: loncom /homework bridgetask.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 11 Oct 2006 21:06:51 -0000


albertel		Wed Oct 11 17:06:51 2006 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm 
  Log:
  - was occasionally doing two stores (if a new instance got picked during the grading phase)
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.183 loncom/homework/bridgetask.pm:1.184
--- loncom/homework/bridgetask.pm:1.183	Wed Oct 11 14:54:33 2006
+++ loncom/homework/bridgetask.pm	Wed Oct 11 17:06:49 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.183 2006/10/11 18:54:33 albertel Exp $
+# $Id: bridgetask.pm,v 1.184 2006/10/11 21:06:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1102,8 +1102,6 @@
 	    if ($award eq 'SUBMITTED') {
 		&add_to_queue('gradingqueue',\%queue_data);
 	    }
-	} elsif ($Apache::lonhomework::results{'INTERNAL_store'}) {
-	    &Apache::structuretags::finalize_storage();
 	}
 	if ($target eq 'grade' && $env{'form.webgrade'} eq 'yes' 
 	    && exists($env{'form.cancel'})) {
@@ -1214,6 +1212,10 @@
 	    &minimize_storage();
 	    &Apache::structuretags::finalize_storage();
 	}
+	if (exists($Apache::lonhomework::results{'INTERNAL_store'})) {
+	    # instance generation occured and hasn't yet been stored
+	    &Apache::structuretags::finalize_storage();
+	}
     } elsif ($target eq 'webgrade') {
 	$result.="</div>";
 	#$result.='<input type="submit" name="next" value="'.