Images missing in answer choices

Images missing in answer choices

by Ian Hunt -
Number of replies: 10

I think this is the same as http://moodle.org/mod/forum/discuss.php?d=151894

I have some list matching questions where I put gif images in the question options boxes with the words to match to in the answers boxes. These images appeared when the question was previewed but do not appear in the quiz itself.  We are using Moodle 2.0.4+, build done Sept 7th based on version available as of end of Aug. 

Anyone have any ideas as to what might be causing this?

At this point (mid academic year) we don't want to have to do a major upgrade....

Average of ratings: -
In reply to Ian Hunt

Re: Images missing in answer choices

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

@Ian

If the images appear when previewing the matching question I see no reason why they should not appear when that question belongs to a quiz.

How did you insert the images into the matching question?

Can you view those images in the quiz when logged in as teacher? Are the images unvailable only to students?

Have you tried JPEG images instead of GIF? although I doubt it would make a difference.

When the images fail to display, look at the source of the HMTL page in your brower and tell us what you can see where the images should appear.

From the discussion you link to, there was a bug, which was fixed a year ago.

Anyway, I cannot reproduce your problem on my current moodle Moodle 2.0.6+ (Build: 20111205).

Joseph

In reply to Joseph Rézeau

Re: Images missing in answer choices

by Ian Hunt -

Thanks for the reply. It's a strange one...
The images were put in place using the file upload interface. I haven't tried JPEG, I have lots of gif images in other questions that have worked just fine (including within the same quiz). 
I can see the images if I preview the questions from the editor preview.
But in the student quiz yesterday in the campus computer lab they were not visible.
To add to the mystery, the same images in the same questions were visible in another quiz I had running last week and were visible in a new quiz I created this morning (viewing this one from home).
So I was thinking lab browser restriction but I'm not sure why a browser restriction would only knock out these images and not others...

The html in editor
<p><img src="http://moodle.ucalgary.ca/moodle/draftfile.php/23/user/draft/610011205/carbocation01.gif" alt="C+" width="61" height="63" /></p>

Html in browser where images don't show:
<p><img src="" alt="C+" width="78" height="67" /></p>

The quiz is running under IP restrictions and my home computer is unallowed... but I switched to manager role and could see the quiz.... those images do not appear on my home computer in this quiz, despite being able to see them in other quizzes.

In reply to Ian Hunt

Re: Images missing in answer choices

by Ian Hunt -

So I just copied the html code from the live view in a browser where the images were not working it all looked like it was fine.... now I see the dreaded red cross image icon... Sorry...

 

In reply to Ian Hunt

Re: Images missing in answer choices

by Dual Cube -

@Ian 

If you give the link url of the image where the image is uploaded properly then there is no problem in image format.

Please make sure that the image link is correct & it should be paste in the answer choices like this 

<img src="the image link where it is uoloaded" />

The format of the image may be gif, jpg or any other type no problem.

In reply to Dual Cube

Re: Images missing in answer choices

by Jean-Michel Védrine -

Hello Dual Cube,

Ian said that he is using Moodle 2.0.4+ so this is certainly not how images are working in Moodle 2.0/2.1 !

In Moodle 2.0/2.1 you can't copy/paste images urls like this. See Moodle docs.

In reply to Dual Cube

Re: Images missing in answer choices

by Ian Hunt -

If the image displays correctly in the editor preview mode and they also appear in certain quizzes, how can it be a problem in the URL ? I have the images in two different quizzes, one for practice, the other for coursemarks running under IP and time restrictions..... then the images don't appear.

In reply to Ian Hunt

Re: Images missing in answer choices

by Jean-Michel Védrine -

Hello Ian,

This is why I answered to Dual Cube : I don't think this is a url problem !!

In reply to Jean-Michel Védrine

Re: Images missing in answer choices

by Ian Hunt -

I agree. The thing I find odd is the act that the same qu work in one quiz but not another. Now our term is over, I plan to remove the IP controls etc to see what happens!

In reply to Ian Hunt

Re: Images missing in answer choices

by Ian Hunt -

6 weeks later....the same issue, broken image icon in a question. It's a new list matching question and the same problem. If I put an image (gif) into the the question text box (using the file upload) then the image does not appear in the quiz when it's run even if it all looks fine in the preview. I'm trying to get students to rank a property of an image to a list of terms.

FYI, I'm a chemist so the image is a molecule, the ranking is stability. But in principle it could be matching a set of colour patches to the verbal names of the colours "red", "blue", "yellow"

Note that this quiz is not using any IP restrictions.

Anyone have any ideas of what is going on and how it can be fixed ?

In reply to Ian Hunt

Re: Images missing in answer choices

by Laura Medeiros -

I had a similar problem. My images would not show. My problem was my images were not moving to the new course when I started over for a new semester. I teach art history so image identification is a huge portion of the quizzes.

On my computer when I previewed the quiz it looked great. Even when I logged in as a student. But students were getting broken links.

My quizzes and questions transfered over no problem, but the images were staying linked to the image file from the previous semester, and the images would not display. Once I moved the image folder to the current course and confirmed the URL for accurate links (I did have to update the URL for every question, but only the course # part) everything worked fine.