Diferencia entre revisiones de «admin/setting/local recyclebin»

De MoodleDocs
(tidy up)
(fixed double redirect)
 
(No se muestra una edición intermedia del mismo usuario)
Línea 1: Línea 1:
This plugin adds a "recycle bin" for course modules to Moodle.
#Redirect[[Papelera de reciclaje]]


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()".
[[en:admin/setting/local recyclebin]]
 
* You must first find the moodle/course folder and locate there the lib.php file that you will need to modify:
 
[[Archivo:lib_php file in a local moodle server.png|600px]]
 
* You can edit the lib.php file easily with [https://notepad-plus-plus.org/ Notepad ++ for Windows].
 
[[Archivo:lib_php original file opened in notepad plus plus.png|600px]]
 
* 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.
    \local_recyclebin\Observer::pre_cm_delete($cm);
 
Your modified (hacked file) must look exactly like this lines 658 and 1659 with the added text::
 
[[Archivo:lib_php modified file opened in notepad plus plus.png|600px]]
 
* You will then have a Recycle bin available inside the Administration block:
 
[[Archivo:Recycle bin is available.png|300px]]

Revisión actual - 18:09 13 jun 2016