Annotation of loncom/homework/structuretags.pm, revision 1.1

1.1     ! albertel    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>