File:  [LON-CAPA] / loncom / xml / scripttag.pm
Revision 1.2: download - view: text, annotated - select for diffs
Fri Jul 14 16:55:46 2000 UTC (23 years, 9 months ago) by albertel
Branches: MAIN
CVS tags: HEAD
- working implementation of the scripttag

# The LearningOnline Network with CAPA
# <script> definiton


package Apache::scripttag; 

use strict;

sub BEGIN {
  &Apache::lonxml::register('Apache::scripttag',('script'));
}

sub start_script {
  my ($target,$token,$parstack,$parser,$safeeval)=@_;
  
  my $result="";
  my $bodytext=$parser->get_text("/script");
  if ($target ne "edit" ) {
    &Apache::run::run($bodytext,$safeeval);
  } else {
    $result="<textarea>$bodytext</textarea>\n";
  }
  return $result;
}

sub end_script {
  my ($target,$token,@parstack)=@_;
}
1;
__END__

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