Cloze Question and TEX

Cloze Question and TEX

by Daniele Moretti -
Number of replies: 6

Hi all,
I use moodle 3.0.
I need to put some TEX answer in a cloze MULTICHOICE question, following moodle documentation I have tried to use  \} instead of } in the TEX code:
{:MULTICHOICE:\( \frac { 1 \} { 5 \} + \frac { 1 \} { 6 \} + 8,9 = x \) ~\( \frac { 1 \} { 5 \} x + \frac { 1 \} { 6 \} x = x + 8,9 \) ~\( \frac { 1 \} { 5 \} x + \frac { 1 \} { 6 \} x + x = 8,9 \) ~%100% \( \frac { 1 \} { 5 \} x + \frac { 1 \} { 6 \} x + 8,9 = x \) }
In "decode and verify the question text", the "Answer" attribute of my Multiple Choice Question shows:

\( \frac { 1 } { 5 } + \frac { 1 } { 6 } + 8,9 = x \)

that is the correct syntax for TEX but, in preview window, the Dropdown menu shows nothing in.

What could be the problem?
Thank You

Daniele

Average of ratings: -
In reply to Daniele Moretti

Re: Cloze Question and TEX

by Pierre Pichet -

The dropdown menu cannot display such HTML.

Change for  another multiplechoice display

multiple choice (MULTICHOICE_V or MCV), represented as a vertical column of radio buttons, or multiple choice (MULTICHOICE_H or MCH), represented as a horizontal row of radio-buttons,

In reply to Pierre Pichet

Re: Cloze Question and TEX

by Daniele Moretti -

Dear Pierre,

Thank you for reply.

I've partial solved inserting a blank TEX code " \( \)" in question text, outside CLOZE answer.

In this way the dropdown correctly display TEX formula, but, once selected from dropdown, the box answer display TEX code characters but not the formula.

This is a minor problem cause the choice is done on the right display.

Daniele

In reply to Daniele Moretti

Re: Cloze Question and TEX

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

As Pierre said TeX should not work in drop downs. This is according to HTML specs. MathJax does display the TeX in drop downs in Firefox, but I it does not work in other browsers. This can cause a lot of problems for students. Using radio buttons does work across browsers. 

You seem to have the TeX delimiters outside the close delimiters.  If you are choosing among several equations I would think each equation should have TeX delimiters included with it inside the cloze answer option.

In reply to Daniel Thies

Re: Cloze Question and TEX

by Daniele Moretti -

certainly I cannot use a workaround that works only on Firefox, so i use Pierre suggestion despite that solution not shuffled the order of the answers.

Thank you.

PS. where my TeX delimiters are outside the close delimiters?

In reply to Daniele Moretti

Re: Cloze Question and TEX

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Daniele,

Your delimiters are correct. I misread your code because MathJax processed the delimiters on this site.

If you want to shuffle  answers use MULTICHOICE_VS or MCVS.

Daniel