Diff for /loncom/xml/scripttag.pm between versions 1.106 and 1.107

version 1.106, 2004/01/16 19:46:03 version 1.107, 2004/02/10 18:58:26
Line 109  sub start_script { Line 109  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' ||
       $target eq 'analyze' ) {        $target eq 'analyze' ) {
  my $bodytext=&Apache::lonxml::get_all_text("/script",$parser);   my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser);
  if (!$Apache::lonxml::default_homework_loaded) {   if (!$Apache::lonxml::default_homework_loaded) {
     &Apache::lonxml::default_homework_load($safeeval);      &Apache::lonxml::default_homework_load($safeeval);
  }   }
Line 129  sub start_script { Line 129  sub start_script {
     } 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 />";
  my $bodytext=&Apache::lonxml::get_all_text("/script",$parser);   my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser);
  $result=&Apache::edit::tag_start($target,$token,'Script');   $result=&Apache::edit::tag_start($target,$token,'Script');
  $result.=&Apache::edit::editfield($token->[1],$bodytext,'',80,4);   $result.=&Apache::edit::editfield($token->[1],$bodytext,'',80,4);
       } elsif ($target eq 'meta') {
    my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser);
     }      }
   } else {    } else {
     if ($target ne "meta") {      if ($target ne "meta") {
       $result = $token->[4];        $result = $token->[4];
       my $bodytext=&Apache::lonxml::get_all_text("/script",$parser);        my $bodytext=&Apache::lonxml::get_all_text_unblanaced("/script",$parser);
       $result.=$bodytext;        $result.=$bodytext;
     }      }
   }    }
Line 169  sub start_display { Line 171  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' ||
       $target eq 'analyze') {        $target eq 'analyze') {
       my $bodytext=&Apache::lonxml::get_all_text("/display",$parser);        my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/display",$parser);
       if (!$Apache::lonxml::default_homework_loaded) {        if (!$Apache::lonxml::default_homework_loaded) {
   &Apache::lonxml::default_homework_load($safeeval);    &Apache::lonxml::default_homework_load($safeeval);
       }        }
Line 180  sub start_display { Line 182  sub start_display {
       }        }
       $Apache::lonxml::post_evaluate=0;        $Apache::lonxml::post_evaluate=0;
   } elsif ($target eq "edit" ) {    } elsif ($target eq "edit" ) {
     my $bodytext=&Apache::lonxml::get_all_text("/display",$parser);      my $bodytext=&Apache::lonxml::get_all_text_unblanced("/display",$parser);
     #$result =       #$result = 
     #  "<br /> &lt;$token->[1]&gt; output: <br />$bodytext<br />Source:<br />";      #  "<br /> &lt;$token->[1]&gt; output: <br />$bodytext<br />Source:<br />";
     #$result.=&Apache::edit::editfield($token->[1],$bodytext,'',40,1);      #$result.=&Apache::edit::editfield($token->[1],$bodytext,'',40,1);
     $result=&Apache::edit::tag_start($target,$token,'Script With Display');      $result=&Apache::edit::tag_start($target,$token,'Script With Display');
     $result.=&Apache::edit::editfield($token->[1],$bodytext,'',80,1)      $result.=&Apache::edit::editfield($token->[1],$bodytext,'',80,1)
     } elsif ($target eq 'meta') {
         my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/display",$parser);
   }    }
   return $result;    return $result;
 }  }

Removed from v.1.106  
changed lines
  Added in v.1.107


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