Diff for /loncom/xml/scripttag.pm between versions 1.86 and 1.91

version 1.86, 2003/02/24 23:32:32 version 1.91, 2003/05/28 21:05:33
Line 50  BEGIN { Line 50  BEGIN {
   
 sub start_LONCAPA_INTERNAL_TURN_STYLE_ON {  sub start_LONCAPA_INTERNAL_TURN_STYLE_ON {
     $Apache::lonxml::usestyle=1;      $Apache::lonxml::usestyle=1;
       $Apache::lonxml::style_values='';
     return ('','no');      return ('','no');
 }  }
   
 sub end_LONCAPA_INTERNAL_TURN_STYLE_ON {  sub end_LONCAPA_INTERNAL_TURN_STYLE_ON {
       my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
       my $end=&Apache::lonxml::get_param('end',$parstack,$safeeval);
       if (defined($end)) {
    &Apache::lonxml::end_tag($tagstack,$parstack,$token);
       }
     return ('','no');      return ('','no');
 }  }
   
Line 89  sub start_script { Line 95  sub start_script {
     &Apache::lonxml::default_homework_load($safeeval);      &Apache::lonxml::default_homework_load($safeeval);
  }   }
  &Apache::run::run($bodytext,$safeeval);   &Apache::run::run($bodytext,$safeeval);
  if (($target eq 'answer') && ($Apache::lonhomework::viewgrades == 'F')) {   if (($target eq 'answer') &&
       ($ENV{'form.answer_output_mode'} ne 'tex') &&
       ($Apache::lonhomework::viewgrades == 'F')) {
     $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(\'&lt;html&gt;&lt;head&gt;&lt;title&gt;newwindow&lt;/title&gt;&lt;/head&gt;&lt;body bgcolor=&quot;#FFFFFF&quot;&gt;&lt;pre&gt;";      $result.="<a href=\"javascript:newWindow=open(\'\',\'new_W\',\'width=500,height=200,scrollbars=1\');newWindow.document.open(\'text/html\',\'replace\');newWindow.document.writeln(\'&lt;html&gt;&lt;head&gt;&lt;title&gt;newwindow&lt;/title&gt;&lt;/head&gt;&lt;body bgcolor=&quot;#FFFFFF&quot;&gt;&lt;pre&gt;";
     my $listing= &HTML::Entities::encode(&Apache::run::dump($target,$safeeval));      my $listing= &HTML::Entities::encode(&Apache::run::dump($target,$safeeval));
Line 308  sub start_import { Line 316  sub start_import {
     my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval);      my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval);
     if (!$id) { $id=$Apache::lonxml::curdepth; }      if (!$id) { $id=$Apache::lonxml::curdepth; }
     push(@Apache::inputtags::import,$id);      push(@Apache::inputtags::import,$id);
     &Apache::lonxml::newparser($parser,\$file,$dir);      push(@Apache::inputtags::importlist,$id);
   
    &Apache::lonxml::newparser($parser,\$file,$dir);
   
   } elsif ($target eq "edit" ) {    } elsif ($target eq "edit" ) {
     $result.=&Apache::edit::tag_start($target,$token);      $result.=&Apache::edit::tag_start($target,$token);
     $result.=&Apache::edit::editline($token->[1],$bodytext,'',40);      $result.=&Apache::edit::editline($token->[1],$bodytext,'',40);
Line 427  sub end_comment { Line 438  sub end_comment {
   
 sub xmlparse {  sub xmlparse {
   my ($string) = @_;    my ($string) = @_;
   &Apache::lonxml::debug("Got $string");  #  &Apache::lonxml::debug("Got $string");
   my ($target,$token,$tagstack,$parstack,$oldparser,$safeeval,$style)=    my ($target,$token,$tagstack,$parstack,$oldparser,$safeeval,$style)=
     @Apache::scripttag::parser_env;      @Apache::scripttag::parser_env;
   my @parser;    my @parser;

Removed from v.1.86  
changed lines
  Added in v.1.91


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