--- loncom/xml/scripttag.pm 2001/08/20 17:14:55 1.50 +++ loncom/xml/scripttag.pm 2001/09/18 02:21:13 1.51 @@ -31,7 +31,7 @@ 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" ) { + } elsif ( $target eq "web" || $target eq "grade" || $target eq 'answer') { &Apache::run::run($bodytext,$safeeval); } elsif ($target eq "edit" ) { #&Apache::run::run($bodytext,$safeeval); @@ -64,7 +64,7 @@ sub start_display { if ( $target eq "modified" ) { $result=$token->[4].&Apache::edit::modifiedfield(); - } elsif ( $target eq "web" || $target eq "grade" ) { + } elsif ( $target eq "web" || $target eq "grade" || $target eq 'answer') { $result=&Apache::run::run($bodytext,$safeeval); if ($target eq 'grade' ) { $result=''; # grade should produce no output @@ -91,7 +91,7 @@ sub start_scriptlib { my $result =''; my $error=''; - if ($target eq 'web' || $target eq 'grade' || $target eq 'meta' || $target eq 'edit') { + if ($target eq 'web' || $target eq 'grade' || $target eq 'meta' || $target eq 'edit' || $target eq 'answer') { $bodytext=$$parser[$#$parser]->get_text("/scriptlib"); $bodytext=&Apache::run::evaluate($bodytext,$safeeval, $$parstack[$#$parstack]); @@ -136,7 +136,7 @@ sub start_parserlib { my $bodytext; my $result =""; my $error=''; - if ($target eq 'web' || $target eq 'grade' || $target eq 'meta' || $target eq 'edit') { + if ($target eq 'web' || $target eq 'grade' || $target eq 'meta' || $target eq 'edit' || $target eq 'answer') { $bodytext=$$parser[$#$parser]->get_text("/parserlib"); $bodytext=&Apache::run::evaluate($bodytext,$safeeval, $$parstack[$#$parstack]); @@ -209,7 +209,7 @@ sub start_import { $bodytext=Apache::run::evaluate($bodytext,$safeeval,$$parstack[$#$parstack]); - if ($target eq 'web' || $target eq 'grade') { + if ($target eq 'web' || $target eq 'grade' || $target eq 'answer') { # FIXME this probably needs to be smart about construction vs. # non construction space. my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],$bodytext);