Annotation of loncom/homework/hint.pm, revision 1.1
1.1 ! albertel 1: package Apache::hinttags;
! 2:
! 3: use strict;
! 4: use Apache::lonnet;
! 5:
! 6: sub BEGIN {
! 7: &Apache::lonxml::register('Apache::hinttags',('hintgroup','hintpart'));
! 8: }
! 9:
! 10: #currently hintgroup has no purpose
! 11: sub start_hintgroup {
! 12: }
! 13:
! 14: sub end_hintgroup {
! 15: }
! 16:
! 17: sub start_hintpart {
! 18: my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
! 19:
! 20: my $show ='0';
! 21: if ($target ne 'meta' && $target ne 'grade') {
! 22: my $args ='';
! 23: if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }
! 24: my $on = &Apache::run::run("{$args;".'return $on}',$safeeval);
! 25: if ( $on eq 'default') {
! 26: $show='1';
! 27: } else {
! 28: my (%results) = &Apache::run::run("{$args; return ".'\%'.$on,$safeeval);
! 29: my $key;
! 30: foreach $key (keys %results) {
! 31: &Apache::lonxml::debug("Got $key");
! 32: }
! 33: }
! 34: if (!$show) {
! 35: &Apache::lonxml::get_all_text("/problem",$$parser[$#$parser]);
! 36: }
! 37: } else {
! 38: &Apache::lonxml::get_all_text("/problem",$$parser[$#$parser]);
! 39: }
! 40: return '';
! 41: }
! 42:
! 43: sub end_hintpart {
! 44: }
! 45:
! 46: 1;
! 47: __END__
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>