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, 11 months ago) by albertel
Branches: MAIN
CVS tags: HEAD
- working implementation of the scripttag

    1: # The LearningOnline Network with CAPA
    2: # <script> definiton
    3: 
    4: 
    5: package Apache::scripttag; 
    6: 
    7: use strict;
    8: 
    9: sub BEGIN {
   10:   &Apache::lonxml::register('Apache::scripttag',('script'));
   11: }
   12: 
   13: sub start_script {
   14:   my ($target,$token,$parstack,$parser,$safeeval)=@_;
   15:   
   16:   my $result="";
   17:   my $bodytext=$parser->get_text("/script");
   18:   if ($target ne "edit" ) {
   19:     &Apache::run::run($bodytext,$safeeval);
   20:   } else {
   21:     $result="<textarea>$bodytext</textarea>\n";
   22:   }
   23:   return $result;
   24: }
   25: 
   26: sub end_script {
   27:   my ($target,$token,@parstack)=@_;
   28: }
   29: 1;
   30: __END__

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