moosh
moosh copied to clipboard
Restoring course migrates enrolments to manual
- 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?