Hello all,
I am just starting with the creation of Webwork problems. I have written the following problem
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(
"PGstandard.pl",
"PGchoicemacros.pl",
"PGunion.pl",
"choiceUtils.pl",
"PGcourse.pl",
"PGML.pl",
"parserPopUp.pl"
);
TEXT(beginproblem());
##############################################
Context()->strings->add(Tautology => {}, Contradiction => {}, Neither => {});
$ans_a = PopUp(
["?", "True","False"],
1,
);
$ans_b = PopUp(
["?", "True","False"],
2,
);
BEGIN_PGML
Determine which of the following statements are true or false:
1. This statement is True.
Answer: [_]{$ans_a}
1. This statement is False
Answer: [_]{$ans_b}
END_PGML
ENDDOCUMENT();
I would like to modify this problem so the student will only get one of the 2 questions at random (eventually I would like to have n questions in this problem and select k at random)
I haven't been able to find anything in the documentation or the OPL related on how to implement this using popUps questions. Any help is very much appreciated.