## Features & Development

### Bug: ⊂ mit

by Christopher Heckman -
Number of replies: 2
I just noticed a bug when checking the answers to a Gateway/Quiz in WeBWorK. Instead of saying [submit], it says [⊂ mit]. I suspect some subroutine (or should I say ⊂routine?) goes into math mode when the answer can be a function.

(The attachment shown below shows what I mean.)

### Re: Bug: ⊂ mit

by Davide Cervone -
The past-answer code uses MathJax to format expressions that are formulas. It does this using the AsciiMath input format (since the student answers are basically in that form, and it doesn't have the TeX form to work from). But AsciiMath interprets a number of words as symbols, with "sub" being one of them. That is why you get the subset symbol, and why the "mit" is in italics (it is treated as mathematics).

Is the "[submit]" really part of the student's answer? That seems a bit odd.

In any case, I think it would be better to use the TeX version of the answer. Currently that is not being stored, but it could be. Alternatively, the student's answer could be passed to the answer evaluator for parsing and the resulting MathObject could be used to generate the TeX code. The problem is that it might be difficult to get that to occur within the context of the problem (the safe compartment), but I do see that the problem has been evaluated in order to get the associated AnswerHash objects, so it may be possible to still tie into that environment properly. It would take some experimenting. But the results would be better in that the TeX would properly correspond to the context used in the problem, rather than the generic AsciiMath interpretation.