Choice with images

Choice with images

by Paul K -
Number of replies: 3

Hello,

based on the choice documentation it is posible to use images as options instead of text.

Source: https://docs.moodle.org/31/en/Choice_FAQ

I'm using currently Moodle 3.1 and it looks like that this option is not available anymore. At least in my Moodle instance after trying with different file formats, starting from jpg, gif, png and using this code:

<img src="https://<URL>/file.jpg" alt="file.jpg>

also

<img src="https://<URL>/file.jpg">

and

<img src=https://<URL>/file.jpg>

nothing happens.


Does anyone have any idea why it does not work?

Warm regards,

Paul

Average of ratings: -
In reply to Paul K

Re: Choice with images

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hello. That was written for a much older version of Moodle. However, I just checked and if the site admin unticks the box 'Remove HTML tags from all activity names' in Site admin>Appearance>HTML settings, it works then. (I can't guarantee any other potential issues with changing that setting.)

Average of ratings: Useful (1)
In reply to Mary Cooch

Re: Choice with images

by Paul K -

Dear Mary,

great, thank you for this suggestion. This is exatly that what I'm looking for. However as you mentioned this can have another consequences if I will enable this function globally for all activity names in the system. Well then I'm stuck with it. Nevertheless, thank you.


Paul

In reply to Paul K

Re: Choice with images

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of Testers

I enabled the HTML 2 years ago: just never told my teachers about this- I don't want them attempting to add HTML to places such as activity titles.

 1 notable consequence if you do add HTML to activity titles - I use span tags to color my assignment names in red in my orientation course. This causes the assignment names to not appear in the activity completion report. But the titles do appear in red in the grade book/userreport, so it's a trade off I'm okay with so far  smile



See 1.a/2.a/4.a (again, this is if you use HTML in the titles). 



If I recall anything else I'll post. 


Average of ratings: Useful (1)