local/Recycle bin

Revision as of 16:27, 25 August 2015 by German Valero (talk | contribs) (added page for Recycle bin local plugin)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This plugin adds a "recycle bin" for course modules to Moodle.

It requires a core hack as there is no pre-cm-deleted event, you will need to add a line to '/course/lib.php' (function course_delete_module), right after the first "if()".

  • You must first find the moodle/course folder and locate there the lib.php file that you will need to modify:



  • You need to find exactly these lines:
function course_delete_module($cmid) {
         return true;
  • You will be adding exactly these two lines:
   // Notify the recycle bin plugin.

Your modified (hacked file) must look exactly like this lines 658 and 1659 with the added text::


  • You will then have a Recycle bin available inside the Administration block: