-
Improvement
-
Resolution: Fixed
-
Major
-
Future Dev
-
MOODLE_403_STABLE
-
MDL-73839-master-6 -
-
Moppies Kanban
As part of MDL-73838 we need to expand upload course functionality to allow using cohort enrollment when uploading a course via csv. We need to handle situations like plugin is disabled, cohort don't exist etc etc
Here are examples of csv file structure for uploading courses with cohort sync enrolment methog via csv:
shortname,fullname,category_idnumber,enrolment_1,enrolment_1_role,enrolment_1_cohortname,enrolment_1_groupname
|
C1,Course 1,CAT1,cohort,student,Cohort 1,group1 |
C2,Course 2,CAT2,cohort,teacher,Cohort 1,notexist |
shortname,fullname,category_idnumber,enrolment_1,enrolment_1_role,enrolment_1_cohortname,enrolment_1_addtogroup
|
C2,Course 2,CAT2,cohort,student,Cohort 2,1 |
C3,Course 3,CAT1,cohort,student,Cohort 1,0 |
shortname,fullname,category_idnumber,enrolment_1,enrolment_1_role,enrolment_1_cohortname
|
C1,Course 1,CAT1,cohort,student,Not exist |
C1,Course 1,CAT1,cohort,student,Cohort 3 |
C2,Course 2,CAT2,cohort,student,Cohort 4 |
C3,Course 3,CAT1,cohort,student,Cohort 5 |
Most important are enrolment_N, enrolment_N_cohortname, enrolment_N_addtogroup and enrolment_N_groupname
- enrolment_N - should be 'cohort' if you want to upload course with cohort sync enrolment method
- enrolment_N_cohortname - required parameter - Cohort name. Cohort with this name must exist in the system
- enrolment_N_addtogroup - optional parameter for adding cohorts to a group in course.
- If not set - no group mode will be used
- If enrolment_N_addtogroup = 0 - no group mode will be used
- If enrolment_N_addtogroup = 1 - A new group will be created with name corresponding to enrolment_N_cohortname and sync cohort will be added to that group
- enrolment_N_groupname - optional parameter. Only supposed to be used if enrolment_N_addtogroup is not set. An existing group in a course where member of enrolment_N_cohortname will be added
- blocks
-
MDL-78522 cohort_get_cohort can bypass context validation if $withcustomfields is true
- Closed
-
MDL-73852 Allow using meta enrollment when uploading course via csv
- Closed
- caused a regression
-
MDL-78855 Unsupported enrol methods can be used in upload courses
- Closed
- has been marked as being related by
-
MDL-75046 Add an example csv file for upload courses
- Open
- has to be done after
-
MDL-73981 tool_uploadcourse doesn't do role validation
- Closed
- will help resolve
-
MDL-61532 Setting course enrolment method cohort does not work for csv upload
- Closed