-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
4.3
-
MOODLE_403_STABLE
- Create course
- On enrolment methods page create 2 self enrol instances self1 and self2
- Upload csv
shortname,fullname,category_idnumber,enrolment_1,enrolment_1_role
sss,sss,cat1,self,teacher
- It will update first instance with smaller id. No way to update second instance
Same for cohort enrolment. This is due to this code:
foreach ($instances as $i) {
|
if ($i->enrol == $enrolmethod) { |
$instance = $i;
|
break; |
}
|
}
|
it finds first available of given enrol plugin and updates it. Needs to be more smart to validate it updates correct instance.
May be its not critical for self since its uncommon to have several instances. but for cohort enrolment might be too easy to mess up enrol instance since it doesn't check for cohort name just checks that enrol plugin type is same
Not sure how to identify uniquely self enrol instance. But for cohort we can use cohortid instead of name since cohortid is unique (must be set though in cohort setting - its not a compulsory field)
- duplicates
-
MDL-43820 tool_uploadcourse supports multiple enrolment instances of the same type
-
- Closed
-