--- loncom/xml/scripttag.pm 2004/07/15 16:43:37 1.113 +++ loncom/xml/scripttag.pm 2005/02/18 05:38:05 1.121 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Script Vars
"; + $result.= "');newWindow.document.close();} +// --> +Script Vars
"; } } elsif ($target eq "edit" ) { #&Apache::run::run($bodytext,$safeeval); @@ -138,7 +141,7 @@ sub start_script { } } else { my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser); - if ($target ne "meta") { + if ($target ne "meta" && $target ne 'tex') { $result = $token->[4]; $result.=$bodytext; } @@ -152,7 +155,7 @@ 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") { + if ($type ne "loncapa/perl" && $target ne 'tex') { return $token->[2]; } elsif ($target eq 'edit' ) { return &Apache::edit::end_table(); @@ -164,7 +167,7 @@ sub end_script { sub start_display { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; - + @Apache::scripttag::parser_env = @_; my $result; if ( $target eq "modified" ) { @@ -179,7 +182,10 @@ sub start_display { $result=&Apache::run::run($bodytext,$safeeval); if ($target eq 'grade' || $target eq 'answer' || $target eq 'analyze') { - $result=''; # grade should produce no output + # grade/answer/analyxe should produce no output but if we + # are redirecting, the redirecter should know what to do + # with the output + if (!$Apache::lonxml::redirection) { $result=''; } } $Apache::lonxml::post_evaluate=0; } elsif ($target eq "edit" ) { @@ -392,7 +398,8 @@ sub end_import { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; pop(@Apache::inputtags::import); my $result; - if ($target eq 'edit' ) { $result=&Apache::edit::end_table(); } + if ($target eq 'edit' ) { $result=&Apache::edit::end_row. + &Apache::edit::end_table(); } return $result; }