Difference between revisions of "Scaffolding2"

From WeBWorK_wiki
Jump to navigation Jump to search
(New scaffold example using PGML.)
 
(add historical tag and give links to newer problems.)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<h2>Deprecated: Sequentially Revealed (Scaffolded) Problems</h2>
 
  +
{{historical}}
  +
  +
<p style="font-size: 120%;font-weight:bold">This problem has been replaced with [https://openwebwork.github.io/pg-docs/sample-problems/Misc/Scaffolding.html a newer version of this problem]</p>
  +
  +
  +
<h2>Sequentially Revealed (Scaffolded) Problems</h2>
   
 
[[File:Scaffolding2.png|300px|thumb|right|Click to enlarge]]
 
[[File:Scaffolding2.png|300px|thumb|right|Click to enlarge]]
Line 106: Line 111:
 
</tr>
 
</tr>
   
<tr>
 
  +
<tr valign="top">
<td>
 
  +
<td style="background-color:#ddffdd;border:black 1px dashed;">
 
<pre>
 
<pre>
 
BEGIN_PGML_SOLUTION
 
BEGIN_PGML_SOLUTION
Line 118: Line 123:
 
</pre>
 
</pre>
 
</td>
 
</td>
<td style="background-color:#ffffcc;padding:7px;">
+
<td style="background-color:#ddffdd;padding:7px;">
 
<p>
 
<p>
 
<b>Solution:</b>
 
<b>Solution:</b>

Latest revision as of 06:42, 17 July 2023

This article has been retained as a historical document. It is not up-to-date and the formatting may be lacking. Use the information herein with caution.

This problem has been replaced with a newer version of this problem


Sequentially Revealed (Scaffolded) Problems

Click to enlarge

This PG code shows how to create multi-part questions that hide from students parts that have not yet been answered correct.


Templates by Subject Area

PG problem file Explanation

Problem tagging data

Problem tagging:

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"scaffold.pl",
"PGML.pl",
"PGcourse.pl",
);
TEXT(beginproblem());

Initialization: Use scaffold.pl.

Context("Numeric");

Setup: For randomization, etc.

Scaffold::Begin();
    
Section::Begin("Part 1: The first part");
BEGIN_PGML
This is the text for part 1.  [` 1+1 = `] [_________]{"2"}
END_PGML
Section::End();
    
Section::Begin("Part 2: The second part");
BEGIN_PGML
This is text for the second part.  [` 2 * 2 = `] [_________]{"4"}
END_PGML
Section::End();

Section::Begin("Part 3: The third part");
BEGIN_PGML
This is text for the third part.  [` 1 + 2 + 4 = `] [_________]{"7"}
END_PGML
Section::End();
  
Scaffold::End();

Main text: Each Section::Begin() and Section::End() block can have its own context, etc. See the scaffold.pl macro file for Scaffold options.

BEGIN_PGML_SOLUTION
Solution explanation goes here.
END_PGML_SOLUTION

COMMENT('MathObject version.  Uses PGML.');

ENDDOCUMENT();

Solution: Optional solution section.

Templates by Subject Area