WeBWorK Problems

Scaffolded problems

Scaffolded problems

by Paul Seeburger -
Number of replies: 1
So I am still a little unsure about which version of scaffolded problems I should be trying right now, but for now I have been experimenting with CompoundProblem5.pl, the version that is already in the standard WeBWorK 2.8 and pg_version 2.8.1.

I am trying to figure out how to make all parts that have already been answered correctly remain open (not folded away).  It appears that the only way to do this is to create a statement for each step I want visible, or to use a loop as follows:

$opensection = $last_correct_section + 1;
for ($i = 1; $i<= $opensection; $i++) {

It seems that there should be a cleaner way to specify this, as I would expect it to be a common request.  Perhaps, openSections("all") could work.

Related to this question, I was reading about some of the newer versions of this scaffolding process and it appeared that the examples I saw left out the line to specify which step(s) to open altogether.  I am hoping there may still be an easier (cleaner) way to make multiple parts visible and that the newer techniques don't assume we would only want the current not-yet-correctly answered section made visible.

Also, I am curious about using a weighted grader in this context.  Is it possible?  I saw a post implying that it is not at this point.


In reply to Paul Seeburger

Re: Scaffolded problems

by Glenn Rice -
You can also do

$opensection = $last_correct_section + 1;

The openSections method can take an array for its parameter.