## WeBWorK Problems

### hints show, but not after the specified number of times

by Xiong Chiamiov -
Number of replies: 1
I'm playing around with the hints in problems, with a problem that includes the following snippet:

$showHint = 3; BEGIN_HINT$PAR HINT:
$BR Intercepts are discussed in Lesson 2. END_HINT  I'm experiencing odd behavior, though, with when the hints are actually shown:$showHint # of submits until "Show Hints" checkbox appears # of submits until hint actually appears
-2 0 1
-1 0 1
0 0 2
1 0 3
2 2 4
3 3 5
This is, I must admit, a bit baffling, so I'd be thankful for any insight on what it could be.
I'm testing the hints from a student account. The webwork installed is an updated version of rel-2-4-patches. The full problem file can be viewed here.
Thanks for a very clear bug report -- it is indeed a bug. The chief culprit is an off-by-one error between the $numOfAttempts internal to the problem which controls when the hint appears and the$numOfAttempts variable external to the problem which determines when the checkbox appears. The expected behavior is that the hint will appear one submit after the showHint checkbox appears. A better behavior would be that pressing the preview button would show the hint if the checkbox is checked.