Scaffolding1: Difference between revisions
Jump to navigation
Jump to search
Paultpearson (talk | contribs) (New scaffolding or sequentially revealed template) |
(No difference)
|
Revision as of 19:01, 29 June 2014
Sequentially Revealed (Scaffolded) Problems

This PG code shows how to create multi-part questions that hide from students parts that have not yet been answered correct.
- File location in OPL: FortLewis/Authoring/Templates/Misc/Scaffolding1.pg
| PG problem file | Explanation |
|---|---|
|
Problem tagging: |
|
DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"compoundProblem5.pl",
"PGcourse.pl",
);
TEXT(beginproblem());
$showPartialCorrectAnswers = 1;
$scaffold = Scaffold();
INITIALIZE_SCAFFOLD('$scaffold');
$isInstructor = 0; # = 0 when students use it
TEXT(MODES(
HTML=>'Clicking on a section opens it
provided that you have answered previous sections correctly.',
TeX=>''));
|
Initialization:
We initialize the scaffolding with the name |
Context("Numeric");
$answer = Compute("1");
|
Setup: |
Context()->texStrings;
BEGIN_TEXT
Question text
$BR
$BR
Answer =
\{ ans_rule(20) \}
\{ AnswerFormatHelp("formulas") \}
END_TEXT
Context()->normalStrings;
|
Main Text: |
$showPartialCorrectAnswers = 1; ANS( $answer->cmp() ); |
Answer Evaluation: |
Context()->texStrings;
BEGIN_SOLUTION
${PAR}SOLUTION:${PAR}
Solution explanation goes here.
END_SOLUTION
Context()->normalStrings;
COMMENT('MathObject version.');
ENDDOCUMENT();
|
Solution: |