-
Bug
-
Resolution: Fixed
-
Minor
-
3.5.7, 3.8.3, 3.9
-
10
-
Team Hedgehog Sprint 1.1, Team Hedgehog Sprint 1.2, Team Hedgehog Sprint 1.3, Team Hedgehog Sprint 1 review
Our support team has discovered that when the backup_auto_activities setting is disabled in Automated backup settings, this has a side effect of preventing deleted items within a course from being restored from the recycle bin. Note this has nothing to do with actual course backup/restore, we're just talking about an activity that was deleted within a course having the following error when you attempt to restore it from the recycle bin, and then the activity is not restored and disappears even though the notification message indicates it was restored successfully per attached screenshot:
Notice: Undefined index: contents in /var/www/html/MOODLE_35_STABLE/backup/util/helper/backup_general_helper.class.php on line 196
|
Notice: Undefined index: in /var/www/html/MOODLE_35_STABLE/backup/moodle2/restore_plan_builder.class.php on line 136
|
Notice: Trying to get property of non-object in /var/www/html/MOODLE_35_STABLE/backup/util/factories/restore_factory.class.php on line 37
|
This seems like the affected portion of code shouldĀ not be referencing the backup_auto_activities at all, and items should be able to be successfully restored from the recycle bin regardless of whether this setting is enabled. Steps to reproduce are:
- On a Moodle 3.5.7 (or other) site disable the setting "Include activities and resources" ( backup_auto_activities ) under Site administration -> Courses -> Backups -> Automated backup setup
- Go into a test course and create a test activity (we were using Forum but all activity types seem to be affected)
- Delete the activity
- Run the site cron
- Revisit the site home page and access the Recycle bin under Course administration
- Attempt to restore the deleted activity from the Recycle bin - you'll see the above notices and a message that the activity has been successfully restored
- Return to the course homepage and see that the deleted activity hasĀ not been restored, but is also no longer in the Recycle bin
- duplicates
-
MDL-65861 Couldn't restore from course recycle bin
-
- Closed
-
- has been marked as being related by
-
MDL-66295 course contents are missing after restore
-
- Closed
-
-
MDL-69833 Cannot duplicate quiz when backup_import_questionbank=0
-
- Closed
-
- is duplicated by
-
MDL-66295 course contents are missing after restore
-
- Closed
-
- will be (partly) resolved by
-
MDL-65228 Create a new backup::MODE_RECYCLEBIN
-
- Open
-