Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-73839

Allow using cohort enrollment when uploading course via csv

    XMLWordPrintable

Details

    • Moppies Kanban

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              ilyatregubov Ilya Tregubov
              ilyatregubov Ilya Tregubov
              Jordi Pujol-Ahulló Jordi Pujol-Ahulló
              Andrew Lyons Andrew Lyons
              CiBoT CiBoT
              Votes:
              2 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 4 days, 2 hours, 27 minutes
                  1w 4d 2h 27m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.