How to generate 1000 enrolment keys for 1000 students.

How to generate 1000 enrolment keys for 1000 students.

by Bien Hoang -
Number of replies: 2

Hello friends,

I want to make enrolment key for each student.

I need to generate 10,000 enrolment key for 10,000 student. The key is unique and can only be used one time by one student.


How to do that?

Thank you for your help!


Bien Hoang

Average of ratings: -
In reply to Bien Hoang

Re: How to generate 1000 enrolment keys for 1000 students.

by Melanie Scott -
Picture of Particularly helpful Moodlers

This seems like a really extreme choice and a lot of work...but you could try to create 10,000 groups, each with a unique key.  then you enable self-enrollment, add an enrollment key (that you won't give out and won't be easily guessed) and switch it to yes on groups.  Then give out the enrollment keys.

The easiest way to do this (especially if you think you might do it more than once) would be to create a csv spreadsheet with two columns: groupname and enrollmentkey.  Then upload the spreadsheet to groups in Moodle (Course administration->Users->Groups->Import groups).  If your students have ID numbers, that might be a good way to go for the unique key.

I don't think you can limit the number of times a key can be used (unless you created 10000 self enrollment methods---which would be a lot of work and would be confusing and difficult for students--definitely don't recommend this, SO ugly). 


This is a by-course solution ONLY.  You'd have to do it in every course you want that list of people to self-enroll in.  I can't think of a way to do if for a big group of courses all at once.  Not sure it is possible.

In reply to Bien Hoang

Re: How to generate 1000 enrolment keys for 1000 students.

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Yes, basically this is not possible as you describe within Moodle.  It would be quicker to just manually enrol them - that way there are no enrolment keys!