DOCUMENT(); loadMacros( "PGstandard.pl", "PGML.pl", "scaffold.pl", "parserOneOf.pl", "parserMultiAnswer.pl", "PGcourse.pl" ); $a = OneOf(2,3); $m = MultiAnswer($a, $a)->with( singleResult => 0, allowBlankAnswers => 1, checker => sub { my ($correct, $student, $self) = @_; my $result1 = $correct->[0]->cmp->evaluate($student->[0]->string); if (!$result1->{score}) { $self->setMessage(2,"Cannot assess this until there is a correct answer to the first part"); return [0,0]; } return [1, $student->[0] == $student->[1]]; } ); Scaffold::Begin(); Section::Begin(); BEGIN_PGML Enter a prime less than 4. [_]{$m} END_PGML Section::End(); Section::Begin(""); BEGIN_PGML Enter the same number you entered in Section 1. [_]{$m} END_PGML Section::End();Scaffold::End(); ENDDOCUMENT();