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

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

Joseph Rézeau -
回帖数:8
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像 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.

附件 30-01-2011 17-57-39.jpg
回复Joseph Rézeau

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

Joseph Rézeau -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像 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

附件 06-02-2011 12-13-53.jpg
回复Joseph Rézeau

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

Tim Hunt -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 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.

回复Tim Hunt

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

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}$$

 

回复Alan Warden

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

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.

回复Tim Hunt

本讨论区帖子已移除

本讨论区帖子的内容已移除,无法再访问。
回复删除的用户

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

Tim Hunt -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 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.