From c818a42dd7efcc28ddaaeb58e36c4e45ae875f58 Mon Sep 17 00:00:00 2001 From: Markus Heck Date: Fri, 19 Jul 2024 20:02:02 +0200 Subject: [PATCH] remove setting 'enrolments', it is the wrong setting (sets how users stored in the mbz are handled, not how users can enrol after restore) --- classes/external/upload_course.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/classes/external/upload_course.php b/classes/external/upload_course.php index 43643a0..be471ec 100644 --- a/classes/external/upload_course.php +++ b/classes/external/upload_course.php @@ -133,11 +133,6 @@ public static function execute(int $category_id=null, bool $only_check_permissio backup::TARGET_NEW_COURSE ); - // do restore: set required enrolment setting - // TODO: is correctly stored in mbz (status 0 means active). So this is not required, instead configure it to apply enrolment settings - $plan = $controller->get_plan(); - $plan->get_tasks()[0]->get_setting('enrolments')->set_value(backup::ENROL_ALWAYS); - // do restore: execute $controller->execute_precheck(); $controller->execute_plan();