For question 1, that is a reasonable way to ask for the matrix. Make sure, however, that your
$A
is actually a solution to the problem, because if (after the due date) the student asks to show answers, this is the value that will be displayed. Just because you are providing a custom checker doesn't mean you can get away without giving a correct answer yourself.For question 2, you are right that
$student
is the MathObject that represents the student's answer. This will be a reference to a Matrix object because the student is forced to enter a matrix by your use of ans_array
in $a->ans_array(10)
. The $correct
variable will be a reference to the correct answer, in this case $A
(it is passed to the checker so that you can use the same custom checker for more than one answer blank). The $ansHash
is a reference to an AnswerHash object, which stores data about the answer checker (like the flags that were set for it, and other information). In general, you don't have to worry about that. Hope that helps.
Davide