I have always thought that
$showHint=0;
would make hints immediately available. I guess my first question is whether I have been mistaken about that. According to
http://webwork.maa.org/wiki/AnswerHints#.V-F_i7VWdoQ
the way I read it, this would be the behavior I'd expect. The student should be able to see the hint after 0 attempts, so right away.
If this has been the historical behavior, then since my upgrade to 2.12, the behavior has changed. Now I need to set
$showHint=-1;
to get hints to appear right away. My guess is that somewhere, a greater-than comparison is being made that should be a greater-than-or-equal-to (assuming things have always worked the way I thought they worked.)
In other words, if attempts=0, then since 0>0 is false, we don't see the hint. But 0>=0 would be fine.
Is there a 2.12 bug here or do I just not remember the behavior right? If it's always been this way, I think we should re-word the wiki that explains how showHint works.
Actually, while $showHint=-1 will let me see the hints in HTML output, nothing I do seems to bring the hints into the hardcopy.
I'm checkboxing "Hints" while generating the hardcopy, with $showHint=-1 (and also trying $showHint=0) in the problem's code. But no hints appear in the pdf or tex output.
I'm checkboxing "Hints" while generating the hardcopy, with $showHint=-1 (and also trying $showHint=0) in the problem's code. But no hints appear in the pdf or tex output.
I have been confused about this as well. I have used $showHint = 1 in my problems thinking that would show the hint after one incorrect attempt. In fact, this shows the hint after the second incorrect answer. I have only used version 2.12 (starting WeBWorK this summer) so cannot say what happened previously.