There are a range of settings within the Moodle environment that require configuration in order to integrate with the SMS.
The purpose of this article is to detail what settings and preferences need to be activated within the Moodle environment in order for the integration to function.
Please Note
The initial set up of your Moodle environment is outside the scope of this article – The setup of a Moodle site (version 3.2 or newer) will need to have been completed prior to following the steps detailed here.
TABLE OF CONTENTS
Settings
Login as your Moodle Admin User and navigate to the Site Administration page:
From here, you can use the Search option to easily find the settings you require:
Rest Protocol
Search for REST protocol and enable it (by clicking the eye ) under the Active Web Service Protocols section:
Web Services Authentication
Now search for Web Services Authentication and enable it (again, by clicking the eye ):
Extended Characters in Usernames
Next, search for Allow Extended Characters in Usernames and enable it:
This is required to allow party email addresses to be used as the Moodle Username.
API debug messages
As an optional step, you can activate Debug Messages. This will provide you with more detailed error messages if there are any issues with sending data to Moodle from the SMS.
To do this, you will need to search for Debug Messages and set it the option to NORMAL:
External service
You will need to add an External Service to expose the API end points required for the integration with the SMS.
Go to Site administration→ Server → Web services → External services and select Add:
Configure the Service as shown below, making sure its Enabled and Flagged for Authorised Users Only:
Next you will need to add the required list of functions clicking the Functions section on the newly created service:
You will need to Search for each item and select Add until you have added the whole list.
A full list of the required functions is available blow.
Authorised Users
With Authorised users only checked, you will need to add the users by going to Site Administration → Server → Web Services → External Services → Find Service → Authorised users
Within this area, search for users and use the add button so they appear in the Authorised Users list:
API Functions
The follow is a list of Moodle API functions required by the the SMS Moodle integration:
- core_course_create_courses
- core_course_get_categories
- core_course_get_contents
- core_course_search_courses
- core_course_get_course_module
- core_course_get_courses
- core_enrol_get_enrolled_users
- core_user_create_users
- core_user_get_users
- core_webservice_get_site_info
- enrol_manual_enrol_users
- enrol_manual_unenrol_users
- gradereport_user_get_grade_items
The following is an optional call for the API that makes the UI better when manually mapping to a user, and can be added if desired:
- core_user_search_identity
Token
The SMS communicates with Moodle by using a Token on behalf of a user. To start, navigate to Site administration → Server → Web services → Manage tokens and select Create Token.
Set it up using your new web service with a user that has been added to the service.
This is done by selecting the user from the list and then finding the service you setup earlier.
Once entered choose save changes to save what you have created.
Next Steps: Configuring Moodle2021 in the SMS
Once your Moodle2021 details have been established, the integration will need to be globally enabled and configured within the SMS to function.