In this Section:
Pre-requisites
- Please contact SELMA Support to enable your Moodle Integration, and grant administrator access to your Moodle Instance.
Get Started in Moodle
Follow the steps, below, to configure your Moodle instance:
Figure 1i. Navigate to Site Administration

Figure 1ii. Navigate to Server > Web Services

Figure 1iii. Navigate to Overview
Please read the next section as you make your way through the steps on the current Overview Page.

Follow Steps Outlined on the Overview Page
Please follow the steps from 1-8, as described on this page.
Reminder:
- Skip step 4, and follow the instructions as set out in the following section of this article.
- Jump to this section to find the functions to add in step 6 of the Overview Page.
Once you have completed each step successfully, jump to Retrieve Token and Hold, in this article.
Figure 2. Overview Page
Click the blue highlighted text to take you straight to the relevant page and perform each task.

Step 4
Define Webservices User Role
The following describes what should be done in place of step 4 on the Overview Page.
Figure 3i. Navigate to the Users Tab
Under the “Users” tab, click “Define Roles”.

Figure 3ii. Edit Webservices Role

Figure 3iii. Provide Details and Enable Role Assignments
Provide a “Short name” and “Custom full name“, in addition to other important details linked to the Webservices Role. You must then ensure the Webservices role has “System” checked (orange), and specify which Roles it can make assignments to from Moodle (red).

Figure 3iv. Search For and Enable Permissions
Enable Permissions/Capabilities for the Webservices Role.
NOTE: This is Step 4, as outlined in the Overview Page.

- enrol/manual:enrol
- gradereport/user:view
- moodle/course:enrolreview
- moodle/course:managegroups
- moodle/course:view
- moodle/course:viewparticipants
- moodle/grade:viewall
- moodle/role:assign
- moodle/site:accessallgroups
- moodle/site:viewuseridentity
- moodle/user:create
- moodle/user:viewdetails
- moodle/user:viewalldetails
- moodle/user:update
- report/completion:view
- webservice/rest:use
- moodle/course:viewhiddencourses (to be able to hide courses in SELMA)
Assign System Roles
Figure 4i. Click “Assign System Roles”

Figure 4ii. Select System Role

Figure 4iii. Select User
Select the User you have created previously, to assign the “Webservices” Role to.

Step 6
Add Functions (End-Points)
The following lists the Functions (i.e. End-Points) you should add to the Service for step 6:
- core_completion_get_course_completion_status
- core_course_get_courses
- core_group_add_group_members
- core_group_create_groups
- core_group_get_course_groups
- core_user_create_users
- core_user_get_users
- core_user_update_users
- core_webservice_get_site_info
- enrol_manual_enrol_users
- gradereport_user_get_grade_items
Click for more detailed information about setting-up Web Services in Moodle.
Retrieve Token and Hold
Once you have completed all the steps outlined on the Overview Page, you will have a token to use later in SELMA.
- Please save your token somewhere secure, for use in SELMA.
View the Next article
Please see the next article in this Manual, Integrations – Moodle Set-Up (In SELMA), for steps to be completed in SELMA.
