moosh icon indicating copy to clipboard operation
moosh copied to clipboard

Restoring course migrates enrolments to manual

Open Masov opened this issue 4 years ago • 0 comments

  • moosh version: 0.25
  • moodle version: 2.7.1

Actual behaviour

Restoring a copy of a course with, e.g. self enrolment to a new course converts enrolment to manual.

Expected behaviour

Restoring a copy of a course with, e.g. self enrolment should keep this enrolment.

I found lines responsible for this behaviour:

foreach ($tasks as &$task) {
    $setting = $task->get_setting('enrol_migratetomanual');
    $setting->set_value('1');
}

Commenting out these lines brought the expected behaviour.

Is there any reason why migrating it to the manual enrolment is so important? Maybe we could add some option to control this behaviour?

Masov avatar Jun 16 '20 21:06 Masov