Starting with Moodle version 3.1, all courses now have a recycle bin that retains deleted activities for 7 days before permanently removing them.
In addition to restoring activities, users with relevant category permissions may also use the recycle bin to restore deleted courses. The recycle bin is available by default in all courses and categories, but the link in the administration block is only visible once something has been deleted.
Administrators can modify the settings in the Site administration menu and can adjust how long an item or course will remain available until permanently deleted, as well as make the recycle bin visible in the administration block even when empty. If preferred, the recycle bin can be disabled.
This feature can be a life saver for administrators who have been too hasty to delete an activity or course that they actually do, indeed, still need.
Here’s how you can restore items from the recycle bin in Moodle…
Restoring Deleted Activities in a Course
The recycle bin can be accessed at both the course and category level by selecting the gear icon at the top right of either the course space, or category page.
On the recycle bin page, you will find a list of items and activities that have been deleted with the option to delete, restore or delete all items listed.
Selecting restore will move the item back into the course and refresh the page with a notification that the item has successfully been restored.
You can verify this by clicking “Back to Course” at the bottom of the list – the item will reappear in the same section it was originally placed in the course.
Restoring Deleted Courses from a Category
Begin by accessing the category the course was placed in before being deleted. From the category administration block, click Recycle bin.
Like retrieving deleted items from a course, ‘Recycle bin’ will appear in the category administration menu once a course has been removed.
First access the category that the course was in before you accidentally deleted it. Once you’ve located the correct category, from the category administration block, click Recycle bin.
You’ll then see a list of all courses removed within that category, with options to restore, permanently delete and delete all courses listed.
The page will refresh itself with a notification at the top of the window confirming the restore was successful.