MDL-67837 backup: Verify caps before unenrolling users on course restore

This commit is contained in:
Mihail Geshoski
2020-11-03 12:34:28 +01:00
committed by Jenkins
parent 49afa008f4
commit fd2427746f
4 changed files with 37 additions and 7 deletions
@@ -369,6 +369,7 @@ class restore_controller extends base_controller {
$options = array();
$options['keep_roles_and_enrolments'] = $this->get_setting_value('keep_roles_and_enrolments');
$options['keep_groups_and_groupings'] = $this->get_setting_value('keep_groups_and_groupings');
$options['userid'] = $this->userid;
restore_dbops::delete_course_content($this->get_courseid(), $options);
}
// If this is not a course restore or single activity restore (e.g. duplicate), inform the plan we are not