Advanced Strategy: Scaffolding

Scaffolding is an effective technique to guide students towards difficult problems and deeper understanding. WeBWorK has recently introduced a new framework for coding problems, allowing you to implement scaffolding techniques in your WeBWorK problems. So, how do we take advantage of this framework?

First, we must include the necessary macros:

loadMacros(

“scaffold.pl”,

);

Without including “scaffold.pl” in the loadMacros() call, WeBWorK will complain if we try to use the these snippets.

Essentially, the idea behind implementing “scaffold.pl” is that we are writing multiple sub-problems within the same problem. This means that we will use the BEGIN_TEXT / END_TEXT repeatedly. Each level of the scaffolding will essentially be it’s own problem, complete with answer checking.

Scaffold::Begin();

Section::Begin(“Part 1: The first part”);

Context()->texStrings;

BEGIN_TEXT

<<< PROBLEM TEXT >>>

END_TEXT

Context()->normalStrings;

ANS( $youranswer->cmp() );  #As many as required by the number of \{ ans_rule() \} calls in this section.

Section::End();

<<< REPEAT “Section::Begin()” / “Section::End()” FOR AS MANY SECTIONS AS YOU LIKE >>>

Scaffold::End();

You should recognize what exists between the “Section::Begin” and the “Section::End” as the code for what is usually an entire problem. However, we can now begin a “new problem” within the same problem by going back to “Section::Begin” and repeating the process.

There are several settings that may be adjusted in the initial “Scaffold::Begin(…);” call.

http://webwork.maa.org/wiki/Scaffold use the information at the bottom of the page, do NOT use the sample code.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.