File:
[LON-CAPA] /
loncom /
homework /
structuretags.pm
Revision
1.3:
download - view:
text,
annotated -
select for diffs
Wed Aug 16 18:32:58 2000 UTC (23 years, 8 months ago) by
albertel
Branches:
MAIN
CVS tags:
HEAD
- implemented new get_all_text,
actually works like I'd like $parser->get_text() to.
- started on edit/modified tags
- notice both get_all_text and increasedepth/decresedepth don't like broken
documents, and they aren't very hardy.
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: # print "<br>$code<br>";
21: my $result = &Apache::run::run($code,$safeeval);
22: if ( ! $result ) {
23: # my $skip=$$parser[$#$parser]->get_text("/block");
24: my $skip=&Apache::lonxml::get_all_text("block",$$parser[$#$parser]);
25: # print "skipped $skip";
26: }
27: return "";
28: }
29:
30: sub end_block {
31: }
32:
33: 1;
34: __END__
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>