Hi, I want to know the courses that has the higher disk usage in my moodle site because we are running out of space.
¿Anyone knows if there is any way to get this infor? Thanks.
$ du -sh *
P.S. The question is more suited for "General questions".
To install it with a file manager or (S)FTP, just go to your Moodle directory, then the admin directory and report subdirectory. In moodledir/admin/report make a new file named index.php and paste the contents of http://blog.ods.org/mood/coursesize.phps into it. After that, log in as administrator, then look at your "Site Administration" panel. Looks for a "Reports" link and then you should see a link with the name of "sitesize"
Elvedin, would you mind if I took that report and tweeked and merged it in with a few other reports I'm writing as a plug-in?
Works great - just missed one step. Here is the complete way (added step in bold):
1. Go to http://blog.ods.org/mood/coursesize.phps and copy
2. Paste above into a new file - index.php
3. go to your Moodle directory, then the admin directory and report subdirectory
4. create new folder, call it "sitesize"
5. In moodledir/admin/report/sitesize put the index.php file created in step 2.
6. After that, log in as administrator, then look at your "Site Administration" panel. Looks for a "Reports" link and then you should see a link with the name of "sitesize"
Sorry about that, but since we're talking about this code base, I should point out course quotas ( http://blog.ods.org/?p=23 ). The example shows how to enforce it for only the files interface, but the check could be put where ever other modules try to upload files. This is designed only to prevent instructors from exceeding the quota.
Feedback to make it better would be appreciated, apart from comments on use of deprecated functions.
The only suggestion I see at the moment would be to add the ability to sort the columns by either of the first two column headers:
|Backupdata Size||Total site size|
That way, your largest (or smallest) courses can easily be located.
Should add - this has been really helpful for me - found a couple of "large" backups that I didn't know existed.
Thanks. I'll add it into an "Other Reports" addin I'm creating.
You could add the sort as an optional parameter. It would be easier to code, but it would need to execute the query twice.