Course size

Reports ::: report_coursesize
Maintained by Dan Marsden, Peter Bulmer, Catalyst IT
This plugin provides approximate disk usage by Moodle courses.
Latest release:
5979 sites
1k downloads
97 fans
Current versions available: 7

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

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

Comments RSS

Comments

  • Anthony Borrow
    Mon, 22 Sept 2014, 2:18 PM
    Dan and Peter,

    Many thanks for sharing this plugin with the Moodle community. I believe that the report will be very useful to site admins. This question of how big a course is comes up frequently. I noticed that the particular version provided does not specify for which version(s) of Moodle it is intended. I believe you can edit the details of the version and select the versions under Supported software.

    Please review the validation results and fix all of the issues mentioned. These changes are typically pretty easy to make but if you have any questions just let us know. In your case it is just a matter of adding the release to the version.php:

    Release name ($plugin->release) not found in version.php

    I noticed that you did not specify an issue tracker for your plugin. Providing a place for users of your plugin to report issues encourages participation and provides a way for users to report bugs, make feature requests, or suggest other types of improvements. There are a couple of options. You are welcome to request that a component be created in the Moodle Tracker. This will allow for you to become more familiar with how issues are managed in Moodle core but may take a little more time to setup. Alternatively, for folks who are using Github.com, you can use the issues feature of Github to handle such requests. Kindly let me know which of these two options seems best for you.

    Please provide a documentation URL. You are welcome to create your documentaiton in Moodle Docs, See http://docs.moodle.org/dev/Plugin_documentation for more information.

    I did not attempt to install and test the plugin because of not being sure for which versions it was intended; however, once that is done then we can take another look at it. For now, I am going to mark this plugin as needing more work until we get these issues resolved. Thanks for your patience with the review and approval process.

    Peace -Anthony
  • Anthony Borrow
    Tue, 23 Sept 2014, 2:18 PM
    Thanks Dan for the updated version. I have installed and tested on Moodle 2.7 and everything seems to be working as expected. If you or Peter have a free moment to create some documentation that would be great; however, sometimes on simple plugins such as a report it would seem OK to simply point to the README file on Github.com.

    It is encouraged to follow Moodle’s coding style as outlined in: http://docs.moodle.org/dev/Coding_style and http://docs.moodle.org/dev/Coding The code checker plugin can be quite helpful in fine tuning your code and can be found at: https://moodle.org/plugins/view.php?plugin=local_codechecker You may wish to consider using that tool to further improve your plugin. I only noticed some minor space issues but here are the results:

    Files found: 6

    report/coursesize/lang/en/report_coursesize.php
    report/coursesize/index.php - 0 error(s) and 1 warning(s)
    report/coursesize/db/access.php
    report/coursesize/version.php
    report/coursesize/settings.php
    report/coursesize/README.txt - 1 error(s) and 0 warning(s)

    Looks good so I am going to go ahead and approve. Peace - Anthony
  • Germán and Temudgin
    Tue, 23 Sept 2014, 11:36 PM
    Congratulations to the authors of this useful plugin.

    I have tried it in my University site and it is very convenient. I already translated it into Mexican Spanish in AMOS smile

    One minor issue, the final table shown for the top 10 users seems to have a hard-coded English language string for 'Disk Usage'. It would be better for the translators if this string were declared as a variable, available for translation in AMOS.
  • Dan Marsden
    Wed, 24 Sept 2014, 8:09 AM
    Thanks Anthony and thanks German,

    German - I've pushed a fix through for that issue, the string was already in the language pack but was hard-coded in the code. I've updated the version here in the plugins db but haven't incremented the version numbers. We have some internal issues with our own use of this plugin and if I bounce the version number and we update our internally hosted sites we'll have some problems! smile

    Should have those sorted soon.
  • Just wondering . . .
    Fri, 17 Oct 2014, 9:30 AM
    Two questions:

    How is the site data calculated? (I presume it is the size of the Moodledata database?)
    How is the individual usage calculated? What is it made up of? - I presume backups + Private files?

    -Derek
  • Dan Marsden
    Fri, 17 Oct 2014, 9:45 AM
    HI Derek,
    site data is calculated by the physical size used on the server inside the whole "moodledata" directory - it does a file system check to obtain this and doesn't use/look at the moodle database, so this will include all files uploaded directly to the server into the moodledata directory including things like file system repositories or custom added files.

    Individual user usage contains all files linked to a user context - which I think is only really the private files area but I haven't checked to see if there are other ways of storing data at the user context other than private files.
  • Arto Nieminen
    Thu, 20 Nov 2014, 11:55 PM
    I noticed that Manager role users cannot access the report. Capability 'report/coursesize:view' is allowed for default Manager role, but there is no required capability set for the Site administration link.
  • Dan Marsden
    Fri, 21 Nov 2014, 4:23 AM
    Thanks for the report, I've added a check for the capability on the settings page and pushed that fix into the github repo.
  • Marie CICHOCKI
    Mon, 27 Apr 2015, 3:59 PM
    Hello, is this pluggin compatible with Moodle 2.8.1 ? Thanks!
  • Dan Marsden
    Tue, 28 Apr 2015, 6:44 AM
    yes - I just updated the supported versions, Thanks.
Please login to post comments