--- loncom/xml/scripttag.pm 2001/06/02 03:59:59 1.40 +++ loncom/xml/scripttag.pm 2001/06/26 21:45:58 1.41 @@ -20,15 +20,15 @@ sub start_script { &Apache::lonxml::debug("found type of $type"); if ($type eq "loncapa/perl") { my $bodytext=&Apache::lonxml::get_all_text("/script",$$parser[$#$parser]); - if ( $target eq "modified" ) { - $result=$token->[4].$bodytext; + $result=$token->[4].&Apache::edit::modifiedfield(); } elsif ( $target eq "web" || $target eq "grade" ) { &Apache::run::run($bodytext,$safeeval); } elsif ($target eq "edit" ) { - &Apache::run::run($bodytext,$safeeval); - $result="
<$token->[1]> output:
$bodytext
Source:
"; - $result.=&Apache::edit::editfield($token->[1],$bodytext,'',50,5); + #&Apache::run::run($bodytext,$safeeval); + #$result="
<$token->[1]> output:
$bodytext
Source:
"; + $result=&Apache::edit::tag_start($target,$token,'Script'); + $result.=&Apache::edit::editfield($token->[1],$bodytext,'',50,4); } } else { if ($target ne "meta") { $result = $token->[4]; } @@ -43,6 +43,7 @@ sub end_script { my $result=''; #other script blocks need to survive if ($type ne "loncapa/perl") { return $token->[2]; } + if ($target eq 'edit' ) { return &Apache::edit::end_table(); } return ''; }