I have some matrix problems that use a custom answer checker. Suddenly this term, they do not work. It's possible that they have not been used since the server was upgraded to 2.15, and it's possible they worked in 2.14. I checked on other 2.15 servers I have access to and I get the same behavior.
My normal debugging routine would be to start fiddling with the custom answer checker, getting it to pretty print the answer hash. But I can't get it to print any feedback error message at all when the answer is a Matrix.
I've whittled it down to the silly problem below. My expectation is that the answer checker should simply report 'testing' as the feedback error message. But it does not do that when the answer is a Matrix. It seems specific to Matrix. If the answer is just, say, Real(1), then the custom answer checker behaves as expected and does return the 'testing' error message.
I've tried disabling pre filters and post filters and there is no change. So I'm not sure what is going on. Does anyone have insight? Also, I'm curious if this problem works on a version earlier than 2.15 if someone has access to one.
Of course I still have my original issue of why my custom answer checker stopped working. But I wonder if resolving this issue with Value->Error first might also resolve my original issue.
DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
);
Context("Matrix");
#Context("Numeric");
#Context()->lists->set(Matrix => {open => "[", close => "]"});
#Context()->parens->set("[" => {type => "Matrix", close => "]"});
$answer = Matrix([[1,1],[1,1]]);
# submit the above as the answer and yet I do not see the expected feedback message
#change the answer to Real(1), submit "1" as an answer, and see the feedback message appear
#$answer = Real(1);
BEGIN_TEXT
Enter: $answer $PAR
\{ ans_rule(60) \}
END_TEXT
ANS($answer->cmp(checker => sub {Value->Error('testing');}));
ENDDOCUMENT();