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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 15 Dec 2005 19:00:38 -0000


albertel		Thu Dec 15 14:00:38 2005 EDT

  Modified files:              
    /loncom/xml	scripttag.pm 
  Log:
  - <parse> was spewing output in answer mode
  
  
Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.133 loncom/xml/scripttag.pm:1.134
--- loncom/xml/scripttag.pm:1.133	Thu Dec  1 13:46:17 2005
+++ loncom/xml/scripttag.pm	Thu Dec 15 14:00:36 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # <script> definiton
 #
-# $Id: scripttag.pm,v 1.133 2005/12/01 18:46:17 albertel Exp $
+# $Id: scripttag.pm,v 1.134 2005/12/15 19:00:36 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -545,6 +545,13 @@
 	}
 	@Apache::scripttag::parser_env = @_;
 	$result=&Apache::run::run("return &xmlparse(q\0$inside\0);",$safeeval);
+	if ($target eq 'grade' || $target eq 'answer' ||
+	    $target eq 'analyze') {
+	    # grade/answer/analyxe should produce no output but if we
+	    # are redirecting, the redirecter should know what to do
+	    # with the output
+	    if (!$Apache::lonxml::redirection) { $result=''; }
+	}
     }
     return $result;
 }