WeBWorK Main Forum

AsciiMath problem in essay questions

AsciiMath problem in essay questions

by Robert Mařík -
Number of replies: 3

Hello all. I observed problems with essay questions. The "double backticks notation" is recognised fine if the  student submits his/her solution but the teacher does not see the formula rendered well. Not sure if this is bug or feature, but I think that both student and teacher should see the same behavior.

See the attached picture.

Robert



Attachment Screenshot from 2020-11-12 15-53-58.png
In reply to Robert Mařík

Re: AsciiMath problem in essay questions

by Robert Mařík -

The problem is probably in the fact that the answer is wrapped by the command

$answer_value = EV3P({processCommands=>0,processVariables=>0},text2PG($answer_value));

in PGessaymacros.pl and this wrapper is not called in ProblemGrader.pm near line 307. However, I do not have enough skills to enable these commands. Aparently, adding line like

$answer = EV3P({processCommands=>0,processVariables=>0},text2PG($answer));
does not help. I wonder if someone know how to enable EV3P processor in ProblemGrader.pm . Thank you.
In reply to Robert Mařík

Re: AsciiMath problem in essay questions

by Glenn Rice -

This is really due to the fact that in the AttemptsTable the preview_latex_string is used.  As you noticed this is generated by the EV3P command, but this something that is available only to a PG problem, and is not available in the problem grader.  The student answers are taken directly from the database, and are not passed to PG to process.  Doing so would probably be a bit more resource intensive for the server than is desired here.

In reply to Glenn Rice

Re: AsciiMath problem in essay questions

by Robert Mařík -

Thank you. It seems that the idea to transform double backticks into displaymath is unique for WeBWorK. It does not work in other engines, such as original AsciiMath or MathJax. Having this in mind, in the next semester I will instruct students to use regular LaTeX only. This also resolves the above mentioned problem. In the running courses I use the substitution from `` to ` in the problem grader. This is a convenient workaround for me and for now.