Enrol all users in numerous courses

Enrol all users in numerous courses

by Eric Katchan -
Number of replies: 1

Hello,

Moodle 3.2.9

We are looking at implementing a number of courses which all users must take.  We are using a custom enrollment plugin based on external database enrollment.


The situation:

All active users at our university are required to take a particular course based on their role in the university

Faculty members - Course A

Staff - Course B or Course A (decision not yet taken)

Students - Course C


The users will be forced to retake at least once a year.


Our current enrollment plugin only creates active users who are either enrolled or teaching at least 1 course.  Also, courses are created automatically by the plugin and maintained via cron daily.  Each semester we create new courses and associated enrollments.


The problem is basically the staff users or any users not associated with a moodle course as they will not be in moodle as the Enrollment / User creation is supplied by our Student Info System (SIS).

In a best case scenario, our SIS will create the necessary course and handle the enrollments including the staff users or for that matter and new users not yet associated with any courses.


I was thinking Flat file enrollment but the users need to exist in moodle in order to be enrolled.


Suggestions???


Eric



Average of ratings: -
In reply to Eric Katchan

Re: Enrol all users in numerous courses

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Use a csv file. have a look at this document... You can use the same csv file for a lot of different things. Create a new file add in the users, as per instructions, then enroll them using the course short name. For example:

username,password,firstname,lastname,email,course1,group,cohort1
And you might have details like:
jane.doe,password,jane,doe,jane.doe@college.org,facultyA,faculty,,
bill.smith,password,bill,smith,bill.smith@college.org,studentC,students,sophomore
and so on.

This way, you can add in whatever they want. Just set it so that when it is uploaded, the file doesn't create new users, or duplicate existing users if the user already exists. And course1 value = course short name. If you want more courses, then course2 and so on. 

Warning: I'm not sure what you are getting at when you mention your SIS, I have always thought that the SIS or LDAP or whatever would supply users authentication, but the users are still entered into the Moodle database. Never bothered to look myself. Check your dbase with a third party tool and see if that is so, or try a small file with a test group, which you should have one anyway. Or on your test Moodle to see if it works.  I have always had a test group of staff/faculty and students, two of each group to test these things with and i have no idea how many times I have wrecked my test Moodle before trying something on my production sites..smile