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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Fri, 24 Oct 2008 18:23:22 -0000


raeburn		Fri Oct 24 18:23:22 2008 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  Stop evaluating variables included within <translated> blocks,  
    (Any required substitutions already occur elsewhere). 
  - Was causing subsitution of $m in expressions such as <m>$m$</m>
   (inside <translated> block) which resulted in LaTeX errors when generating printouts.
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.486 loncom/xml/lonxml.pm:1.487
--- loncom/xml/lonxml.pm:1.486	Thu Sep 11 14:47:24 2008
+++ loncom/xml/lonxml.pm	Fri Oct 24 18:23:22 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.486 2008/09/11 14:47:24 bisitz Exp $
+# $Id: lonxml.pm,v 1.487 2008/10/24 18:23:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -505,11 +505,13 @@
 	  if (!$Apache::lonxml::usestyle) {
 	      $extras=$Apache::lonxml::style_values;
 	  }
-	if ( $#$parstack > -1 ) {
-	  $result=&Apache::run::evaluate($result,$safeeval,$extras.$$parstack[-1]);
-	} else {
-	  $result= &Apache::run::evaluate($result,$safeeval,$extras);
-	}
+          if ($token->[1] ne 'translated') {
+	      if ( $#$parstack > -1 ) {
+	          $result=&Apache::run::evaluate($result,$safeeval,$extras.$$parstack[-1]);
+	      } else {
+	          $result= &Apache::run::evaluate($result,$safeeval,$extras);
+	      }
+          }
       }
       $Apache::lonxml::post_evaluate=1;