插件本地插件稳定版
Recycle bin
- Moodle 1.9–5.1
- 更新 2016-04-06
This plugin adds a “recycle bin” for course modules to Moodle.
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() “.
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_recyclebinobserver::pre_cm_delete($cm);
+
// Get the module context.
$modcontext = context_module::instance($cm->id);
Potential privacy issues
This will store a backup of user data in Moodle’s dataroot.
Early bird 3.0Reviewers' choiceAutomated testing support