Disk consumption inspector?

Disk consumption inspector?

by Visvanath Ratnaweera -
Number of replies: 4
Picture of Particularly helpful Moodlers Picture of Translators
Is there a plug-in of some sort available for the admin to inspect the disk consumption of a course? It should give a list of files, their hash, real name, size and the name of the activity it is referred from.
Average of ratings: -
In reply to Visvanath Ratnaweera

Re: Disk consumption inspector?

by Ken Task -
Picture of Particularly helpful Moodlers

What?  A useful tool for the Admin user? :|   Sorry ... none of which am aware.   Closest thing I've found is a moosh command but it doesn't go into any detail depth .... does course level totals.

Would make a nice 'feature request' but wouldn't think it would be a 'high priority' ... even if one had a $1Mil Moodle Association thang specifically for that.

'SoS', Ken


In reply to Ken Task

Re: Disk consumption inspector?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Pity, I hoped you'd knew.

You can imagine the background. Covid-19 has this delayed side-effect of swollen disks. So to "read the riot act" the Moodle admin needs evidence and suggestions how to save. Unfortunately this is going to be a) a repeated exercise b) done by many local Moodle administrators. Making a package is the only solution.

I remember that a whole series of plug-ins were written around the Moodle's repository concept and hoped there could be one with the said functionality.
In reply to Visvanath Ratnaweera

Re: Disk consumption inspector?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
An approach with no overhead would be an Ad-hoc database query. The only input is the courseid. The output would be a table with columns: filename, filesize, author, date, context (course itself or the resource or activity the file belongs to).

The tricky part is to navigate the context path in contextid. See for an example https://docs.moodle.org/38/en/ad-hoc_contributed_reports#List_course_resources_accumulative_file_size_and_count.

If somebody is ready to take the challenge, you are very welcome! I am pretty sure there are other