[LON-CAPA-cvs] cvs: loncom(version_2_5_X) /homework lonhomework.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Thu, 06 Sep 2007 14:41:01 -0000


albertel		Thu Sep  6 10:41:01 2007 EDT

  Modified files:              (Branch: version_2_5_X)
    /loncom/homework	lonhomework.pm 
  Log:
  - backport 1.273
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.268 loncom/homework/lonhomework.pm:1.268.2.1
--- loncom/homework/lonhomework.pm:1.268	Mon Jul 23 19:30:47 2007
+++ loncom/homework/lonhomework.pm	Thu Sep  6 10:41:00 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.268 2007/07/23 23:30:47 albertel Exp $
+# $Id: lonhomework.pm,v 1.268.2.1 2007/09/06 14:41:00 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -939,7 +939,7 @@
 	&Apache::lonxml::debug("Should be parsing now");
 	$result .= &Apache::lonxml::xmlparse($request, $target, $problem,
 					     &setup_vars($target),%mystyle);
-	undef($Apache::lonhomework::parsing_a_problem);
+	&finished_parsing();
 	if (!$output) { $result = ''; }
 	#$request->print("Result follows:");
 	if ($target eq 'modified') {
@@ -970,6 +970,11 @@
     }
 }
 
+sub finished_parsing {
+    undef($Apache::lonhomework::parsing_a_problem);
+    undef($Apache::lonhomework::parsing_a_task);
+}
+
 # with no arg it returns a HTML <option> list of the template titles
 # with one arg it returns the filename associated with the arg passed
 sub get_template_list {