Where is each Assignment File Type stored?

Where is each Assignment File Type stored?

by Blair F. -
Number of replies: 4
Picture of Particularly helpful Moodlers

I'm trying to find where the file type choices (not options, but choices) are stored for each assignment. Does anyone know?

I ask because I'm trying to limit the file types allowed in assignments that have already been created and thought maybe we could back-end the data table.


Average of ratings: -
In reply to Blair F.

Re: Where is each Assignment File Type stored?

by Ken Task -
Picture of Particularly helpful Moodlers

moodledata/filedir/

Do a query of mdl_files table:

select userid,contenthash,filename,filearea,filesize,timemodified,mimetype,component from mdl_files where filename like '%.docx';

contenthash is the location of the file in moodledata/filedir/

Example of contenthash from query:

98fa2478f159d31bf2c2ba521bec3cc58d628977

cd /moodledata/filedir/

find ./ -name 98fa2478f159d31bf2c2ba521bec3cc58d628977

displays:

./98/fa/98fa2478f159d31bf2c2ba521bec3cc58d628977

file -b ./98/fa/98fa2478f159d31bf2c2ba521bec3cc58d628977

displays mimetype.

'SoS', Ken

In reply to Ken Task

Re: Where is each Assignment File Type stored?

by Blair F. -
Picture of Particularly helpful Moodlers
Thanks, Ken, but I'm not looking for the actual files. I'm looking for where the particular file type choices made for an assignment are stored. They are not in the mdl_assign table.

For example, one assignment allows documents *.doc *.docx while another allows spreadsheets *.xls. Where are the allowable file types stored and associated with each assignment?
In reply to Blair F.

Re: Where is each Assignment File Type stored?

by Ken Task -
Picture of Particularly helpful Moodlers

Ohhhhh!   In typical moodle fashion, not the table that one *might* logically assume, but in .. mdl_assign_plugin_config .

'SoS', Ken

Average of ratings: Useful (1)