WeBWorK Problems

Hints in different sections of a scaffold problem

Re: Hints in different sections of a scaffold problem

by Glenn Rice -
Number of replies: 1

Yes, the value of $showHint is used relative to the $numOfAttempts value.  So setting $showHint equal to $numOfAttempts will not work.

To really make this work you would have to modify scaffold.pl.  Although, even with that, I am not entirely certain this is possible.  It may take further modifications to webwork to make this work.

In reply to Glenn Rice

Re: Hints in different sections of a scaffold problem

by Todd Ruskell -
I'm new to WeBWorK, so don't know all the variables we can access. I'm guessing (hoping) there must be a variable we can access that tells whether or not the first section is complete. Might anyone know if this is true, and if so, what that variable is? Assuming a boolean variable $section1Correct, you could then try something like this:

$numOfAttemptsSection1 = 999; #some number of tries you hope students never reach
$x = 3; #number of attempts on second part before showing hint
if ( ($numOfAttemptsSection1 == 999) && $section1Correct) {
$numOfAttemptsSection1 = $numOfAttempts;
$showHints=$numOfAttemptsSection1 + $x;
}