File:  [LON-CAPA] / loncom / homework / structuretags.pm
Revision 1.1: download - view: text, annotated - select for diffs
Tue Jul 25 21:27:30 2000 UTC (23 years, 9 months ago) by albertel
Branches: MAIN
CVS tags: HEAD
-started work on web target for homework tags
-lonhomework kinda works

    1: # The LearningOnline Network with CAPA
    2: # <script> definiton
    3: 
    4: 
    5: package Apache::structuretags; 
    6: 
    7: use strict;
    8: use Apache::lonnet;
    9: 
   10: sub BEGIN {
   11:   &Apache::lonxml::register('Apache::structuretags',('block'));
   12: }
   13: 
   14: sub start_block {
   15:   my ($target,$token,$parstack,$parser,$safeeval)=@_;
   16: 
   17:   my $code = @$parstack[$#$parstack];
   18:   $code =~ s/\"//g;
   19:   $code .=';return $condition;';
   20:   my $result = &Apache::run::run($code,$safeeval);
   21:   if ( ! $result ) { 
   22:     my $skip=$parser->get_text("/block");
   23:   }
   24:   return "";
   25: }
   26: 
   27: sub end_block {
   28: }
   29: 
   30: 1;
   31: __END__

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