Diff for /loncom/xml/scripttag.pm between versions 1.38 and 1.39

version 1.38, 2001/05/13 20:01:11 version 1.39, 2001/05/31 22:38:36
Line 15  sub BEGIN { Line 15  sub BEGIN {
   
 sub start_script {  sub start_script {
   my ($target,$token,$parstack,$parser,$safeeval)=@_;    my ($target,$token,$parstack,$parser,$safeeval)=@_;
   my $args ='';  
   if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }  
   my $type = &Apache::run::run("{$args;".'return $type}',$safeeval);  
   my $result='';    my $result='';
   #&Apache::lonxml::debug("found type of $type");    my $type= &Apache::lonxml::get_param('type',$parstack,$safeeval);
     &Apache::lonxml::debug("found type of $type");
   if ($type eq "loncapa/perl") {    if ($type eq "loncapa/perl") {
     my $bodytext=&Apache::lonxml::get_all_text("/script",$$parser[$#$parser]);      my $bodytext=&Apache::lonxml::get_all_text("/script",$$parser[$#$parser]);
           
Line 41  sub start_script { Line 39  sub start_script {
 sub end_script {  sub end_script {
   my ($target,$token,$parstack,$parser,$safeeval)=@_;    my ($target,$token,$parstack,$parser,$safeeval)=@_;
   if ( $target eq "meta" ) { return ''; }     if ( $target eq "meta" ) { return ''; } 
   my $args ='';    my $type = &Apache::lonxml::get_param('type',$parstack,$safeeval);
   if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }  
   my $type = &Apache::run::run("{$args;".'return $type}',$safeeval);  
   my $result='';    my $result='';
   #other script blocks need to survive    #other script blocks need to survive
   if ($type ne "loncapa/perl") { return $token->[2]; }    if ($type ne "loncapa/perl") { return $token->[2]; }
Line 52  sub end_script { Line 48  sub end_script {
   
 sub start_display {  sub start_display {
   my ($target,$token,$parstack,$parser,$safeeval)=@_;    my ($target,$token,$parstack,$parser,$safeeval)=@_;
   my $args ='';  
   if ( $#$parstack > -1 ) {  
     $args=$$parstack[$#$parstack];  
   }  
   my $bodytext=&Apache::lonxml::get_all_text("/display",$$parser[$#$parser]);    my $bodytext=&Apache::lonxml::get_all_text("/display",$$parser[$#$parser]);
     
   if ( $target eq "modified" ) {    if ( $target eq "modified" ) {
   }    }
   my $result=&Apache::run::run($bodytext,$safeeval);    my $result=&Apache::run::run($bodytext,$safeeval);

Removed from v.1.38  
changed lines
  Added in v.1.39


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>