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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 20 Dec 2005 20:32:55 -0000


albertel		Tue Dec 20 15:32:55 2005 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  - need to only do the grade mode endredirection once on the main intial inner_xmlparse call, not any reentrent calls to it
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.393 loncom/xml/lonxml.pm:1.394
--- loncom/xml/lonxml.pm:1.393	Thu Dec  8 14:37:05 2005
+++ loncom/xml/lonxml.pm	Tue Dec 20 15:32:55 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.393 2005/12/08 19:37:05 albertel Exp $
+# $Id: lonxml.pm,v 1.394 2005/12/20 20:32:55 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -364,7 +364,7 @@
  &initdepth();
  &init_alarm();
  my $finaloutput = &inner_xmlparse($target,\@stack,\@parstack,\@pars,
-				   $safeeval,\%style_for_target);
+				   $safeeval,\%style_for_target,1);
 
  if ($env{'request.uri'}) {
     &writeallows($env{'request.uri'});
@@ -411,7 +411,7 @@
 }
 
 sub inner_xmlparse {
-  my ($target,$stack,$parstack,$pars,$safeeval,$style_for_target)=@_;
+  my ($target,$stack,$parstack,$pars,$safeeval,$style_for_target,$start)=@_;
   my $finaloutput = '';
   my $result;
   my $token;
@@ -526,7 +526,7 @@
   #   $finaloutput.=&endredirection;
   # }
 
-  if ($target eq 'grade') { &endredirection(); }
+  if ( $start && $target eq 'grade') { &endredirection(); }
   if ( $Apache::lonxml::redirection > $startredirection) {
       while ($Apache::lonxml::redirection > $startredirection) {
 	  $finaloutput .= &endredirection();