Moodle
Moodle is a free, open-source PHP web application for producing modular internet-based courses, and is one of the most popular LMS’s in use today. This integration will help you get enrolments you take in onCourse, and automatically enrol them into the same course within Moodle.
Add a Moodle integration in onCourse automation.
Base URL
The URL of your Moodle instance. This must include the 'http://' or 'https://' protocol at the beginning of the URL.
Username & Password
The username and password used to access your Moodle instance
Service Name
The name of your integration inside Moodle.
Only activate for enrolments in courses tagged with
This defines which tag the script should look for when executing. All courses tagged with this tag will be included.
For this to work, courses to be integrated with Moodle are required to have a specific user-created tag associated with them that must be created separately in the Tags screen. You can see how to do that here. The bottom field 'Only activate for enrolments in courses tagged with' is where the name of this tag is defined, so you must make sure the name you put in here matches the name of the tag you created precisely.
Once these preferences have been defined you will need to enable the 'moodle enrol' script to automatic the process. The Moodle script can be found by going to Automation, doubling clicking on 'moodle enrol' under Scripts, clicking on the checkbox 'Enabled' and saving the script.
Set up Moodle
Enable the integration in Moodle:
-
Create a user in
Site administration -> Users -> Accounts -> Add a new user
-
Assign user to a role in
Site administration -> Users -> Permissions -> Assign system roles
-
Add a service in
Site administration -> Plugins -> Web services -> External services
and give it a name. -
Once the Service is created, click on
Add functions
-
Add following functions:
core_user_create_users, core_user_get_users, core_course_get_courses, enrol_manual_enrol_users
-
Generate a token in
Site administration -> Plugins -> Web services -> Manage tokens
-
Then select the created user and service.
-
The last step is to create a course, you can do this by going to
Site administration -> Courses -> Manage courses and categories
.
The ID should be the same as course code in onCourse for the default integration script to work, although you can customise this in different ways.
Updated 6 months ago