Display of html tags in question Choices on Review & Stats pages

Display of html tags in question Choices on Review & Stats pages

by Joseph Rézeau -
Number of replies: 8
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Although this is not (not yet?) specifically provided for in the questions edit form, it is possible to add html tags to answers (Choices) e.g. in the multiple choice questions. One can need formatting tags (bold, italics), nolink tags* or even inserting images in those choices.

When the question is displayed to the student, the HTML tags are correctly evaluated and the formatting / nolinks / images are displayed as expected.

However, on the Review and Statistics pages, the raw HMTL code is displayed, which does not look so nice. See attached example (images).

Joseph

* tag needed pending the fix of bug MDL-24996.

Attachment 30-01-2011 17-57-39.jpg
Average of ratings: -
In reply to Joseph Rézeau

Re: Display of html tags in question Choices on Review & Stats pages

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Just noticed that the very same problem applies to the display of Essays. The Essay text is displayed once correctly formatted and then raw text with HTML tags is displayed in the Grade and Close lines...

Joseph

Attachment 06-02-2011 12-13-53.jpg
In reply to Joseph Rézeau

Re: Display of html tags in question Choices on Review & Stats pages

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That's a bug. Not sure how easy it is to fix in 2.0. It is fixed properly in the new question engine that will be in 2.1, so I don't know if I can be bothered to spend much time on it in 2.0.

Average of ratings:Useful (1)
In reply to Tim Hunt

Re: Display of html tags in question Choices on Review & Stats pages

by Alan Warden -

In a similar vain when editing a 'matching question type' It doesn't appear possible to embed html or any tex. I wanted to display the hydrocarbon CH4, but neither of the following displays the symbol.

<p>CH<sup>4</sub></p>

or $ $CH_{4}$$

 

In reply to Alan Warden

Re: Display of html tags in question Choices on Review & Stats pages

by Deb Smith -

You have a typo, so try:  <p>CH<sub>4</sub></p>

 

I have never had trouble writing formulas in Quiz questions or their answers.

In reply to Tim Hunt

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Display of html tags in question Choices on Review & Stats pages

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

For the 2.1 quiz reports, all responses are converted to plain text (using Moodle's html_to_text function). This replaces images with their alt text. Since all images should have an alt="" attribute, for reasons of accessibility, and the HTML editor encourages you to add this, that seems OK to me.

This means that you get exactly the same thing displayed in the reports on-screen, and when downloaded to Excel.

In reply to Tim Hunt

Re: Display of html tags in question Choices on Review & Stats pages

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

That sounds reasonable to me too.