Reports: Course size

Maintained by Picture of Dan MarsdenDan Marsden, Picture of Peter BulmerPeter Bulmer, Picture of Catalyst ITCatalyst IT
This plugin provides approximate disk usage by Moodle courses.
4000 sites
65 fans
Current versions available: 6

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:


Screenshot #0


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


  • Picture of Dan Marsden
    Fri, Jan 6, 2017, 4:51 AM
    do you have the path to du set in your installation?
  • Picture of kaanchan adhikary
    Sat, Mar 25, 2017, 11:20 AM

    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 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 ( and linked version (

    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.

  • Picture of Dan Marsden
    Tue, Mar 28, 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, otherwise feel free to contact us directly if you are looking for commercial level support.
  • Picture of Anis Jradah
    Tue, Apr 11, 2017, 3:28 PM
    Dear Dan,
    Kindly advise if Course size plugin supports Moodle 3.1.3?

    Best regards,
  • Picture of Dan Marsden
    Tue, Apr 11, 2017, 4:43 PM
    @Anis - yes.
  • Picture of Andreas Schenkel
    Sun, Nov 5, 2017, 5:05 PM
    Is there a version for moodle 3.3?
  • Picture of Dan Marsden
    Mon, Nov 6, 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, Jan 30, 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, Jan 31, 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 Jari Vilkman
    Thu, Jun 21, 2018, 4:00 PM

    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, Jun 21, 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.
  • Picture of Chris Pratt
    Fri, Jul 20, 2018, 5:14 PM

    Just ran the latest version and it reports the courses fine, but when I click 'view stats' each course shows 0MB for each category listed?
  • Picture of Dan Marsden
    Mon, Jul 23, 2018, 4:47 AM
    @chris - that's a bug with the sql being used to generate the stats - there's a fix in the github branches for it.
  • Picture of Igor Bursin
    Sat, Dec 7, 2019, 9:47 PM
    Is this plugin compatible with Moodle 3.8?
  • Picture of Dan Marsden
    Mon, Dec 9, 2019, 6:01 AM
    should be - but no one I know has tested it to make sure. Feel free to help by testing and reporting any bugs/issues you find to our bug tracker (linked above.)
Please login to post comments