Diff for /loncom/xml/scripttag.pm between versions 1.52 and 1.53

version 1.52, 2001/10/03 13:34:00 version 1.53, 2001/10/05 22:29:10
Line 33  sub start_script { Line 33  sub start_script {
       $result=$token->[4].&Apache::edit::modifiedfield();        $result=$token->[4].&Apache::edit::modifiedfield();
     } elsif ( $target eq "web" || $target eq "grade" || $target eq 'answer') {      } elsif ( $target eq "web" || $target eq "grade" || $target eq 'answer') {
       &Apache::run::run($bodytext,$safeeval);        &Apache::run::run($bodytext,$safeeval);
         if (($ENV{'request.state'} eq 'construct') && ($target eq 'web')) {
    $Apache::lonxml::evaluate--;
    $result.="<a href=\"javascript:newWindow=open(\'\',\'new_W\',\'width=500,height=200,scrollbars=1\');newWindow.document.open(\'text/html\',\'replace\');newWindow.document.writeln(\'<html><head><title>newwindow</title></head><body bgcolor=&quot;#FFFFFF&quot;><pre>";
    my $listing= &Apache::run::dump($target,$safeeval);
    $listing =~ s/\n/\\n/g;
    $result.=$listing;
    $result.= "</pre></body></html>\');newWindow.document.close();void(0);\">Script Vars</a>";
         }
     } elsif ($target eq "edit" ) {      } elsif ($target eq "edit" ) {
       #&Apache::run::run($bodytext,$safeeval);        #&Apache::run::run($bodytext,$safeeval);
       #$result="<br /> &lt;$token->[1]&gt; output: <br />$bodytext<br />Source:<br />";        #$result="<br /> &lt;$token->[1]&gt; output: <br />$bodytext<br />Source:<br />";
Line 51  sub end_script { Line 59  sub end_script {
   my $type = &Apache::lonxml::get_param('type',$parstack,$safeeval);    my $type = &Apache::lonxml::get_param('type',$parstack,$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") {
   if ($target eq 'edit' ) { return &Apache::edit::end_table(); }      return $token->[2];
     } elsif ($target eq 'edit' ) {
       return &Apache::edit::end_table();
     } elsif (($ENV{'request.state'} eq 'construct') && ($target eq 'web')) {
       $Apache::lonxml::evaluate++;
     }
   return '';    return '';
 }  }
   

Removed from v.1.52  
changed lines
  Added in v.1.53


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