-
Bug
-
Resolution: Fixed
-
Major
-
4.2.5, 4.3, 4.3.2
- Upload a csv with data like
shortname,fullname,category_idnumber,enrolment_1,enrolment_1_password
C1,Course 1,CAT1,self,testtest
- It should created a new course with self enrolment method enabled and The course enrolment key for method should be set as per https://docs.moodle.org/403/en/Upload_courses
Actual: Method is created with empty password
problem is that it creates a default instance:
// Create a new instance if necessary.
|
if (empty($instance) && $plugin->can_add_instance($course->id)) { |
$error = $plugin->validate_plugin_data_context($method, $course->id);
|
if ($error) { |
$this->error('contextnotallowed', $error); |
break; |
}
|
$instanceid = $plugin->add_default_instance($course);
|
And then it doesn't update it with provided password - there is a place in code where it does it for startdate, enddate, enrolperiod etc so we need to add password handling there as well