--- loncom/homework/hint.pm 2001/02/07 00:27:32 1.7 +++ loncom/homework/hint.pm 2001/04/05 00:08:40 1.10 @@ -12,22 +12,23 @@ sub BEGIN { @Apache::hint::which=(); sub start_hintgroup { my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; - my $skiptoend='1'; + my $skiptoend='0'; my $result; - if ($target ne 'meta' || $target ne 'grade') { + if ($target eq 'web') { my $id=$Apache::inputtags::part; my $numtries=$Apache::lonhomework::history{"resource.$id.tries"}; if ( $numtries eq '') { $numtries = 0; } my $hinttries=&Apache::lonnet::EXT("resource.$id.hinttries"); if ( $hinttries eq '') { $hinttries = 1; } &Apache::lonxml::debug("found :$id:$numtries:$hinttries:"); - if ( $numtries >= $hinttries ) { - $skiptoend='0'; + if ( $numtries <= $hinttries ) { + $skiptoend='1'; + } else { if ($target eq 'web') {$result='
';} - } + } } - if ($skiptoend && $target ne 'meta') { + if ($skiptoend) { &Apache::lonxml::get_all_text("/hintgroup",$$parser[$#$parser]); } @Apache::hint::which=(); @@ -38,14 +39,14 @@ sub end_hintgroup { my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; my $result; - if ($target ne 'meta' || $target ne 'grade') { + if ($target eq 'web') { my $id=$Apache::inputtags::part; my $numtries=$Apache::lonhomework::history{"resource.$id.tries"}; if ( $numtries eq '') { $numtries = 0; } my $hinttries=&Apache::lonnet::EXT("resource.$id.hinttries"); if ( $hinttries eq '') { $hinttries = 1; } &Apache::lonxml::debug("found :$id:$numtries:$hinttries:"); - if ( $numtries >= $hinttries ) { + if ( $numtries <= $hinttries ) { if ($target eq 'web') {$result=' |