Batch create self-enrol keys

Batch create self-enrol keys

by Noveck Gowandan -
Number of replies: 3

Good day,

I'm still looking into Moodle 2.8 and I don' t know if this is an available feature or even possible.

My issue is that we have thousands of courses and hundreds of lecturers/teaching staff who must be manually added. The issue is that we don't have enough staff to reasonably do this within a short timeframe.

Is there a way to batch create/upload enrolment keys for different roles?

Eg.

Say I have 200 math courses, 200 english courses and 200 french courses. (bad example)

I would like to be able to batch generate Teacher Keys and Non-editing Teacher Keys to allow them to self enrol in their respective courses.


Is this possible? Thanks again for your help and guidance.

Average of ratings: -
In reply to Noveck Gowandan

Re: Batch create self-enrol keys

by Floyd Saner -

Noveck,

Yes, you can create several self-enrolment keys for a course and tie each key to a specific role - e.g. one key enrolls the user as a teacher, another key enrolls the user as a student.

See https://docs.moodle.org/28/en/Self_enrolment

Floyd

In reply to Floyd Saner

Re: Batch create self-enrol keys

by Noveck Gowandan -

Thanks for your reply, I'm not sure if I was a bit too vague.

I'm aware that per course I can manually set different enrolment keys, I wanted some help in taming a very large beast.

Is there a tool or feature that can allow me to set thousands of enrolment keys at once, perhaps through a csv upload?

In reply to Noveck Gowandan

Re: Batch create self-enrol keys

by Floyd Saner -

Noveck,

Hmmm, sorry for misunderstanding your question.  As far as I know there is no easy CSV file upload method to create self-enrollment keys in courses.

This can be done with a script and MSQL queries, so it will require someone with programming knowledge.  The table you need to access is mdl_enrol. 

I suggest creating self enrollments in a couple courses, then look at table mdl_enrol to get an idea of the data you need to supply.

Good luck!

Floyd