Diff for /loncom/xml/scripttag.pm between versions 1.50 and 1.51

version 1.50, 2001/08/20 17:14:55 version 1.51, 2001/09/18 02:21:13
Line 31  sub start_script { Line 31  sub start_script {
     my $bodytext=&Apache::lonxml::get_all_text("/script",$$parser[$#$parser]);      my $bodytext=&Apache::lonxml::get_all_text("/script",$$parser[$#$parser]);
     if ( $target eq "modified" ) {      if ( $target eq "modified" ) {
       $result=$token->[4].&Apache::edit::modifiedfield();        $result=$token->[4].&Apache::edit::modifiedfield();
     } elsif ( $target eq "web" || $target eq "grade" ) {      } elsif ( $target eq "web" || $target eq "grade" || $target eq 'answer') {
       &Apache::run::run($bodytext,$safeeval);        &Apache::run::run($bodytext,$safeeval);
     } elsif ($target eq "edit" ) {      } elsif ($target eq "edit" ) {
       #&Apache::run::run($bodytext,$safeeval);        #&Apache::run::run($bodytext,$safeeval);
Line 64  sub start_display { Line 64  sub start_display {
   
   if ( $target eq "modified" ) {    if ( $target eq "modified" ) {
     $result=$token->[4].&Apache::edit::modifiedfield();      $result=$token->[4].&Apache::edit::modifiedfield();
   } elsif ( $target eq "web" || $target eq "grade" ) {    } elsif ( $target eq "web" || $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' ) {
       $result=''; # grade should produce no output        $result=''; # grade should produce no output
Line 91  sub start_scriptlib { Line 91  sub start_scriptlib {
   my $result ='';    my $result ='';
   my $error='';    my $error='';
   
   if ($target eq 'web' || $target eq 'grade' || $target eq 'meta' || $target eq 'edit') {    if ($target eq 'web' || $target eq 'grade' || $target eq 'meta' || $target eq 'edit' || $target eq 'answer') {
     $bodytext=$$parser[$#$parser]->get_text("/scriptlib");      $bodytext=$$parser[$#$parser]->get_text("/scriptlib");
     $bodytext=&Apache::run::evaluate($bodytext,$safeeval,      $bodytext=&Apache::run::evaluate($bodytext,$safeeval,
      $$parstack[$#$parstack]);       $$parstack[$#$parstack]);
Line 136  sub start_parserlib { Line 136  sub start_parserlib {
   my $bodytext;    my $bodytext;
   my $result ="";    my $result ="";
   my $error='';    my $error='';
   if ($target eq 'web' || $target eq 'grade' || $target eq 'meta' || $target eq 'edit') {    if ($target eq 'web' || $target eq 'grade' || $target eq 'meta' || $target eq 'edit' || $target eq 'answer') {
     $bodytext=$$parser[$#$parser]->get_text("/parserlib");      $bodytext=$$parser[$#$parser]->get_text("/parserlib");
     $bodytext=&Apache::run::evaluate($bodytext,$safeeval,      $bodytext=&Apache::run::evaluate($bodytext,$safeeval,
      $$parstack[$#$parstack]);       $$parstack[$#$parstack]);
Line 209  sub start_import { Line 209  sub start_import {
   
   $bodytext=Apache::run::evaluate($bodytext,$safeeval,$$parstack[$#$parstack]);    $bodytext=Apache::run::evaluate($bodytext,$safeeval,$$parstack[$#$parstack]);
   
   if ($target eq 'web' || $target eq 'grade') {    if ($target eq 'web' || $target eq 'grade' || $target eq 'answer') {
     # FIXME this probably needs to be smart about construction vs.      # FIXME this probably needs to be smart about construction vs.
     # non construction space.      # non construction space.
     my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],$bodytext);      my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],$bodytext);

Removed from v.1.50  
changed lines
  Added in v.1.51


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