I am testing a proctored quiz for linear algebra subject. The quiz has questions on multiple pages. From my understanding, WebWork saves any entered answers as I navigated through the pages. However, in my questions, WebWork only appears to save the first entry in an an ans_array. For example, I enter a matrix, move to the next page of problems, come back to the matrix and see only the first entry stored.
Separate but possibly related problem: The same appears to be happen when I utilise custom answer checkers. Only the first answer is recorded when I navigate away from and then back to the same page.
I am wondering if there is something I am missing or if there is something I can do to fix this issue. I have been unsuccessful in locating any relevant documentation for this issue. Any assistance or direction is greatly appreciated.
I've attached a small working example of a question using ans_array that works perfectly fine in homework mode, but fails when included as part of a bigger proctored quiz. I've also included the custom answer checker that I used that producing the issue.
Happy to provide more details if required.
Thank you very much
Thomas
-----------------
##Matrix example
DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"PGML.pl",
"MatrixReduce.pl",
);
TEXT(beginproblem());
$showPartialCorrectAnswers = 1;
Context('Matrix');
$Z = Matrix( [1,2,3],[4,5,6],);
Context()->texStrings;
BEGIN_TEXT
Enter the Matrix
\[ z = $Z \]
\( Z = \) \{ $Z->ans_array(2) \}
END_TEXT
### check answers
ANS($Z->cmp);
ENDDOCUMENT();
-----------------------------
#Custom answer checker.
#Check to see if two numbers in are entered correctly in two ans_rule
$lobf = MultiAnswer($c, $m)->with(
allowBlankAnswers => 0,
singleResult => 1,
checker => sub {
my ( $correct, $student, $answerHash ) = @_;
my @c = @{$correct};
my @s = @{$student};
my @score = ();
if ( ($c==$s[0])&&($m==$s[1]))
{ return 1; } else{ return 0; }
}
);