admin/setting/local recyclebin
De MoodleDocs
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 can edit the lib.php file easily with Notepad ++ for Windows.
Look at the hacked lib.php file contents around line 1654: