## WeBWorK Problems

### CompoundProblem5 bug

by Peter Staab -
Number of replies: 3
I'm trying to use the new version of compoundProblem (compoundProblem5.pl) and started with the documented one at http://webwork.maa.org/wiki/CompoundProblem5 and I'm running the latest version of the develop branch.

If I walk through the problem, the 3rd section doesn't open.  Troubleshooting, it looks like at the end of the problem, it opens sections based on

$opensection =$last_correct_section + 1;
$scaffold->openSections($opensection);

and if I print out $opensection, then it equals 0 when the problem first loads, 1 after the correct answer is opened in the first sections, and remains 1 after the 2nd section is correctly solved. In reply to Peter Staab ### Re: CompoundProblem5 bug by Peter Staab - It appears that the second section doesn't have a SECTION_ANS command. Is this what's missing? In reply to Peter Staab ### Re: CompoundProblem5 bug by Peter Staab - That seems to be the problem. I added the line: SECTION_ANS($ans->cmp, \$popup->cmp);

which seemed to fix the problem.  I'll go ahead and change the problem technique page as well.