After integrating Moodle with Verity, admins can add the Moodle API to Verity. Adding the API will ensure assessment names are synced between Moodle and Verity.
Creating an External Service in Moodle
You will need to create an external service that includes the required API functions.
- Log in to Moodle as an administrator and click Site administration from the navigation menu.
- Click Server and select External services from Web services.
- Under Custom services, click Add.
- Enter the Name of your integration (e.g. Verity) and, check the Enabled checkbox, then click Add service.
- On the next page, click Add functions.
Note: Click Continue if you're not properly redirected to the add functions page. - In the Name drop-down list, search for the following API functions and click each of them to add them to your service:
- core_course_get_contents
- core_course get_courses
- core_user_get_users
- mod_assign_get_assignments
- mod_folder get_folders by_courses
- mod_forum_get_forums_by_courses
- mod_glossary_get_glossaries_by_courses
- mod_lesson_get_lessons_by_courses
- mod_page_get_pages_by_courses
- mod_quiz_get_quizzes_by_courses
- Click Add functions.
Obtaining Your API Access Token in Moodle
After creating an external service that contains the necessary API functions, you can now create an API access token with the created service.
- In Moodle, go to Site administration > Server.
- Select Manage tokens from Web services.
- Click Create token on the Manage tokens page.
- In the User field, select your desired administrator account(s) from the drop-down menu.
- In the Service field, select the name of the service that you created in the previous section of this guide from the drop-down menu.
- Click Save changes.
- Copy the token of the new service that you have created from the Manage tokens page.
Adding the Token to Verity
After getting the API access token from Moodle, you can add the access token into Verity.
- Navigate to Moodle and click My courses in the navigation menu.
- Select any course in which Verity is enabled.
- On the course page, select Verity from the side menu.
- Inside Verity, hover over to the side menu and click Settings > Integration Settings.
- Select LMS API from the Select Integration drop-down menu.
- Click Add Access Key in the LMS API Access window.
- Paste the access token that you copied from Moodle, then click Add.
- Click Save Changes to save your integration.