Diff for /loncom/xml/scripttag.pm between versions 1.54 and 1.55

version 1.54, 2001/10/13 06:00:04 version 1.55, 2001/10/14 05:08:09
Line 34  sub start_script { Line 34  sub start_script {
     } elsif ( $target eq 'web' || $target eq 'tex' ||      } elsif ( $target eq 'web' || $target eq 'tex' ||
       $target eq 'grade' || $target eq 'answer') {        $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')) {        if (($ENV{'request.state'} eq 'construct') && ($target eq 'answer')) {
  $Apache::lonxml::evaluate--;   $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>";   $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);   my $listing= &Apache::run::dump($target,$safeeval);
  $listing =~ s/\n/\\n/g;   $listing =~ s/\n/\\n/g;
  $result.=$listing;   $result.=$listing;
  $result.= "</pre></body></html>\');newWindow.document.close();void(0);\">Script Vars</a>";   $result.= "</pre></body></html>\');newWindow.document.close();void(0);\">Script Vars</a><br />";
       }        }
     } elsif ($target eq "edit" ) {      } elsif ($target eq "edit" ) {
       #&Apache::run::run($bodytext,$safeeval);        #&Apache::run::run($bodytext,$safeeval);
Line 64  sub end_script { Line 64  sub end_script {
     return $token->[2];      return $token->[2];
   } elsif ($target eq 'edit' ) {    } elsif ($target eq 'edit' ) {
     return &Apache::edit::end_table();      return &Apache::edit::end_table();
   } elsif (($ENV{'request.state'} eq 'construct') && ($target eq 'web')) {    } elsif (($ENV{'request.state'} eq 'construct') && ($target eq 'answer')) {
     $Apache::lonxml::evaluate++;      $Apache::lonxml::evaluate++;
   }    }
   return '';    return '';
Line 81  sub start_display { Line 81  sub start_display {
   } elsif ( $target eq 'web' || $target eq 'tex' ||    } elsif ( $target eq 'web' || $target eq 'tex' ||
     $target eq 'grade' || $target eq 'answer') {      $target eq 'grade' || $target eq 'answer') {
     $result=&Apache::run::run($bodytext,$safeeval);      $result=&Apache::run::run($bodytext,$safeeval);
     if ($target eq 'grade' ) {      if ($target eq 'grade' || $target eq 'answer' ) {
       $result=''; # grade should produce no output        $result=''; # grade should produce no output
     }      }
   } elsif ($target eq "edit" ) {    } elsif ($target eq "edit" ) {

Removed from v.1.54  
changed lines
  Added in v.1.55


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