Hi folks,

I'm looking for someone with a bit more understanding of how STACK, Moodle, and MathJax interact.

Long story short, a colleague was trying to write a STACK question which asks students to input the matrix for a linear transformation with respect to a given basis. They were finding that bits of the question often didn't render to maths correctly, and, in particular, that the validation output often produced [Math Error] when the correct answer was given.

I've managed to condense their code down into two examples (attached), one which consistently produces [Math Error] in the validation output and one which consistently doesn't. The difference between the functional and non-functional cases is (as far as I have been able to determine) one set of \left( \right) brackets in the question statement.

I can also change the functional example to one that intermittently produces [Math Error]'s by swapping around the way I set up the question. (It works when I choose a random matrix and then construct the linear transformation, it goes wrong if I choose a random linear transformation and work out the correct matrix.)

My working theory, is that, for some reason MathJax and STACK aren't playing well together for some reason. But my local IT people are just blaming STACK (it's complicated apparently) which doesn't help me work out how to avoid the problem in future.

Any help anyone can give would be much appreciated.

Cheers,

Daniel