[LON-CAPA-cvs] cvs: loncom(version_2_5_X) /xml lonxml.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Wed, 05 Sep 2007 01:03:21 -0000


albertel		Tue Sep  4 21:03:21 2007 EDT

  Modified files:              (Branch: version_2_5_X)
    /loncom/xml	lonxml.pm 
  Log:
  - backport 1.455
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.449 loncom/xml/lonxml.pm:1.449.2.1
--- loncom/xml/lonxml.pm:1.449	Fri Aug  3 19:29:54 2007
+++ loncom/xml/lonxml.pm	Tue Sep  4 21:03:21 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.449 2007/08/03 23:29:54 albertel Exp $
+# $Id: lonxml.pm,v 1.449.2.1 2007/09/05 01:03:21 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1514,9 +1514,13 @@
 						    ['editmode']);
 	}
 	if (!$env{'form.editmode'} || $env{'form.viewmode'} || $env{'form.discardview'}) {
+	    &Apache::structuretags::reset_problem_globals();
 	    $result = &Apache::lonxml::xmlparse($request,$target,$filecontents,
 						'',%mystyle);
-	    undef($Apache::lonhomework::parsing_a_task);
+	    # .html files may contain <problem> or <Task> need to clean
+	    # up if it did
+	    &Apache::structuretags::reset_problem_globals();
+	    &Apache::lonhomework::finished_parsing();
 	    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
 						    ['rawmode']);
 	    if ($env{'form.rawmode'}) { $result = $filecontents; }