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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 30 Oct 2002 23:37:57 -0000


albertel		Wed Oct 30 18:37:57 2002 EDT

  Modified files:              
    /loncom/xml	scripttag.pm 
  Log:
  - Whoops, forgot to add the defaul_homework.lcpm loading to the <display> tag
  
  
Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.79 loncom/xml/scripttag.pm:1.80
--- loncom/xml/scripttag.pm:1.79	Mon Oct 21 16:31:06 2002
+++ loncom/xml/scripttag.pm	Wed Oct 30 18:37:57 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # <script> definiton
 #
-# $Id: scripttag.pm,v 1.79 2002/10/21 20:31:06 albertel Exp $
+# $Id: scripttag.pm,v 1.80 2002/10/30 23:37:57 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -114,11 +114,14 @@
   } elsif ( $target eq 'web' || $target eq 'tex' ||
 	    $target eq 'grade' || $target eq 'answer' ||
 	      $target eq 'analyze') {
-    $result=&Apache::run::run($bodytext,$safeeval);
-    if ($target eq 'grade' || $target eq 'answer' ||
-	      $target eq 'analyze') {
-      $result=''; # grade should produce no output
-    }
+      if (!$Apache::lonxml::default_homework_loaded) {
+	  &Apache::lonxml::default_homework_load($safeeval);
+      }
+      $result=&Apache::run::run($bodytext,$safeeval);
+      if ($target eq 'grade' || $target eq 'answer' ||
+	  $target eq 'analyze') {
+	  $result=''; # grade should produce no output
+      }
   } elsif ($target eq "edit" ) {
     #$result = 
     #  "<br /> &lt;$token->[1]&gt; output: <br />$bodytext<br />Source:<br />";