Is it possible to use images or their paths / URLs as choice answers or
is it just a matter of using the HTML editor and then referring to the
images somehow in the choice answer?
TIA
Darren
Images as Choice Answers
Number of replies: 3Re: Images as Choice Answers
Hi Darren,
Images may be used if the correct code including file path is typed into the choice answer field. An easy way to achieve this would be to use the HTML editor in the question to generate the code then in text mode cut and paste the code into the choice answer.
Images may be used if the correct code including file path is typed into the choice answer field. An easy way to achieve this would be to use the HTML editor in the question to generate the code then in text mode cut and paste the code into the choice answer.

Re: Images as Choice Answers
Actually, doing that without the HTML editor (which does not work for all) is not complicated at all.
1. open files in admin block
2. create a folder; for example, choice1
3. upload your images into that folder; for example, answer1.jpg, answer2.jpg, answer3.jpg
4. create or edit your choice activity and enter as the answer 1, for example:
<img src="../../file.php/23/choice1/answer1.jpg" />
23 should be replaced with your actual course number (as shown for example when selecting the course from the course list: moodle/course/view.php?id=23). choice1 is the folder we created. answer1.jpg is the image file we uploaded.
You can also control the size of the images by including additional width and height parameters as well as include a mouseover tip through the alt parameter:
<img src="../../file.php/23/choice1/answer1.jpg" alt="answer 1" width="50" height="50" />
Having the width and height is generally recommended since they usually speed up the page display. Alt is also important for accessibility.
The <img> tag can also be embedded in the text of the answer. Power to Moodle for allowing to mix text and html!
1. open files in admin block
2. create a folder; for example, choice1
3. upload your images into that folder; for example, answer1.jpg, answer2.jpg, answer3.jpg
4. create or edit your choice activity and enter as the answer 1, for example:
<img src="../../file.php/23/choice1/answer1.jpg" />
23 should be replaced with your actual course number (as shown for example when selecting the course from the course list: moodle/course/view.php?id=23). choice1 is the folder we created. answer1.jpg is the image file we uploaded.
You can also control the size of the images by including additional width and height parameters as well as include a mouseover tip through the alt parameter:
<img src="../../file.php/23/choice1/answer1.jpg" alt="answer 1" width="50" height="50" />
Having the width and height is generally recommended since they usually speed up the page display. Alt is also important for accessibility.
The <img> tag can also be embedded in the text of the answer. Power to Moodle for allowing to mix text and html!
Re: Images as Choice Answers
Great. Thanks to both of you