--- loncom/xml/scripttag.pm 2001/10/03 13:34:00 1.52 +++ loncom/xml/scripttag.pm 2001/10/05 22:29:10 1.53 @@ -33,6 +33,14 @@ sub start_script { $result=$token->[4].&Apache::edit::modifiedfield(); } elsif ( $target eq "web" || $target eq "grade" || $target eq 'answer') { &Apache::run::run($bodytext,$safeeval); + if (($ENV{'request.state'} eq 'construct') && ($target eq 'web')) { + $Apache::lonxml::evaluate--; + $result.="newwindow
";
+	my $listing= &Apache::run::dump($target,$safeeval);
+	$listing =~ s/\n/\\n/g;
+	$result.=$listing;
+	$result.= "
\');newWindow.document.close();void(0);\">Script Vars
"; + } } elsif ($target eq "edit" ) { #&Apache::run::run($bodytext,$safeeval); #$result="
<$token->[1]> output:
$bodytext
Source:
"; @@ -51,8 +59,13 @@ sub end_script { my $type = &Apache::lonxml::get_param('type',$parstack,$safeeval); my $result=''; #other script blocks need to survive - if ($type ne "loncapa/perl") { return $token->[2]; } - if ($target eq 'edit' ) { return &Apache::edit::end_table(); } + if ($type ne "loncapa/perl") { + return $token->[2]; + } elsif ($target eq 'edit' ) { + return &Apache::edit::end_table(); + } elsif (($ENV{'request.state'} eq 'construct') && ($target eq 'web')) { + $Apache::lonxml::evaluate++; + } return ''; }