Upload users via CSV

2. Uploading Users

2.4. Enrolment fields

You may optionally enrol users in already existing courses using manual enrolment. Manual enrolment must be enabled from within a course in order for this to work when uploading a CSV file.

You can use fields in the upload file of this type:

course1, type1, role1, group1, enrolperiod1, enrolstatus1, course2, type2, role2, group2, enrolperiod2, enrolstatus2

The headings above that can be used in the CSV file, each (they must) have a numerical suffix attached to them, meaning you can manually enrol users to multiple courses if required.

  • course# - This is the shortname (not fullname) of the course. Providing the course is present, the user will be enrolled in that course. This field is the ONLY required field for a successful enrolment. All the others are optional.
  • type# - This sets the role to be used for the enrolment. A value of 1 is default course role (normally Student), 2 is legacy Teacher role and 3 is legacy Non-editing Teacher.
  • role# - This may be used to specify roles directly, using either role short name or the role id (numeric names of roles are not supported). Usually you will use the role name that is the shortname of the role as defined in Users > Permissions > Define roles, eg. student, editingteacher. If the role column is left out, the users will be enrolled in the course with the default role, which is normally Student.
  • group# - This may be used to assign users to groups in a course, using the group name or id (numeric group names are not supported). If the group does not already exist, it will be created.
  • enrolperiod# This may be used to set the enrolment duration, in days, for each course. If not explicitly set here, all the users will get the duration as set in the Manual enrolment method of the course (which defaults to 0 - meaning unlimited.)
  • enrolstatus# - This is set to active by default for any newly enrolled users. If set to 1 it will suspend users in the course. If a 0 is entered in this column then a user will be enrolled in this course but set as inactive/suspended.