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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 03 May 2002 22:28:36 -0000


albertel		Fri May  3 18:28:36 2002 EDT

  Modified files:              
    /loncom/xml	scripttag.pm 
  Log:
  - fixes BUG#228, answers can be generated while not in CSTR
  
  
Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.72 loncom/xml/scripttag.pm:1.73
--- loncom/xml/scripttag.pm:1.72	Thu Apr 25 13:37:23 2002
+++ loncom/xml/scripttag.pm	Fri May  3 18:28:36 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # <script> definiton
 #
-# $Id: scripttag.pm,v 1.72 2002/04/25 17:37:23 matthew Exp $
+# $Id: scripttag.pm,v 1.73 2002/05/03 22:28:36 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -63,6 +63,7 @@
 	$Apache::lonxml::evaluate--;
 	$result.="<a href=\"javascript:newWindow=open(\'\',\'new_W\',\'width=500,height=200,scrollbars=1\');newWindow.document.open(\'text/html\',\'replace\');newWindow.document.writeln(\'<html><head><title>newwindow</title></head><body bgcolor=&quot;#FFFFFF&quot;><pre>";
 	my $listing= &HTML::Entities::encode(&Apache::run::dump($target,$safeeval));
+	
 	$result.=$listing;
 	$result.= "</pre></body></html>\');newWindow.document.close();void(0);\">Script Vars</a><br />";
       }
@@ -92,7 +93,7 @@
     return $token->[2];
   } elsif ($target eq 'edit' ) {
     return &Apache::edit::end_table();
-  } elsif (($ENV{'request.state'} eq 'construct') && ($target eq 'answer')) {
+  } elsif (($target eq 'answer')) {
     $Apache::lonxml::evaluate++;
   }
   return '';