--- loncom/xml/scripttag.pm 2001/10/05 22:29:10 1.53 +++ loncom/xml/scripttag.pm 2001/10/14 05:08:09 1.55 @@ -31,15 +31,16 @@ sub start_script { my $bodytext=&Apache::lonxml::get_all_text("/script",$$parser[$#$parser]); if ( $target eq "modified" ) { $result=$token->[4].&Apache::edit::modifiedfield(); - } elsif ( $target eq "web" || $target eq "grade" || $target eq 'answer') { + } elsif ( $target eq 'web' || $target eq 'tex' || + $target eq 'grade' || $target eq 'answer') { &Apache::run::run($bodytext,$safeeval); - if (($ENV{'request.state'} eq 'construct') && ($target eq 'web')) { + if (($ENV{'request.state'} eq 'construct') && ($target eq 'answer')) { $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
"; + $result.= "\');newWindow.document.close();void(0);\">Script Vars
"; } } elsif ($target eq "edit" ) { #&Apache::run::run($bodytext,$safeeval); @@ -63,7 +64,7 @@ sub end_script { return $token->[2]; } elsif ($target eq 'edit' ) { return &Apache::edit::end_table(); - } elsif (($ENV{'request.state'} eq 'construct') && ($target eq 'web')) { + } elsif (($ENV{'request.state'} eq 'construct') && ($target eq 'answer')) { $Apache::lonxml::evaluate++; } return ''; @@ -77,9 +78,10 @@ sub start_display { if ( $target eq "modified" ) { $result=$token->[4].&Apache::edit::modifiedfield(); - } elsif ( $target eq "web" || $target eq "grade" || $target eq 'answer') { + } elsif ( $target eq 'web' || $target eq 'tex' || + $target eq 'grade' || $target eq 'answer') { $result=&Apache::run::run($bodytext,$safeeval); - if ($target eq 'grade' ) { + if ($target eq 'grade' || $target eq 'answer' ) { $result=''; # grade should produce no output } } elsif ($target eq "edit" ) {