DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"PGML.pl",
"PGcourse.pl",
"PG.pl",
"PGbasicmacros.pl",
"PGchoicemacros.pl",
"PGanswermacros.pl",
"parserPopUp.pl",
"PGauxiliaryFunctions.pl"
);
TEXT(beginproblem());
$showPartialCorrectAnswers = 1;
$a=random(8,18,1);
$b=random(5,20,5);
$c=random(2000,3000,1000);
$d=random(500,700,100);
$TFPartB = PopUp(
["?","True","False"],
"True",
);
BEGIN_PGML
Testing Problem.
a) What is [`[$a]+[$b]`]?
[`[$a]+[$b]=`] [____]{"$a+$b"}{20}
a) *True* or *False*: This statement is True
Answer: [@ $TFPartB->menu() @]*
a) What is [`[$c]+[$d]`]?
[`[$c]+[$d]=`] [____]{"$c+$d"}{20}
END_PGML
ANS( $TFPartB->cmp() );
ENDDOCUMENT();
The problem is that the answers are graded in order (a), (c), (b), so the answer to the third part is "True", not $c+$d. Is there a simple fix? Thank you!