Course size

Reports ::: report_coursesize
Maintained by Dan Marsden, Peter Bulmer, Catalyst IT
This plugin provides approximate disk usage by Moodle courses.
Latest release:
4574 sites
77 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


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

Comments RSS

Show comments
  • Tue, Aug 4, 2020, 9:43 PM
    Hello and thanks for this good plugin. Problem I see is that I don't know how to refresh the plugin. For example, I have found out that a the file sizes in private space of a user, X, is large and he has deleted the files. When I rerun the course size in report section, I see previous results quickly. Seems that it has cached the previous results. I also tried to purge all cache via Site administration-> Development-> Purge caches but has no effect.
  • Wed, Aug 5, 2020, 5:32 AM
    @Mahmood - the current version of this plugin shows "live" data - it doesn't cache specific disk usage like private file areas, but Moodle doesn't physically remove files straight away on deletion - it "flags" them for deletion and then relies on various cron processes to delete the files. Try asking in the forums for more details or do a search for "Moodle Trash files" and it might show up a few related posts.
  • Ricardo Caiado
    Tue, Aug 18, 2020, 4:38 AM
    Is it compatible with 3.9+ version of Moodle?
  • Tue, Aug 18, 2020, 6:03 AM
    @Ricardo - we're not aware of any issues using the latest version (in github) on a 3.9 site. If you run into any issues feel free to report them to our github tracker. thanks.
  • Ricardo Caiado
    Tue, Aug 18, 2020, 6:05 AM
    @Dan: ok. I will let you know.
  • Wazza
    Thu, Sep 10, 2020, 2:45 PM
    Could you make this plugin more user friendly for large sites? Our Moodle has around 20.000 courses. The report is not working for large Moodle sites or takes forever to load. Perhaps something with pagination? Moodle 3.9.1 btw.
  • Thu, Sep 10, 2020, 4:04 PM
    @richard - pull requests are always welcome! Make sure you have pathtodu set in moodle and you might also want to take a look at the async branch in github for an alternative version.
  • Mon, Sep 28, 2020, 6:29 PM
    Does this plugin still work well in Moodle 3.9.1@Richard?
  • Thu, Dec 17, 2020, 12:12 AM
    Hi Dan, I submitted a pull request to address some language issues. We have multi-language courses with multi-language course and category names. Let me know if you have any questions or concerns. I tested the fix with Moodle in English and French.

    Also, any chance that you could update the list of compatibility here on so that we can install the plugin directly into newer versions of Moodle? It is listed as being only compatible up to version 3.7 but obviously works with later versions too.
  • Thu, Dec 17, 2020, 5:00 AM
    Thanks Michael - I've merged that in! smile
  • Sun, Feb 7, 2021, 10:52 PM
    Tested & Work Fine 3.10
  • Sun, Mar 28, 2021, 5:05 PM
    Question regarding Moodle version 3.10. Recently we have upgraded to this version, but the plugin manager keeps reporting report_coursesize as outdated. But the version suggested is lower than that installed:

    - installed plugin version: 2019052800
    - version suggested: 2016051600 (There is a new version 2016051600 available!)

    Wouldn't you know how to remedy this?
  • Mon, Mar 29, 2021, 5:12 AM
    that looks like a bug with Moodle's version checker - I've reported it here:
  • Fri, Jul 9, 2021, 11:35 PM
    Please, would you know when we will have a version of this plugin for Moodle 3.9, 3.10?
  • Sat, Jul 10, 2021, 3:52 AM
    @clovis, the latest versions of all our plugins are in the github repository - this definitely supports 3.9 and and I have it on a 3.11 site but don't think anyone has actually "viewed" the report to make sure it's working but I assume it does. We are currently looking at automating the upload of the latest versions of our plugins to the plugins db but in the meantime please download direct from github -thanks.
1 2 3 4
Please login to post comments