On This Page |
|
---|
Introduction
Welcome to the HelioCampus Moodle API Integration Guide. This document provides step-by-step instructions for configuring the integration between HelioCampus Assessment & Credentialing and Moodle using API standards and completing the HelioCampus Assessment & Credentialing LMS Information Form.
HelioCampus Moodle API Token
A Moodle API Developer Key is required to enable HelioCampus to retrieve data from Moodle for use in HelioCampus Assessment & Credentialing.
Generating a Moodle API Token
A Moodle Administrator must generate an API Token within the institution's Moodle instance by following these steps:
1. Enable Web services
-
Log into Moodle as an Admin.
-
Navigate to Site Administration and select the Advanced Features.
-
Find and check the Enable web services box.
-
Click Save Changes.
2. Enable API Protocols
-
Log into Moodle as an Admin.
-
Navigate to Site Administration and select the Server → Web Services.
-
Select Manage Protocols.
-
Find REST protocol then select Enable.
-
Click Save Changes.
HelioCampus Moodle Service Account
This section outlines the steps to create a service account for REST API calls between Moodle environment and HelioCampus Assessment & Credentialing. This integration enables HelioCampus to gather necessary data for assessment purposes. The following steps must be completed by a Moodle Administrator and a HelioCampus Institutional Admin at your institution.
1. Create the Service Account
Create an account in Moodle , following your institution’s policies.
Ensure that the account setup follows the same format as other user accounts.
-
Log into Moodle as an Admin.
-
Navigate to Site Administration and select the Users → Accounts.
-
Select Add a new user.
-
In the Add a new user dialog, enter the following details:
Field |
Value |
---|---|
Username |
heliocampusserviceaccount |
Suspended account |
Leave unchecked. |
Generate password and notify user |
Leave unchecked. |
New password |
Create a strong password for the service account and be sure to securely record it. |
First Name |
HelioCampus Moodle |
Surname |
Service Account |
Email Address |
This does not need to be a real email, we suggest heliocampusserviceaccount@<YOUR INSTITUTION EMAIL DOMAIN>.edu |
Email Display |
Choose Hide my email address from non-privileged users. |
MoodleNet profile |
Leave blank. |
City/town |
Leave blank. |
Select a country |
Choose United States. |
Preferred language |
Choose English |
Description |
Type “Service account for HelioCampus Assessment & Credentialing API integration” |
User picture |
Leave all items blank. |
Additional names |
Leave all items blank. |
Interests |
Leave all items blank. |
Optional |
Leave all items blank. |
-
Click Create User
-
Click Add User
2. Create a Custom Role
Create an Custom Role that grants the service account the necessary permissions.
-
Log into Moodle as an Admin.
-
Navigate to Site Administration and select the Users → Permissions.
-
Select Define Roles.
-
Click Add a new role.
-
Find Use role or archetype then select Teacher.
-
Click Continue.
-
In the Add a new role dialog, enter the following details:
Field |
Value |
---|---|
Short name |
heliocampusservicerole |
Custom full name |
HelioCampus Service Role |
Custom description |
Type “Service account role for HelioCampus Assessment & Credentialing API integration” |
Role archetype |
Leave as is. |
Context types where this role may be assigned |
Leave as is. |
Allow role assignments |
Leave as is. |
Allow role overrides |
Leave as is. |
Allow role switches |
Leave as is. |
Allow role to view |
Leave as is. |
Capability |
|
At a minimum this role needs the following capabilities enabled, to accomplish this do the following for each capability:
|
|
Capability |
Value |
Create a web service token |
moodle/webservice:createtoken |
Manage all users' web service tokens |
moodle/webservice:managealltokens |
Use REST protocol |
webservice/rest:use |
See full user identity in lists |
moodle/site:viewuseridentity |
View user full information |
moodle/user:viewalldetails |
View courses without participation |
moodle/course:view |
View assignment |
mod/assign:view |
View grades |
mod/assign:viewgrades |
-
Click Create this Role.
3. Assign the Service Role to the Service Account
-
Log into Moodle as an Admin.
-
Navigate to Site Administration and select the Users → Permissions.
-
Select Assign system roles.
-
Under Role find then click on HelioCampus Service Role.
-
Under Potential users, paste heliocampusserviceaccount in Search.
-
Under Potential users select HelioCampus Moodle Service Account
-
Click Add
4. Make Service Account a Site Administrator
-
Log into Moodle as an Admin.
-
Navigate to Site Administration and select the Users → Permissions.
-
Select Site administrators.
-
Under Role find then click on HelioCampus Service Role.
-
Under Potential users, paste heliocampusserviceaccount in Search.
-
Under Potential users select HelioCampus Moodle Service Account
-
Click Add
5. Create External Service
-
Log into Moodle as an Admin.
-
Navigate to Site Administration and select the Server → Web Services.
-
Select External services.
-
Click Add.
-
In the Add External Service dialog, enter the following details:
Field |
Value |
---|---|
Name |
HelioCampus External Service |
Short name |
heliocampusexternalservice |
Enabled |
Check this box. |
Authorised users only |
Check this box. |
Can download files |
Check this box. |
Can upload files |
Leave unchecked. |
-
Click Add Service.
6. Add functions to the External Service
-
Log into Moodle as an Admin.
-
Navigate to Site Administration and select the Server → Web Services.
-
Select External services.
-
Find HelioCampus External Service click Functions.
-
Scroll to the bottom the select Add functions.
-
In the Name drop-down find and select the following functions:
-
core_course_get_courses_by_field
-
core_enrol_get_enrolled_users
-
mod_assign_get_assignments
-
gradereport_user_get_grade_items
-
mod_assign_get_submissions
-
core_grading_get_definitions
-
-
Click Add Functions.
7. Add Service Account to the External Service
-
Log into Moodle as an Admin.
-
Navigate to Site Administration and select the Server → Web Services.
-
Select External services.
-
Find HelioCampus External Service click Authorised users.
-
Under Not authorised users, paste heliocampusserviceaccount in Search.
-
Under Not authorised users select HelioCampus Moodle Service Account
-
Click Add.
8. Create Token for Service Account/External Service
-
Log into Moodle as an Admin.
-
Navigate to Site Administration and select the Server → Web Services.
-
Select Manage tokens.
-
Click Add.
-
In the Create Token dialog, enter the following details:
Field |
Value |
---|---|
User |
Click the drop-down then select HelioCampus Moodle Service Account. |
Short name |
Click the drop-down then select HelioCampus External Service |
IP restriction |
Leave blank. |
Valid until |
Leave blank. |
-
Click Save Changes.
-
Copy the Token and paste it into the API Token field on the HelioCampus Assessment & Credentialing LMS Information Form.
Submitting the HelioCampus Assessment and Credentialing LMS Information Form.
If you have also completed the API integration steps, you may now submit the HelioCampus Assessment and Credentialing LMS Information Form
Once all steps are completed, return to the main Moodle guide to finalize the integration.