Adding an image to a Quiz Question?

Adding an image to a Quiz Question?

Mark McCall發表於
Number of replies: 16
I am not sure if this still under development or currently a bug. But, in the current 2.0 release it is impossible to add an image to a quiz question unless you have the URL for the image.

The insert image of the Text Edit Toolbar is not showing the option to find or upload an image. (See attachment)

The drop down box used to add images is disabled because there are no course files. However, I have tried (as admin) to add a file to all of the folders in the course and it still is not active. Does the drop down box map to a specific directory in 2.0 instead of the traditional course files?


附件 Upload_Quiz.png
評比平均分數: -
In reply to Mark McCall

Re: Adding an image to a Quiz Question?

Tim Hunt發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
In reply to Tim Hunt

Re: Adding an image to a Quiz Question?

Mark McCall發表於
Thanks for the update.
In reply to Mark McCall

Re: Adding an image to a Quiz Question?

Dobby Spencer發表於

Hi,

I am using Moodle 2.0 and the images are not appearing in the matching question type. All I see are the image place holders. When I check the properties of the place holder in the browser I see a URL such as this, http://localhost/pluginfile.php/47/qtype_match/subquestion/3/24/5/Magazine.gif. When I am composing the question I can see the images in the question editor but they are not appearing when the quiz is previewed or attempted. If I paste the URL in another browser window I get a message that the file cannot be found. Has anyone else encountered this problem? Where in the directory structure would these images be stored? If I know I could have a work around by copying the image there. 

In reply to Dobby Spencer

Re: Adding an image to a Quiz Question?

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片
Dobby "I am using Moodle 2.0 and the images are not appearing in the matching question type."
When you create your matching question, how do you actually put an image in your question's choices? Please provide a step-by-step (and, if possible, some screenshots).
Joseph
In reply to Joseph Rézeau

Re: Adding an image to a Quiz Question?

Dobby Spencer發表於

On the Edit a Matching Question pages, I use the Insert/edit Image icon from the html editor for each question. When the Insert/edit image dialog appears, I use the upload file option and chose the file from the file system. The image is inserted and I can see it in the html editor.

I have attached screenshots of the inserted image in the question editor and the preview page.

附件 Inserted_image_and_preview.JPG
In reply to Dobby Spencer

Re: Adding an image to a Quiz Question?

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片

Hi Dobby,

1.- You had originally posted your question to the Lesson module forum, where I advised you to post it to this Testing and QA forum since it is related to Moodle 2.0 Preview version. Actually I see from your screenshots that you are talking about the Quiz module matching question, not the Lesson module. Please respect the Moodle terminology when posting to these forums, it really helps people help you.wink

2.- I have tried to reproduce the problem you describe but could not. Inserting images in the left column of pairs to be matched works fine (see attached screenshot).

3.- When you preview your matching question, are you in the same teacher role as when you create/edit the question? Or have you switched from teacher to student role?

4.- In preview mode, what information do you see about those missing images when you right-click on the missing image icon? For example, using Firefox, right-click on icon, select Image Properties and you should see something like the following (for my Denmark flag pic):

http://localhost/moodle/pluginfile.php/14/qtype_match/subquestion/0/3/2/denmark.jpg

ATB

Joseph

附件 image01.jpg
In reply to Joseph Rézeau

Re: Adding an image to a Quiz Question?

Dobby Spencer發表於

Joseph,

I am logged in as Admin when I create and preview the question. When I preview I just see the image place holders but the images are not appearing. When I show the properties on one of the image I get the following URL:

http://localhost/pluginfile.php/47/qtype_match/subquestion/5/24/5/Magazine.gif

In reply to Dobby Spencer

Re: Adding an image to a Quiz Question?

Mary Cooch發表於
Documentation writers的相片 Moodle HQ的相片 Particularly helpful Moodlers的相片 Testers的相片 Translators的相片
Dobby - can you see any images on your Moodle 2.0 site?
In reply to Mary Cooch

Re: Adding an image to a Quiz Question?

Dobby Spencer發表於

Mary,

I can see all other images without any issues. Should I upgrade? The information below was taken from the version.php file.

$version = 2010080901;

$release = '2.0 Preview 4+ (Build: 20100818)';

In reply to Dobby Spencer

Re: Adding an image to a Quiz Question?

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片
Dobby,
Have you tried with JPEG images (instead of GIF)? Can you insert images in the other quiz question types? Is it only with the matching question type that you are having a problem?
Try to upgrade to the very latest Moodle 2.0 Preview version.
Joseph
In reply to Joseph Rézeau

Re: Adding an image to a Quiz Question?

Dobby Spencer發表於

Joseph,

I have used both gif and jpg images and none are appearing. I also did an upgrade to Moodle 2.0 Preview 4+ (Build: 20100908) but nothing has changed; I still am not seeing the images. Could it be that the URL that it is trying to locate the image in is incorrect? How does the sample URLs below translate to the physical location of the file?

http://localhost/pluginfile.php/47/qtype_match/subquestion/9/24/5/Magazine.gif

http://localhost/pluginfile.php/47/qtype_match/subquestion/9/24/6/PresentArmsSquadThreeFront.jpg

Is there some kind of log that will show why it isunable to find the file?

Dobby

In reply to Dobby Spencer

Re: Adding an image to a Quiz Question?

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片
Dobby, you have not answered my question:
"Can you insert images in the other quiz question types? Is it only with the matching question type that you are having a problem?"
Joseph
In reply to Joseph Rézeau

Re: Adding an image to a Quiz Question?

Dobby Spencer發表於

Joseph,

I apologize for missing the second question. I can insert images in other quiz question types and they all show ok. I have tested True/False, Short Answer and Multiple Choice. I noticed that the URL for the images under the matching question type looks slightly different from the others:

Question Type URL

True/False

http://localhost/pluginfile.php/47/question/questiontext/0/30/30/Sunset.jpg

Short Answer

http://localhost/pluginfile.php/47/question/questiontext/0/31/31/Magazine.gif

Multiple Choice

http://localhost/pluginfile.php/47/question/questiontext/0/32/32/Upper%20Receiver.gif

Matching

http://localhost/pluginfile.php/47/qtype_match/subquestion/0/33/8/Sunset.jpg

For the matching question type, the URL has /qtype_match/subquestion whilt the others have /question/questiontext. Not sure if this is a factor but I thought I'd mention it.

In reply to Dobby Spencer

Re: Adding an image to a Quiz Question?

Tim Hunt發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
This is a known bug that Dongsheng fixed the other day. Try upgrading.