Recycle bin

General plugins (Local) ::: local_recyclebin
Maintained by Skylar Kelty
This plugin adds a "recycle bin" for course modules to Moodle.

Recycle bin 1.2 (Build: 2015081201)

Moodle 2.8, 2.9
Released: Wednesday, 12 August 2015, 10:02 PM

Moodle Recycle Bin

This plugin adds a "recycle bin" for course modules to Moodle. It requires a core hack.

Installation

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()".

diff --git a/course/lib.php b/course/lib.php
index e49bdf1..5f8d6e6 100644
--- a/course/lib.php
+++ b/course/lib.php
@@ -1654,6 +1654,9 @@ function course_delete_module($cmid) {
         return true;
     }

+    // Notify the recycle bin plugin.
+    \local_recyclebin\Observer::pre_cm_delete($cm);
+
     // Get the module context.
     $modcontext = context_module::instance($cm->id);

Menu

Image of Menu

Version information

Version build number
2015081201
Version release name
1.2 (Build: 2015081201)
Can be updated to
1.4 (Build: 2015082600) (2015082600), 3.4 (Build: 2016040600)
Maturity
Stable version
MD5 Sum
f2139b52c4d360b0987520db69736ca0
Supported software
Moodle 2.8, Moodle 2.9

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS branch
master

Default installation instructions for plugins of the type General plugins (Local)

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder in the "local" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation.