External DB to assign roles at category/system level

External DB to assign roles at category/system level

by Sam Mogford -
Number of replies: 3
Is it possible to use the External Databse enrolment plugin to automatically assign users to a role at the sytem level or to a role at a category level?
Average of ratings: -
In reply to Sam Mogford

Re: External DB to assign roles at category/system level

by Paul P. -
Maybe you are already aware of this (and if so, I apologize in advance), but In 1.9+ (not sure about earlier versions) you can do an import from a text file fairly easily. If your external database can export a csv file (a comma separated value text file), then you could import all your users (students, teachers, roles and the courses they are to be enrolled in) in a single bound! Kinda like Superman : )

Check this moodle doc for more information: http://docs.moodle.org/en/admin/uploaduser

I'm actually in the process of doing the same thing, but I'm having more trouble getting a simple file from my IT department than getting the data into moodle.

If you're looking for something even more automated, then someone else will have to respond.
In reply to Sam Mogford

Re: External DB to assign roles at category/system level

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I'm afraid it isn't. It can only assign roles at the course level.

Saludos. Iñaki.

In reply to Sam Mogford

Re: External DB to assign roles at category/system level

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
If you have a look at my post here: http://moodle.org/mod/forum/discuss.php?d=123723 there a script that can be used to add users to a role at a course or category level. We use it to automatically add staff to a category of courses that contain staff only information; but you should be able to adapt to suit your needs...

Jon