Creating Moodle Users & Courses

Re: Creating Moodle Users & Courses

by Tim Hunt -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
No. This sort of thing does not exist out-of-the-box in Moodle 1.9.

It is very easy to knock up a script like local/myws/addcourescreator.php that acts as a REST web service, and which

1. Does some sort of security check that the request is valid. (IP address of the caller in a whitelist, and password check would probably do.)

2. Checks whether the user exists.

3. If not, adds them, and gives them the course creator role in the system context.

It is probably about a dozen lines of code.


For creating courses, you might be able to do it using the the database enrolment plugin. That can automatically create courses if they exist in another database and do not exist in Moodle.


Also, there are various third-party web services plugins for Moodle 1.9 that might do what you want, but I don't know.