Images not showing in quizzes

Images not showing in quizzes

by Val Brooks -
Number of replies: 16

Hi,

I've looked through this forum (and others) to try to find a solution to the fact that images in my quiz don't show and although I've seen lots of suggestions, I haven't seen one to these problems (but sorry if I have missed them).

I have TWO problems (I'm using Moodle 1.7):

1) When  I backup and restore a course with a quiz in, the images don't always show up in the restored course quiz and I have to re-insert them. THis not only happens in my own 'Moodle' site but also if I try to restore into another Moodle site. How can I save myself from not having to do this?

2) Quite separately from the last problem, sometime in a new quiz, I CAN see images in the quizzes logging on to one computer but then when I log onto another computer, I can't! I have also experienced not being able to see images at all, then logging out and logging in again, seeing the little cross suggesting that the image is there but it won't even show when I right-click and choose 'Show Picture', and then when I log out and log in a third time, the images ARE there!

Is this suggesting a problem with my/other computers' browser? One of my students can't see the images on HIS computer but when I log in as him on MY computer, I CAN see the images.

Thanks in anticipation.

Val Brooks

Average of ratings: -
In reply to Val Brooks

Re: Images not showing in quizzes

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

Hi Val,

There can be a number of reasons why you are experiencing these problems. But first of all would you please answer these questions:

  1. Which moodle version are you using?
  2. How exactly do you "insert" images into your quizzes? When you are editing a question, do you:
    1. click on the Image to display: link;
    2. or, when you are typing the question text itself, within the HTML editor, do you click on the Insert Image icon?
  3. What type of questions do you have in your quizzes? (multichoice, essay, shortanswer, etc.).
  4. When you can not see the images being displayed in your quiz, if you right-click on their little missing image icon, and select Properties, what can you make of the URL (web address) of the missing image which you can read? How is that URL related to your former or previous course? to your former or previous site?

Joseph

In reply to Joseph Rézeau

Re: Images not showing in quizzes

by Val Brooks -
Hi Joseph,
In answer to your questions ( and I have seen that you've asked these before with other people so again I'm sorry if this is a repeat):
  1. I'm using Version 1.7.1(2006101010) (but the same thing happened when I was using Version 1.6.4(2006050540))
  2. I use the 'insert image' icon.
  3. My questions are multichoice and shortanswer.
  4. At the moment, I CAN see all my images but other people on other computers can't! Should I ask them to look at the properties on the image they can't see and let me know the url?
I'll have another go at restoring a quiz and checking the urls if you would like me to try that again but as I say, my major issue at the moment is why I can see the images and other people can't!
Thanks
Val
In reply to Val Brooks

Re: Images not showing in quizzes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The reason what is happening is appears confusing is that your web browser will be caching the images. So if you log in as a teacher and see the images, then log out and log in as a student who should not have access to the images, they will still be there in the browser cache.

To understand what is going on, you need to do a forced reload of the page, which is either CTRL+reload or SHIFT+reload depnding on the browser.

Hopefully that will let you see exactly what is happening. Once we know exactly what is happening, we will know whether there is a bug or not.
In reply to Tim Hunt

Re: Images not showing in quizzes

by Val Brooks -

Thanks Tim - I've tried that and when I log in as the student I don't see the image. However, the properties url is exactly the same and it is linked to the new course and not the old one. Having said that, I don't understand the number in the last bit of the url (e.g. ..../file.php?file=/19/acute_angle.jpg ) - i.e. the '19' which isn't the number assoiciated with the course or resource etc.

I also realise that the images I use are not stored in the course files - although when I 'insert an image' I do have to upload images, I don't quite understand where they are stored - is this the reason I am having problems? Would I be better inserting an image in a different way?

Does that help you understand my problem?

Thanks

Val

In reply to Val Brooks

Re: Images not showing in quizzes

by Val Brooks -

Just following up on that, I have just backed up the course from the 1.6 version, and restored it into the 1.7 version different moodle and when I went to preview, I got a message saying ‘Error; missing question answer!’ and ‘Could not load question options’. However, when I went to edit the quiz, I could see all the questions – plus images. I looked at the properties in the image and the url DID link to the old moodle.

Any help?

Val

In reply to Val Brooks

Re: Images not showing in quizzes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That is a separate bug. I've seen it reported before, but I can't remember if we ever tracked down the underlying cause and fixed it. Sorry.
In reply to Val Brooks

Re: Images not showing in quizzes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
19 should be the course id (of the course the question comes from if you are using published categories).

file.php does security checking, so the same URL may work if you are a teacher, but not if you are a student.
In reply to Tim Hunt

Re: Images not showing in quizzes

by Val Brooks -
I think I see - you mean if a student is not registered for the course the file comes from, then they won't see it? Does this really mean I need to 'rewrite' those questions with images so they are uploaded to the relevant course? That doesn't seem right - or have I got the wrong end of the stick?
In reply to Val Brooks

Re: Images not showing in quizzes

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

Hi Val,

1- "I also realise that the images I use are not stored in the course files - although when I 'insert an image' I do have to upload images, I don't quite understand where they are stored - is this the reason I am having problems?"

2- " if a student is not registered for the course the file comes from, then they won't see it?"

Exactly! That's why I asked you how you had inserted images in your quizzes. You can only insert into the quizzes (or any other activity, for that matter) of a given course images which have already been uploaded to the Files folder of that particular course.

I'm afraid you'll have to start again and edit all your quizzes to make sure you only use such images.

Joseph

In reply to Joseph Rézeau

Re: Images not showing in quizzes

by Val Brooks -

OK I think I've got it - before I read your last reply too!

It was the reference to the course number that eventually did it and you have just confirmend that.

I realised that when I was making a new quiz in a new course, I was using questions from another course and that was absolutely fine when there were no images in the questions. However, I then realised I needed to have my image questions in the 'default' folder for that new quiz/course and although I again tried to 'shortcut' the system by moving questions with images from another 'public' folder to the default, the url on the images remained the same so - as you say, I did have to start over and I have finally succeeded!!!!!

I have actually had this problem for quite a while as I make quizzes with images and then try to reuse the questions, so this has been a real pain. Could something be written in Moodle docs about this, do you think, as I searched in Moodle docs for some help with images in quizzes and there was nothing there? I think a mention of this issue would be really helpful to others when making new quizzes - what do you think?

Thank you for yours and Tim's help on this - I am SO glad I have understood now what is happening - goodness - here I am trying to use quizzes to help children learn and here I am learning SO much myself by exploring and experimenting and asking for help etc. What a great, albeit lengthy and frustrating, learning experience for me!!! I hope this helps some other people too.

In reply to Val Brooks

Re: Images not showing in quizzes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
here I am trying to use quizzes to help children learn and here I am learning SO much myself by exploring and experimenting and asking for help etc.

This is exactly the philosophy that Moodle is based on. What are sometimes called Martin's 5 laws:

http://docs.moodle.org/en/Pedagogy#Social_Constructionism_as_a_Referent

The first two or three are the ones that relate to your remark.
In reply to Tim Hunt

Re: Images not showing in quizzes

by mark furrer -
Hello

I have moodle 1.71

I do have the same problem.

I reuse multiple choice questions in another course. The text is displayed but the images not. Can anybody help?

Or is there a way to copy the questions into the new course instead of reusing it?

Please help, I need a solution for this problem.

Greets Mark
In reply to mark furrer

Re: Images not showing in quizzes

by Barbara Braun -
Hi Marc,
from what I read above - you need to create a folder in the new course, upload images to there and change the image links so they refer to the files in this folder in your new course. (It would make sense to zip the images in the old course and upload them in the new course).
What happens is: the questions are copied into your new course when you reuse them but the images are files in the other course - so they belong to the old course - I don't see any other work around as you will only have the right to see image files if you are a member of the specific course.
Greets
Barbara
In reply to Barbara Braun

Re: Images not showing in quizzes

by mark furrer -
Hi Barbara

In the moodle documentation I found the following:

There is a potential problem however if other courses try to use a question with an image: students will not be able to see the image unless they are also enrolled in the course that owns the question category. Also if using a question from a published category you should be aware of the fact that the teacher in the course owning the category could change or delete the question without your knowledge. If you don't want this it might be better to create or import a local copy of the question in your own course.

How can I create a local copy of the questions?

To your answer:

you need to create a folder in the new course
Where do I create a folder? Is this in the folder moodledata? The folders there have a numbering. How do i find out the correct number?

Greets Mark



In reply to mark furrer

Re: Images not showing in quizzes

by scott charlson -
Thanks for the dialouge guys.  This bug has been causing our IT, and Instructional Staff considerable headaches.  I think I'm starting to figure out some of the problems. 
In reply to scott charlson

Re: Images not showing in quizzes

by Louis Fleming -

There is a much simpler way to work it that continually making a folder in each new course when you are using pics in more than one course on the same server/moodle install.

I teach both web and multimedia classes using Moodle for quizzes and lessons.

Both classes covered Internet history which had some pictures.

I made a folder called internethistory inside the moodle directory and upload all pictures to it.

Questions link to /moodle/internethistory/filename.filetype

Now regardless of when those questions are used in web quizzes or media quizzes - they find the pictures automatically.

Large moodle servres- make folders called by teacher name instead of internethistory  or even get sophisticated

/moodle/teacher_name/course_name/picname.pictype

once teachers learn when they put their images , the path setting when editing questions is easy.

to move to a new server - one would not only have to back up the quiz(zes) but also copy the images folder and place it at same location on the new server. Not the easiest maybe - but 100% effective long as the images folder is not tied up with permissions and who can use it and who cant.

This has been my salvation this year with questions being shared between my web and media classes or between my Computer Science I and II classes.

Hope this helps

Louis

Andrews High School

Andrews Texas