Images in quiz question not displaying in 2.0

Images in quiz question not displaying in 2.0

i le Rob Monk -
Number of replies: 6

When I preview my quiz the images in my question will not display.

When I go to edit the question the image displays just fine.

When I preview the individual question in the question bank it displays fine. Help.

Average of ratings: -
In reply to Rob Monk

Re: Images in quiz question not displaying in 2.0

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

Hi Rob,

I do not have this problem on my moodle 2.0.2 test site (see attached). How do you insert your images? Where do they reside (in your "private files", or you upload them when you create the question, etc.). I see that the 4 individual images are inserted in table cells. Have you tried to just make one image containing them all (as in my attached example).

Oh, and I suggest using the option Number the choices? : no numbering, to avoid the confusion between the lowercase letters numbering and your A, B, ... question choices!

Joseph

Attachment 07-03-2011 12-25-53.jpg
In reply to Rob Monk

Re: Images in quiz question not displaying in 2.0

i le Arno Wilbers -

Hi,

Ik have exactly the same problem. When previewing my questions, images are not displayed.
When editing or previewing the individual questions, images are displayed ok.

Running the test as a student also gives no images at all.

URL to the images in the questions (example):
http://<<localhost>>/pluginfile.php/547/question/questiontext/637/167/144/Vluchtweg.gif

When I paste this URL directly in the browser I get a 404 error (File or directory not found)

Upload of the files is done by the filepicker (Insert/Edit image) and seems to work fine

Some useful info:
- I'm running the latest build (20110303)
- Running on Server 2008R2 with IIS 7
- MySql version 5.5.9
- PHP version 5.3.5

In the php-errors.log (\Windows\temp\), I have noticed that everytime I preview a quiz, the following error is added in the log:

[08-Mar-2011 16:52:03] PHP Warning:  Module 'curl' already loaded in Unknown on line 0
[08-Mar-2011 16:52:03] PHP Warning:  Module 'gd' already loaded in Unknown on line 0
[08-Mar-2011 16:52:03] PHP Warning:  Module 'mbstring' already loaded in Unknown on line 0
[08-Mar-2011 16:52:03] PHP Warning:  Module 'mysql' already loaded in Unknown on line 0
[08-Mar-2011 16:52:03] PHP Warning:  Module 'mysqli' already loaded in Unknown on line 0
[08-Mar-2011 16:52:03] PHP Warning:  Module 'openssl' already loaded in Unknown on line 0
[08-Mar-2011 16:52:03] PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0
[08-Mar-2011 16:52:04] PHP Warning:  Module 'soap' already loaded in Unknown on line 0
[08-Mar-2011 16:52:04] PHP Warning:  Module 'xmlrpc' already loaded in Unknown on line 0
[08-Mar-2011 16:52:04] PHP Warning:  Module 'curl' already loaded in Unknown on line 0
[08-Mar-2011 16:52:04] PHP Warning:  Module 'gd' already loaded in Unknown on line 0
[08-Mar-2011 16:52:04] PHP Warning:  Module 'mbstring' already loaded in Unknown on line 0
[08-Mar-2011 16:52:04] PHP Warning:  Module 'mysql' already loaded in Unknown on line 0
[08-Mar-2011 16:52:04] PHP Warning:  Module 'mysqli' already loaded in Unknown on line 0
[08-Mar-2011 16:52:04] PHP Warning:  Module 'openssl' already loaded in Unknown on line 0
[08-Mar-2011 16:52:04] PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0
[08-Mar-2011 16:52:04] PHP Warning:  Module 'soap' already loaded in Unknown on line 0
[08-Mar-2011 16:52:04] PHP Warning:  Module 'xmlrpc' already loaded in Unknown on line 0
[08-Mar-2011 16:52:05] Default exception handler: No such attempt ID exists Debug: 
* line 474 of \mod\quiz\attemptlib.php: moodle_exception thrown
* line 1777 of \mod\quiz\lib.php: call to quiz_attempt::create()
* line 3227 of \lib\questionlib.php: call to quiz_question_pluginfile()
* line 658 of \pluginfile.php: call to question_pluginfile()

[08-Mar-2011 16:52:06] Default exception handler: No such attempt ID exists Debug: 
* line 474 of \mod\quiz\attemptlib.php: moodle_exception thrown
* line 1777 of \mod\quiz\lib.php: call to quiz_attempt::create()
* line 3227 of \lib\questionlib.php: call to quiz_question_pluginfile()
* line 658 of \pluginfile.php: call to question_pluginfile()

I hope someone is able to help, since we're not able to use any of the quizzes for the moment...
Thanks and best regards,
Arno

In reply to Arno Wilbers

Re: Images in quiz question not displaying in 2.0

i le Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Grrr! I can reproduce this. Will try to fix tomorrow. MDL-26735

In reply to Tim Hunt

Re: Images in quiz question not displaying in 2.0

i le Rob Monk -

Still happening for me!!

In reply to Rob Monk

Re: Images in quiz question not displaying in 2.0

i le Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If you know how the Moodle development process works, and look at MDL-26735, then you would not be surprised that it is still broken.

The status of the bug is that the fix (which I made a couple days ago) is ready for review.

Next Monday, the integration team will review all the pending patches and integrate (or reject) then. Then on Tuesday, all those changes will be tested. The on Wednesday, if no problems are found, there will be a new weekly release.

In the mean time, if you are impatient, and have the necessary technical skills, you can get the fix from https://github.com/timhunt/moodle/compare/master...MDL-26735 and use it in your Moodle. That is actually a helpful thing to do, because you are testing the change for us before it is released to the rest of the world. So, grabbing patches early and reporting on whether they work is good.

In reply to Tim Hunt

Re: Images in quiz question not displaying in 2.0

i le Arno Wilbers -

I have copied the code and exchanged the attemplib.php and lib.php on the server and as far as I was able to test, things work fine now!

Thanks for your help Tim!