--- loncom/xml/scripttag.pm 2000/12/21 18:12:12 1.28 +++ loncom/xml/scripttag.pm 2001/01/04 19:15:02 1.29 @@ -16,9 +16,7 @@ sub BEGIN { sub start_script { my ($target,$token,$parstack,$parser,$safeeval)=@_; my $args =''; - if ( $#$parstack > -1 ) { - $args=$$parstack[$#$parstack]; - } + if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } my $type = &Apache::run::run("{$args;".'return $type}',$safeeval); my $result=''; #&Apache::lonxml::debug("found type of $type"); @@ -43,7 +41,12 @@ sub start_script { sub end_script { my ($target,$token,$parstack,$parser,$safeeval)=@_; if ( $target eq "meta" ) { return ''; } -# return $token->[2]; + my $args =''; + if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } + my $type = &Apache::run::run("{$args;".'return $type}',$safeeval); + my $result=''; + #other script blocks need to survive + if ($type ne "loncapa/perl") { return $token->[2]; } return ''; }