--- loncom/xml/scripttag.pm 2003/01/13 22:18:34 1.84 +++ loncom/xml/scripttag.pm 2003/05/23 16:26:28 1.90 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # '; + } + return ('','no'); +} + +sub end_LONCAPA_INTERNAL_LONHTTPD_PORT { + return ('','no'); +} + sub start_script { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; @Apache::scripttag::parser_env = @_; @@ -73,7 +90,9 @@ sub start_script { &Apache::lonxml::default_homework_load($safeeval); } &Apache::run::run($bodytext,$safeeval); - if (($target eq 'answer') && ($Apache::lonhomework::viewgrades == 'F')) { + if (($target eq 'answer') && + ($ENV{'form.answer_output_mode'} ne 'tex') && + ($Apache::lonhomework::viewgrades == 'F')) { $Apache::lonxml::evaluate--; $result.="[4]; - my $bodytext=&Apache::lonxml::get_all_text("/script",$$parser[$#$parser]); + my $bodytext=&Apache::lonxml::get_all_text("/script",$parser); $result.=$bodytext; } } @@ -292,7 +311,10 @@ sub start_import { my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval); if (!$id) { $id=$Apache::lonxml::curdepth; } push(@Apache::inputtags::import,$id); - &Apache::lonxml::newparser($parser,\$file,$dir); + push(@Apache::inputtags::importlist,$id); + + &Apache::lonxml::newparser($parser,\$file,$dir); + } elsif ($target eq "edit" ) { $result.=&Apache::edit::tag_start($target,$token); $result.=&Apache::edit::editline($token->[1],$bodytext,'',40); @@ -365,7 +387,7 @@ sub start_standalone { my $result=''; if ($target eq 'web' ) { if ( $ENV{'request.course.id'} ) { - my $inside = &Apache::lonxml::get_all_text("/standalone",$$parser[-1]); + my $inside = &Apache::lonxml::get_all_text("/standalone",$parser); } else { $result='
'; } @@ -390,14 +412,14 @@ sub start_comment { my $result=''; if ($target eq 'edit') { $result=&Apache::edit::tag_start($target,$token); - my $bodytext=&Apache::lonxml::get_all_text("/comment",$$parser[$#$parser]); + my $bodytext=&Apache::lonxml::get_all_text("/comment",$parser); $result.=&Apache::edit::editfield($token->[1],$bodytext,'',80,4) } elsif ( $target eq 'modified') { $result=$token->[4].&Apache::edit::modifiedfield($token); } elsif ( $target eq 'web' || $target eq 'tex' || $target eq 'grade' || $target eq 'answer' || $target eq 'meta' || $target eq 'analyze') { #normally throw away comments - my $bodytext=&Apache::lonxml::get_all_text("/comment",$$parser[$#$parser]); + my $bodytext=&Apache::lonxml::get_all_text("/comment",$parser); } return $result; } @@ -411,7 +433,7 @@ sub end_comment { sub xmlparse { my ($string) = @_; - &Apache::lonxml::debug("Got $string"); +# &Apache::lonxml::debug("Got $string"); my ($target,$token,$tagstack,$parstack,$oldparser,$safeeval,$style)= @Apache::scripttag::parser_env; my @parser;