Multi choice questions - subscript and font sizes

Multi choice questions - subscript and font sizes

by Laura Harrison -
Number of replies: 3

Hi,

I am writing some questions with embedded multiple choice answers.

If I use subscript in my answers, it does not display properly in the drop-down answer menu, it displays as:

CaOH<sub>2</sub>

I tried using a smaller font size as an alternative but this doesn't display properly either:

Ca(OH)<font size="1">2</font>

Can anyone offer any help with this please?

Thanks

Average of ratings: -
In reply to Laura Harrison

Re: Multi choice questions - subscript and font sizes

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Laura,
I'm afraid you can't use HTML tags in dropdown lists. This is a general rule, nothing to do with Moodle itself.
Joseph
In reply to Laura Harrison

Re: Multi choice questions - subscript and font sizes

by Daniel McCloy -
There is actually a way to do this. Superscript and subscript numerals have their own unicode points. So if you wanted to write "x squared" in a dropdown list, you could use the HTML escape code for that unicode codepoint in the text of the dropdown box. For example, the superscript two is 00B2, so you would type "x&#x00B2;" (the initial x is just the character x, the rest is the escape code) and the output would be "x²".

Alternatively, you can also just copy and paste the actual superscript or subscript glyph into the text of the dropdown box. Here are all of them, so you can copy/paste as needed:
x⁰¹²³⁴⁵⁶⁷⁹ x₀₁₂₃₄₅₆₇₈₉
Average of ratings: Useful (2)