[LON-CAPA-cvs] cvs: loncom /xml run.pm scripttag.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 18 Jun 2003 21:04:42 -0000
albertel Wed Jun 18 17:04:42 2003 EDT
Modified files:
/loncom/xml scripttag.pm run.pm
Log:
- IS can't handle multi 1000 character hrefs.
Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.98 loncom/xml/scripttag.pm:1.99
--- loncom/xml/scripttag.pm:1.98 Wed Jun 18 16:36:32 2003
+++ loncom/xml/scripttag.pm Wed Jun 18 17:04:42 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# <script> definiton
#
-# $Id: scripttag.pm,v 1.98 2003/06/18 20:36:32 albertel Exp $
+# $Id: scripttag.pm,v 1.99 2003/06/18 21:04:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -99,11 +99,13 @@
($ENV{'form.answer_output_mode'} ne 'tex') &&
($Apache::lonhomework::viewgrades == 'F')) {
$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="#FFFFFF"><pre>";
- my $listing= &HTML::Entities::encode(&Apache::run::dump($target,$safeeval));
-
+ $result.="<script type=\"text/javascript\"> function LONCAPA_scriptvars_$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=500,height=200,scrollbars=1');newWindow.document.open('text/html','replace');newWindow.document.writeln('<html><head><title>Script Vars</title></head><body bgcolor=\"#FFFFFF\"><pre>";
+ my $listing=&Apache::run::dump($target,$safeeval);
+ $listing=~s/\'/\\\'/g;
+ $listing=~s/\n/\\n/g;
+ $listing=~s/\r/\\r/g;
$result.=$listing;
- $result.= "</pre></body></html>\');newWindow.document.close();void(0);\">Script Vars</a><br />";
+ $result.= "</pre></body></html>');newWindow.document.close();}</script><a href=\"javascript:LONCAPA_scriptvars_$Apache::lonxml::curdepth();void(0);\">Script Vars</a><br />";
}
} elsif ($target eq "edit" ) {
#&Apache::run::run($bodytext,$safeeval);
Index: loncom/xml/run.pm
diff -u loncom/xml/run.pm:1.38 loncom/xml/run.pm:1.39
--- loncom/xml/run.pm:1.38 Mon Jun 9 17:45:23 2003
+++ loncom/xml/run.pm Wed Jun 18 17:04:42 2003
@@ -1,6 +1,6 @@
package Apache::run;
#
-# $Id: run.pm,v 1.38 2003/06/09 21:45:23 albertel Exp $
+# $Id: run.pm,v 1.39 2003/06/18 21:04:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -130,7 +130,7 @@
$symname.'{$_} } sort keys %'.
$symname.')').")"
}
- if ($line ne '') { $dump.=&HTML::Entities::encode($line)."<br />\n"; }
+ if ($line ne '') { $dump.=&HTML::Entities::encode($line)."<br />"; }
}
}
$dump.='';