Mass enroll users into a Moodle course

To mass enroll users into a Moodle course, you can use the upload users csv file method as following:

Assuming:

  • All the student accounts are in Active Directory and being used to login into Moodle
  • All student (in the csv file) will be enrolled into my-course-short-name course.

1. Prepare the csv file with student information, let's call it students.csv:

idnumber,lastname,firstname,email,username,auth,course1,type1,role1,enrolstatus1
102340,Joe,Student One,jstudent1@my.moodle,jstudent1,ldap,my-course-short-name,1,student
102342,Joe,Student Two,jstudent2@my.moodle,jstudent2,ldap,my-course-short-name,1,student
...

2. Go to Site administration > Users > Accounts > Upload users to upload students.csv

3. In the Upload users preview screen, config as following:


4. Click Upload users to finish.