Missing Images in Questions

Missing Images in Questions

by Conn Warwicker -
Number of replies: 4
Picture of Core developers Picture of Plugin developers

Moodle Version: 3.2


Hi,

This is happening on both of our Moodles, so it's not confined to one Moodle instance.

Steps:

1) Add/Edit a question on the questionnaire

2) Using the moodle text editor add an image -> browse repositories -> Upload a file -> Pick the image from my PC 

3) Save the question


When editing the question, the image appears fine in the text editor, e.g.




But then viewing the actual question, the image is broken:



On viewing the image URL inside the text editor, it is:

https://moodleserver/draftfile.php/362278/user/draft/108372349/cat.gif


On viewing the broken image URL when viewing the question, it is:

https://moodleserver/pluginfile.php/426106/mod_questionnaire/question/173/cat.gif


Which ends up with the error message:

Sorry, the requested file could not be found

More information about this error

Debug info: 
Error code: filenotfound
Stack trace:
  • line 496 of /lib/setuplib.php: moodle_exception thrown
  • line 1803 of /lib/filelib.php: call to print_error()
  • line 4621 of /lib/filelib.php: call to send_file_not_found()
  • line 37 of /pluginfile.php: call to file_pluginfile()

I have tested adding an image through the moodle text editor in other areas, such as a label on a course, and that works fine.


Does anyone have any idea why those draft images aren't saving for the questionnaire questions?


Thanks.



Average of ratings: -
In reply to Conn Warwicker

Re: Missing Images in Questions

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers

What version of the questionnaire are you using?

In reply to Mike Churchward

Re: Missing Images in Questions

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

2016020201

In reply to Conn Warwicker

Re: Missing Images in Questions

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers

The issue you are describing sounds like CONTRIB-6431 which was fixed in questionnaire release 3.1.1.

I believe you are using questionnaire release 3.1.0, correct? It will say on the main plugins page, or in the module's 'version.php' file.

If you are on Moodle 3.2, you should really upgrade to the latest 3.2 release of questionnaire. At the very least, you'll want the latest 3.1 release.

mike


In reply to Mike Churchward

Re: Missing Images in Questions

by Susana Willemoës -

Hello !! 

I m having a similar problem but in Moodle 2.7 : students can't  see the image in a question , though teacher & admin, can.

I ve noticed it's a permission problem: the question is in the questionnarie context (activity context) and if I change it to a course category,  students can see it. 

Mike, how can I give students permission to see images in an activity context category? I can t find the way... sad

Thank you!!

Average of ratings: Useful (1)