Hello all,
Is there a way that only the large files (particularly video files - from uploaded assignments, and course material) that have been uploaded in old courses? At our school, they want to keep track of login history, assignment grades, etc but the storage has largely grown.
First, define 'old courses'. How old?
and, what is your schools record retention requirements?
Here's what one could do ... but not recommended ...
Find all the videos that were uploaded via query of DB mdl_files table which includes the contenthash column.
Contenthash column is the actual name of the file and location in moodledata.
Example: contenthash is: asvijwqergjiewqewdhejakdled
Location: moodledata/filedir/as/vi/ and the file itself is asvijwqergjiewqewdhejakdled
Very carefully delete the file asvijwqergjiewqewdhejakdled then create a file that has no bytes in it's stead ... file asvijwqergjiewqewdhejakdled has 0 byte size.
Side affect - videos broken - never to return.
If you do that to a video that was for course content, opps! Put it back!
It's good that you have a 'space' concern ... means your Moodle is being used! Maybe, however, rather than something like above, how about just getting more space?
'SoS', Ken
Hi Alberto - Have you explored the "Reset course" feature? https://docs.moodle.org/en/Reset_course