Graphics in Quiz Answers
Number of replies: 15I am looking at both non-textual assessments in several disciplines and with pre-reading students. Has anyone had any experience with this?
Re: Graphics in Quiz Answers
Which type of questions are you using in your quizzes (there are many!)
Joseph
Re: Graphics in Quiz Answers
Re: Graphics in Quiz Answers
- upload the necessary image files to your course files
- create a multiple choice question
- in the Feedback field for Answer 1, click on the Insert Image button of the HTML editor
- go to the File browser and select the image you want to use for Answer 1
- when image has been inserted into Answer 1 Feedback field, click on Toggle HTML source button
- select and copy the code, something like: <img width="44" vspace="0" hspace="0" height="33" border="0" src="http://moodle/file.php/4/image1.jpg" />
- now past that code into the Answer 1 "answer" field
- if you no longer need the image in the Feedback field, delete it
- repeat steps 3 through 8 for each Choice Answer where you need an image.
Joseph

Re: Graphics in Quiz Answers
Joseph
That is a nice tip, thanks!
Re: Graphics in Quiz Answers
Storing the Images
Put the images in a place where they are able to be "accessed" by everyone you want them to. For example, storing the images in the site files for course 1 and using the same questions with images in course 2 will not allow course 2 students to see the images in the questions unless they are also enrolled in course 1. My suggestion in this case is to store the images in the front page site files, since all student can "access" them there.
However, also note that the images are "pulled" from a web url (e.g www.mymoodle.net/file.php/image1.jpeg), so if you change the url of your moodle site and that is where you have stored the images, then none of the images will work and you'll have to change them manually to the new name. You can do this with a query via the SQL database in one hit if you know what to do, otherwise it's a very time consuming issue if you have a lot of images.
Therefore another suggestion is to place all the images in another website, like the company FTP site or something and then link to them there. At least if you moodle site name changes, as things do, then you can avoid then problem. There are pros and cons to each, but it's up to you.
Linking
If your images are already sized correctly then you can shorten the code that Joseph gave you to this
<img src="image url"/>
Just copy and paste your image url into where i have put image url. Like Joseph said, make sure you have clicked "toggle HTML source" editor otherwise it won't work.
There is another way
The other way of doing all this is to use the "insert image" button once you have inserted all the images into the site files of the moodle course or front page. However, we found this method to have more against it than for it because of the way we set up and used our site. But this is by far the simplest method though.
Merry Christmas
Steve
Re: Graphics in Quiz Answers
Joyeux Noël
Re: Graphics in Quiz Answers
Re: Graphics in Quiz Answers
Joseph
Re: Graphics in Quiz Answers
Re: Graphics in Quiz Answers
Finally worked it out. You need to put a word so that the link has something to grab hold of. I used a period / full stop as you can see here.
So you go to a place that has an editor. Type the . then select it, click the insert link button, choose the audio file then click ok. Click the toggle html source button, copy the text and paste it into the answer section. The text should look something like this:
<a href="http://linktoaudiofile.mp3">.</a>
It shows like this

Ideally, I would like to do it with the matching questions type for a question such as "match the beginning audio with the correct ending audio."
I can see why it wouldn't work with the matching question type now, though I would still like to be able to do it somehow.
Silly musings...
Re: Graphics in Quiz Answers
1- Eric : "You need to put a word so that the link has something to grab hold of."
In order to remove that "something", you may follow the recipe I gave in this post.
2- As you have found out, is is only possible to insert any media (image or audio) in the left column of a matching question, because the right column consists of drop-down lists which can only contain text. If you really wish to match audio with audio, audio with image, image with image, etc. then you should consider using the Hot Potatoes plugin, where all of this is feasible in the JMatch activity. I use it a lot especially for that.
ATB
Joseph
Re: Graphics in Quiz Answers
Re: Graphics in Quiz Answers
When I am trying to implement it I got something like:
(radio button) a. moodle/file.php/10/grammar_pics/past_simple.gif" alt="img" title="img" />
I copy the link from feedback html but I get no image. Images in feedback are displayed correctly. What am I doing wrong?
Re: Graphics in Quiz Answers
Sergei,
Which version of Moodle are you using? Please give the exact complete procedure you follow to produce the result you describe (plus maybe a screenshot).
Joseph
Re: Graphics in Quiz Answers
Solved!
It turned out that images are not displayed if the path is http://mymoodlesite.com/file.php/1/etc
But if I enter <img src="/file.php/1/folder/pic1.gif"/> everything is OK.