openwebwork/webwork2

enabling MathQuill after an answer was entered, you don't see the answer upon returning

Opened this issue · 4 comments

If a course does not use MathQuill, you can submit an answer to some currently open exercise. Then go to enable MathQuill, and return to the exercise. It won't pre-populate the input field with something. At least not the part you can see. I understand this is probably because on the previous submission, no MathQuill string was recorded.

Is there a way that MQ could grab the previous plain answer and render it into a MQ string for this?

This is a well known issue (to me at least). We could put the previous plain answer into the MathQuill field, but it won't look right, and it might not parse in MathQuill in some situations.

Is it worth having MathQuill running all the time, even when not used, just to store the MQ string?

That wouldn't work unless the user is actually typing in the MathQuill input. The MathQuill string can't be created from what is typed in the text input.

I tried several approaches to get the answer to appear in the MathQuill input if MathQuill is re-enabled after being disabled. However, I keep getting right back to where we were when we implemented the MathQuill input, and the whole reason that the hidden latex input was added. There is no reliable way to get the answer in a form that works for MathQuill and resembles the text form of the answer.

I think the only real fix for this is actually to remove the option for users to be able to disable MathQuill entirely. Of course to be able to do this we need to make MathQuill fully accessible. That can be done, but will take some work.