[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /xml scripttag.pm

raeburn raeburn at source.lon-capa.org
Mon Apr 6 12:55:46 EDT 2015


raeburn		Mon Apr  6 16:55:46 2015 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/xml	scripttag.pm 
  Log:
  - For 2.11
    Backport 1.174
  
  
Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.172 loncom/xml/scripttag.pm:1.172.2.1
--- loncom/xml/scripttag.pm:1.172	Mon Aug 25 00:20:19 2014
+++ loncom/xml/scripttag.pm	Mon Apr  6 16:55:46 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # <script> definiton
 #
-# $Id: scripttag.pm,v 1.172 2014/08/25 00:20:19 raeburn Exp $
+# $Id: scripttag.pm,v 1.172.2.1 2015/04/06 16:55:46 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -645,12 +645,14 @@
 
 sub start_physnet {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
-    my $bodytext = '/adm/includes/physnet.sty';
+    my $bodytext = '/res/adm/includes/physnet.sty';
     my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],$bodytext);
     my $cbistyletext=&Apache::lonnet::getfile($location);
 
     %$style = (%$style,&Apache::style::styleparser($target,$cbistyletext));
-    $$parser['-1']->unget_token($token);
+    if (keys(%$style) && (($target eq 'web') || ($target eq 'tex'))) {
+        $$parser['-1']->unget_token($token);
+    }
 #    if ( defined($$style{'physnet'}) ) {
 #        &Apache::lonxml::newparser($parser,\$$style{'physnet'});
 #    }




More information about the LON-CAPA-cvs mailing list