Reports: Course size

report_coursesize
Maintained by Picture of Dan Marsden Dan Marsden, Picture of Peter Bulmer Peter Bulmer, Picture of Catalyst IT Catalyst IT
This plugin provides approximate disk usage by Moodle courses.
1811 sites
1k downloads
37 fans
Moodle 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0

This plugin provides approximate disk usage by Moodle courses.


There are 2 known shortcomings with this plugin

  • If the same file is used multiple times within a course, the report will report an inflated disk usage figure as the files will be counted each time even though Moodle only stores one copy of the file on disk.
  • If the same file is used within multiple courses it will be counted in each course and there is no indicator within the report to inform the user if they delete the course or files within the course they will not free that amount from disk.

It should be possible to improve the report to address these issues - we'd greatly appreciate any patches to improve the plugin!

To improve the performance of the total disk usage check, you should configure the pathtodu in your installation:
https://docs.moodle.org/en/System_paths#Path_to_du

Screenshots

Screenshot #0

Contributors

Picture of Dan Marsden
Dan Marsden (Lead maintainer)
Picture of Peter Bulmer
Peter Bulmer: Developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Just wondering . . .
    Mon, 14 Dec 2015, 4:50 PM
    I'm not sure. I would have put my deletions at less than 400Meg.
    So as an experiment I went in today and deleted a bunch of backup files, around 400Meg. The amount reported by your report rose by a Gig or so.
    Maybe there is someway it is being counted twice.
    I'll now wait a few days until all the deletions are done by the trash collection and see what happens.
    I have not solved the problem, just postponed any more thinking about it.

    Thanks for the reply Peter.
  • Ricardo Caiado
    Wed, 7 Dec 2016, 8:51 PM
    Any upgrade to Moodle 3.2?
  • Picture of Dan Marsden
    Thu, 8 Dec 2016, 3:56 AM
    I don't think anyone here has tested it properly on 3.2 yet, but the existing version will probably still work - let us know if there are any issues by adding a new issue in the github tracker.
  • Picture of Virgil Ashruf
    Thu, 5 Jan 2017, 7:21 PM
    This plugin seems to be failing a lot with us lately with the maximum execution time being reached and the script halting. Especially in very large sites (20GB+ on disk and millions of records in the files table). The source does not give away that the disk is being checked, rather it's an elusive join that I think it's failing on.

    What is the proper setup to get this working properly? Do you think a scheduled task might be in order?
  • Picture of Dan Marsden
    Fri, 6 Jan 2017, 4:51 AM
    do you have the path to du set in your installation? https://docs.moodle.org/32/en/System_paths#Path_to_du
  • Picture of kaanchan adhikary
    Sat, 25 Mar 2017, 11:20 AM
    Hi,

    Can I get some assistance in installing this plugin for Moodle 2.4. I looked through the README and tried the following, but do not see the coursesize report appearing anywhere:
    1. uploaded 20170324-github.com-moodle-report_coursesize-master.zip to admin/report and unzipped content to folder "coursesize"
    2. went to Site administration->Notifications but did not see any message relating to new plugin
    3. checked under Site administration->Reports and Site administration->Courses but did not see any relevant links
    3. checked under Site administration->Plugins->Plugins overview but did not see Coursesize plugin mentioned

    I also tried the same steps above for the latest github version (https://github.com/catalyst/moodle-report_coursesize) and moodle.org linked version (https://moodle.org/plugins/report_coursesize).

    I am in same boat of needed to clean up a very large moodledata directory, and wanted to see how much space courses may be taking up.

    Thanks for any help.

    Peace
  • Picture of Dan Marsden
    Tue, 28 Mar 2017, 4:48 AM
    @Kaanchan, the latest version definitely doesn't support 2.4 - if you have a look at the versions available for download in this plugin entry there is an old version that might work with 2.4 but we no longer support it - if you are looking for free assistance you could ask for help in the community forums here on moodle.org, otherwise feel free to contact us directly if you are looking for commercial level support.
  • Picture of Anis Jradah
    Tue, 11 Apr 2017, 3:28 PM
    Dear Dan,
    Kindly advise if Course size plugin supports Moodle 3.1.3?

    Best regards,
    Anis
  • Picture of Dan Marsden
    Tue, 11 Apr 2017, 4:43 PM
    @Anis - yes.
  • Picture of Andreas Schenkel
    Sun, 5 Nov 2017, 5:05 PM
    Is there a version for moodle 3.3?
  • Picture of Dan Marsden
    Mon, 6 Nov 2017, 4:05 AM
    @Andreas - yes, the code it gihub supports 3.3 and 3.4 - I've updated the plugins db here with the latest code.
  • Picture of D patel
    Tue, 30 Jan 2018, 10:10 PM
    Hi Dan,
    can you provide me a SQL Query for the Course size as i am working on some ad hoc reports to count Total Sizes by all Coursers(Including the Back up Size), Also Include the Category and Sub category in the reports.
  • Picture of Dan Marsden
    Wed, 31 Jan 2018, 3:58 AM
    @Life - try using the moodle forums to ask for that sort of support - someone else might have the time to put something together for you.
  • Picture of Urpo Karhula
    Thu, 21 Jun 2018, 4:00 PM
    Hello,

    1. This plugin shows 200 less courses that I have in total (show on the moodle registration page), what can explain this?

    2. What does this mean "Courses that do not use any file storage have been excluded from this report." I can see 0MB courses on the list also.
  • Picture of Dan Marsden
    Thu, 21 Jun 2018, 4:42 PM
    This plugin looks at the files table in moodle - if your courses do not have any records in the files table they will not show in the report. It is also possible that some courses have entries in the file table with 0 filesize on disk and the report also performs some rounding.
1 2
Please login to post comments