--- loncom/xml/lonxml.pm 2005/12/08 19:37:05 1.393 +++ loncom/xml/lonxml.pm 2005/12/20 20:32:55 1.394 @@ -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 @@ sub xmlparse { &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 latex_special_symbols { } 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 @@ sub inner_xmlparse { # $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();