--- loncom/xml/scripttag.pm 2001/01/04 19:15:02 1.29
+++ loncom/xml/scripttag.pm 2001/02/19 20:43:00 1.33
@@ -10,7 +10,7 @@ use Apache::lonnet;
sub BEGIN {
&Apache::lonxml::register('Apache::scripttag',('script','scriptlib',
'parserlib','import',
- 'footnote','display'));
+ 'window','display'));
}
sub start_script {
@@ -24,12 +24,11 @@ sub start_script {
my $bodytext=&Apache::lonxml::get_all_text("/script",$$parser[$#$parser]);
if ( $target eq "modified" ) {
-
} elsif ( $target eq "web" || $target eq "grade" ) {
&Apache::run::run($bodytext,$safeeval);
} elsif ($target eq "edit" ) {
&Apache::run::run($bodytext,$safeeval);
- $result="
<$token->[1]> output:
$bodytext
Source:
";
+ $result="
<$token->[1]> output:
$bodytext
Source:
";
$result.=&editfield($token->[1],$bodytext);
}
} else {
@@ -67,7 +66,7 @@ sub start_display {
}
if ($target eq "edit" ) {
$result =
- "
<$token->[1]> output:
$bodytext
Source:
";
+ "
<$token->[1]> output:
$bodytext
Source:
";
$result.=&editfield($token->[1],$bodytext);
}
return $result;
@@ -91,7 +90,7 @@ sub start_scriptlib {
return "";
}
&Apache::run::run($script,$safeeval);
- #&Apache::lonxml::debug("ran $bodytext:
".&Apache::lonnet::getfile($bodytext)."
");
+ #&Apache::lonxml::debug("ran $bodytext:
".&Apache::lonnet::getfile($bodytext)."
");
if ($target eq "edit" ) {
$result.=&editfield($token->[1],$bodytext);
@@ -127,19 +126,26 @@ sub start_parserlib {
sub end_parserlib {
}
-sub start_footnote {
+sub start_window {
my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
my $result = '';
- $Apache::lonxml::redirection = 0;
+ if ($target eq 'web') {
+ $Apache::lonxml::redirection = 0;
+ }
return $result;
}
-sub end_footnote {
+sub end_window {
my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
- $Apache::lonxml::outputstack =~ s/\"/\"\;/g;
- my $result = "newwindow $Apache::lonxml::outputstack