The following code accepts |h+2| for the scalar as correct answer, but for the matrix entry it accepts only abs(h+2). If I use |h+2| in the matrix I get error message
"The domain of your function doesn't match that of the correct answer"
And of course then even abs() does not work if I use MathQuill for live formula rendering.
This happens with ww_version: 2.17, but I think similar things worked a year ago with ww_version: 2.16.
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"PGML.pl",
);
TEXT(beginproblem());
$showPartialCorrectAnswers = 1;
Context('Matrix')->variables->are(h=>'Real');
$mf = Formula("abs(h+2)");
$myMTX=Matrix([[1,$mf], [2, 3] ]);
BEGIN_PGML
[``[$mf]=``][__]{$mf}{20}
[``[$myMTX]=``][__]*{$myMTX}{20}
END_PGML
Context()->normalStrings;
ENDDOCUMENT();