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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 02 Oct 2003 05:45:38 -0000


albertel		Thu Oct  2 01:45:38 2003 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  - this should fix going compute bound for style file redefinitons that causes reaches across intervening text,
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.282 loncom/xml/lonxml.pm:1.283
--- loncom/xml/lonxml.pm:1.282	Wed Oct  1 17:13:50 2003
+++ loncom/xml/lonxml.pm	Thu Oct  2 01:45:38 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.282 2003/10/01 21:13:50 albertel Exp $
+# $Id: lonxml.pm,v 1.283 2003/10/02 05:45:38 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -867,17 +867,13 @@
 
 sub get_all_text {
     my($tag,$pars,$style)= @_;
-    &Apache::lonxml::debug("Got a ".ref($pars));
     my $gotfullstack=1;
     if (ref($pars) ne 'ARRAY') {
 	$gotfullstack=0;
 	$pars=[$pars];
     }
-    &Apache::lonxml::debug("Got a ".ref($style));
     if (ref($style) ne 'HASH') {
 	$style={};
-    } else {
-	&Apache::lonhomework::showhash(%$style);
     }
     my $depth=0;
     my $token;
@@ -901,7 +897,7 @@
 		} elsif ($token->[0] eq 'E')  {
 		    if ( $token->[1] =~ /^$tag$/i) { $depth--; }
 		    #skip sending back the last end tag
-		    if ($depth == 0 && exists($$style{'/'.$token->[1]})) {
+		    if ($depth == 0 && exists($$style{'/'.$token->[1]}) && $Apache::lonxml::usestyle) {
 			my $string=
 			    '<LONCAPA_INTERNAL_TURN_STYLE_OFF end="yes" />'.
 				$$style{'/'.$token->[1]}.