Delete courses

Administration tool ::: tool_deletecourses
Maintained by Charles Fulton, Andrew Zito
This admin tool allows managers to delete all courses in a category (including subcategories if desired). The tool may optionally bypass the recycle bin for improved performance.
Latest release:
786 sites
279 downloads
22 fans
Current versions available: 6

This admin tool allows managers to delete all courses in a category (including subcategories if desired). The tool may optionally bypass the recycle bin for improved performance. It uses an Adhoc task to process the actual deletions and requires cron to be enabled.

Screenshots

Screenshot #0
Screenshot #1

Contributors

Charles Fulton (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Shaun T
    Thu, 8 Nov 2018, 2:43 AM
    Would it be possible to have it run scheduled vs adhoc? What changes would be necessary?
  • Charles Fulton
    Thu, 8 Nov 2018, 2:44 AM
    Shaun T, it could be done, but it would be a fundamentally different plugin. What are you trying to accomplish?
  • Shaun T
    Thu, 11 Apr 2019, 5:29 AM
    Sorry Charles, I mssed your comment. We use a custom middle ware application to move courses to a deleted category and then delete them once a day. However sometime there are so many courses to delete the connection between our middleware and moodle times out. I'm looking for something that will delete all the courses in a specific category daily.
  • Charles Fulton
    Sat, 13 Apr 2019, 3:01 AM
    Shaun T: Gotcha, that's an interesting use case. Effectively you want Moodle categories to have a concept of a retention policy, with it being something other than indefinite in one use case. I could see accomplishing that within this plugin. I've logged your suggestion here: https://github.com/LafColITS/moodle-tool_deletecourses/issues/11.
  • Asher Baig
    Sat, 20 June 2020, 3:28 AM
    How to find your tool?
  • Barry Matthias
    Wed, 24 June 2020, 5:25 PM
    Can you add a cli feature for this module so it can be ran from the command line?
  • Charles Fulton
    Fri, 26 June 2020, 1:21 AM
    Hi Barry, that's a good idea and I've logged it here: https://github.com/LafColITS/moodle-tool_deletecourses/issues/13.
  • Barry Matthias
    Thu, 9 July 2020, 12:01 AM
    Afternoon Charles

    I also doubled up on this deletion issue and charged this with Moodle HQ https://tracker.moodle.org/browse/MDL-69139
    i do think however this module would be a better solution rather than waiting for Moodle HQ to implement something.
  • Charles Fulton
    Sat, 11 July 2020, 1:39 AM
    Please see the README for instructions on using the tool with Boost: https://github.com/LafColITS/moodle-tool_deletecourses/blob/master/README.md.
  • Alain Raap
    Fri, 2 Oct 2020, 4:17 PM
    Hi, Charles

    When will your cli version be available? Is it also possible to select courses that aren't used anymore befory a given date? And is your plugin working in Moodle 3.9?
  • Charles Fulton
    Fri, 2 Oct 2020, 9:55 PM
    Hi Alain,

    The current version was tested with Moodle 3.9 and works. There's no date for the cli version; I still think it's a good idea but I've no time to work on it. Regarding selecting courses based on date, there's no such functionality and no current plans to include it.

    Best,

    Charles
  • Alain Raap
    Mon, 5 Oct 2020, 6:58 PM
    Hi Charles,

    Thanks for you message. I tried to install the plugin, but I can't see a button in the course administration to delete the courses.
    Do you have an example where I can find it?
  • Susana Willemoës
    Wed, 7 Apr 2021, 8:20 PM
    Hi Charles,
    Thank you for the plugin.
    I ve installed it in Moodle 3.5.2+, correctly found the link Delete all courses in my category, run manually the cron.php and see only one adhoc task "Execute adhoc task: core_course\task\course_delete_modules" , but courses are not deleted, they still appear in the list. What can be the problem? I've denyed the access to the link to manager rol too, so it is only visible to main managers.
  • Fabian Glagovsky
    Thu, 7 Oct 2021, 2:49 PM
    The plugin is not an option on the courses and categories page. You would need to navigate to the category via this link: https://[YOUR SITE]/course/index.php?categoryid. Click on the category to delete and then click the gear icon to manage the category. Select the option for Delete all courses.
    After you click on 'Delete all courses' you will then have the option to include subcategories and bypass the recycle bin. Bypassing the recycle bin will also help speed up the deletions.
  • Greg B
    Fri, 19 Nov 2021, 8:29 AM
    Thanks for this plugin - it saved me a heap of time!

    Interestingly, I fell into the same issue as others, expecting to see this in the System Administration area..
    But per your directions, it's in the student-view, but with admin access, you navigate to the category, then click on the cog to find the Delete All courses option. smile
1 2
Please login to post comments