package Apache::hinttags;
use strict;
use Apache::lonnet;
sub BEGIN {
&Apache::lonxml::register('Apache::hinttags',('hintgroup','hintpart'));
}
#currently hintgroup has no purpose
sub start_hintgroup {
}
sub end_hintgroup {
}
sub start_hintpart {
my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
my $show ='0';
if ($target ne 'meta' && $target ne 'grade') {
my $args ='';
if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }
my $on = &Apache::run::run("{$args;".'return $on}',$safeeval);
if ( $on eq 'default') {
$show='1';
} else {
my (%results) = &Apache::run::run("{$args; return ".'\%'.$on,$safeeval);
my $key;
foreach $key (keys %results) {
&Apache::lonxml::debug("Got $key");
}
}
if (!$show) {
&Apache::lonxml::get_all_text("/problem",$$parser[$#$parser]);
}
} else {
&Apache::lonxml::get_all_text("/problem",$$parser[$#$parser]);
}
return '';
}
sub end_hintpart {
}
1;
__END__
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>