where the images are stored in moodle folder and database

where the images are stored in moodle folder and database

murshida jasmin -
回帖数:8
I am working on a project in moodle ,please notes the below points


1.where the images are stored in database or response of attended questions with image (table name ) 

2.Where the images are stored in moodle file.

回复murshida jasmin

Re: where the images are stored in moodle folder and database

Marcus Green -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像

It is quite complex. The files table contains a pointer to where the files are stored. The files are physically stored with the name hashed, i.e. an incomprehensible list of apparently random letters and numbers e.g. 5b1a8f4657a5d4b2ca3ee04a986947aea7294c3e

This page may help explain further

https://docs.moodle.org/dev/File_API_internals#File_storage_on_disk


回复Marcus Green

Re: where the images are stored in moodle folder and database

murshida jasmin -

1.if files are stored in a directory , then which directory contains the files.

2.is there any way to get directory where the images are stored.

回复murshida jasmin

Re: where the images are stored in moodle folder and database

Marcus Green -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像

Yes, you need to look up the name of the files in the files table which will give you the location of the folder where the file is stored (but the file will have an unrecognisable named derived from a hash), it is complex.

回复Marcus Green

Re: where the images are stored in moodle folder and database

murshida jasmin -
Could you please tell us where we can find the mapping between each attempt and the selected image? The mapping does exist because we can see the response for each student in the review section. For all non-image questions, responses are correctly marked in the table mdl_question_attempts, but when it comes to images, those entries contains null, and we're unable figure out where the actual response gets stored.
回复murshida jasmin

Re: where the images are stored in moodle folder and database

Marcus Green -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像

What question type are you referring to?

回复Marcus Green

Re: where the images are stored in moodle folder and database

murshida jasmin -

multiple choice question......

回复murshida jasmin

Re: where the images are stored in moodle folder and database

murshida jasmin -

multiple choice is the question type..........


回复murshida jasmin

Re: where the images are stored in moodle folder and database

Marcus Green -
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像

I don't understand the original question, there is no built in connection between images and answers in the multiple choice questions, can you explain further (perhaps with a screen shot)