Moodle Plugins directory: Recycle bin: Versions: 2.1 (Build: 2015110900) | Moodle.org
Recycle bin
Local plugins ::: local_recyclebin
Maintained by
Skylar Kelty
This plugin adds a "recycle bin" for course modules to Moodle.
Recycle bin 2.1 (Build: 2015110900)
Moodle 2.7, 2.8, 2.9, 3.0
Released: понедељак, 9. новембар 2015, 19:31
Moodle Recycle Bin
This plugin adds a "recycle bin" for course modules to Moodle. It requires a core hack.
See plugin pages here: https://moodle.org/plugins/view/local_recyclebin
See documentation here: https://docs.moodle.org/29/en/local/Recycle_bin
Installation - course recyclebin
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);
Installation - category recyclebin (optional)
As there is no "pre-course-deleted" event, you will need to add a line to '/lib/moodlelib.php' (function delete_course), right after the second "if()".
diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index 456d0f1..aeb0853 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -4683,6 +4683,9 @@ function delete_course($courseorid, $showfeedback = true) {
return false;
}
+ // Notify the recycle bin plugin.
+ \local_recyclebin\Observer::pre_course_delete($course);
+
// Make the course completely empty.
remove_course_contents($courseid, $showfeedback);
Version information
- Version build number
- 2015110900
- Version release name
- 2.1 (Build: 2015110900)
- Can be updated to
- 3.4 (Build: 2016040600)
- Maturity
- Стабилна верзија
- MD5 Sum
- 6d2e30235b980ae5b7dbbe62830c03f1
- Supported software
- Moodle 2.7, Moodle 2.8, Moodle 2.9, Moodle 3.0
- The more recent release 3.5 (Build: 2016040601) (2016040601) exists for Moodle 2.7
- The more recent release 3.5 (Build: 2016040601) (2016040601) exists for Moodle 2.8
- The more recent release 3.5 (Build: 2016040601) (2016040601) exists for Moodle 2.9
- The more recent release 3.5 (Build: 2016040601) (2016040601) exists for Moodle 3.0
Version control information
- Version control system (VCS)
- GIT
- VCS repository URL
- VCS branch
- STABLE
- VCS tag
- 2.1
Default installation instructions for plugins of the type Local plugins
- Make sure you have all the required versions.
- Download and unpack the module.
- Place the folder in the "local" subdirectory.
- Visit http://yoursite.com/admin to finish the installation.