How to configure HL with Moodle

8 min. readlast update: 08.22.2024

This article will guide you through the step-by-step process of an Honorlock and Moodle configuration.

Moodle Configuration

  1. Login to Moodle and configure a new LTI Tool
    Site administration > Plugins > Activity Modules > External tool > Manage tools

  2. Click “Configure a tool manually”

  3. Under Tool settings, fill in the following fields
    Tool name: Honorlock LTI
    Tool URL: https://app.honorlock.com/lms
    Tool Description: Honorlock LTI Tool 1.3
    LTI Version:  LTI 1.3
    Public key type:  Keyset URL
    Initiate login URL: https://app.honorlock.com/lti13/login
    Redirection URI(s): https://app.honorlock.com/lms

  4. Tool configuration usage: 

Show as a preconfigured tool when adding an external tool
Default launch container: Embed, without blocks

  1. Set the Icon URLs under “Show more”
    Icon URL: https://app.honorlock.com/favicons/favicon.ico
    Secure icon URL: https://app.honorlock.com/favicons/favicon.ico

  2. For Moodle 4.3, you will need to expand the Privacy options:

    1. Change the dropdown to Always Share launchers name with tool

    2. Change the dropdown to Always Share launchers email with tool

Once complete, you now have a new tool where you can click on the menu above the tool to retrieve the following data:

  • Platform ID

  • Client ID

  • Deployment ID

  • Public keyset URL

  • Access token URL

  • Authentication request URL

You will need to provide your Client ID, Deployment ID,  and the LMS Domain link to your Honorlock Success Manager.

Add LTI to a course

  1. Select a course in Moodle

  2. Toggle the Edit mode option on the top right corner of the page

  3. Note for Moodle 4.3, you will need to toggle the Show in activity chooser for the LTI in the Course Menu (Select the LTI External Tools option from the “More” dropdown)

  4. Under any topic

    1. Click Add an activity or resource

    2. Click External tool (In Moodle 4.3 you will need to Click Honorlock LTI)

    3. Fill in the following fields

      1. Activity name: Honorlock

      2. Preconfigured tool: Honorlock LTI

      3. Click Save and return to course

      4. Untoggle Edit mode

Plugin Installation and Configuration 

Next, you need to install the plugin by following these steps:

  1. Log in as an admin in Moodle

  2. Go to Site Administration> Plugins > Install plugins

  3. In the section Install plugin from ZIP file, click Choose a File and select the honorlockproctoring.zip file

  4. Click the Install plugin from the ZIP file button which you can download from here.

  5. Click Continue

  6. Click Continue again

  7. Add the Setting Values, provided by your Honorlock Success Manager

    • Honorlock URL: The complete base URL for the Honorlock environment (e.g https://app.honorlock.com)

    • Honorlock Client ID: The Organization Client ID generated for your organization in app.honorlock.com.

    • Honorlock Client Secret: The Organization Client Secret generated for your organization in app.honorlock.com.

      8. Click Save Changes

To confirm the plugin is installed:  

  1. Click on Site Administration

  2. Scroll to local plugins

  3. Honorlock Plugin will be displayed in the local plugin list

External Service Configuration and User Access

For all the steps that follow you should be logged in to Moodle as an Admin.

Create a special user in Moodle for the API

  1. Go to Site Administration> Users > Accounts > Add a new user

  2. Fill in the required fields (We would suggest the following values)

    1. Username: honorlock_api

    2. Choose an authentication method: Web services authentication

    3. First name: Honorlock

    4. Surname: API

    5. Email: apiuser@example.com (ie. for HL devs <you>+moodleapi@honorlock.com)

  3. Click Create user

Enable Web services in Moodle

  1. Go to Site administration > General > Advanced features (In Moodle 3 it’s just “Advanced features”)

  2. find the Enable web services option and make sure it is enabled (Notice the default is no)

  3. Click the Save Changes Button

Enable Web Service REST Protocol

  1. Go to Site Administration> Server > Web Services > Manage Protocols
    ([moodleURL]/admin/settings.php?section=webserviceprotocols)

  2. Click the icon to Enable the REST protocol

  3. Click the Save Changes Button

Create the new web service in Moodle

  1. Go to Site Administration> Server > Web services > External services

  2. Click Add

  3. Fill in the required fields

    1. Name: Honorlock Moodle API

    2. Short name: honorlock_moodle_api

    3. Enabled: check true

    4. Authorized users only: check true

  4. Click on Add service

  5. Go to the new service you created and click Functions

  6. Add the following functions

    1. core_course_get_courses

    2. local_honorlockproctoring_update_quiz_values

    3. local_honorlockproctoring_get_quiz_questions

    4. mod_quiz_get_quizzes_by_courses

  7. Click Add functions

Authorize the created user on the newly created web service

  1. Go to Site Administration> Server > Web services > External services

  2. Look for the Moodle API you just created and click the Authorized Users link

  3. Add the Honorlock API user to the list of authorized users

    1. Click the user from the Not Authorized Users list

    2. Click the ← Add button

    3. Make sure the user appears in the authorized users list

Define a new role in Moodle

  1. Go to Site Administration> Users > Permissions > Define roles

  2. Click Add a new role

  3. For “Use role or archetype” select “No role”

  4. Click Continue

  5. Fill in the fields

    1. Short name: honorlock_api_access

    2. Custom full name: Honorlock API Access

    3. Custom description: Access for API user to the external service
      Role archetype: None

    4. Context types where this role may be assigned:

      1. Check System and leave others unchecked

     5.  In the capability section at the bottom allow the following permissions (tip: do a find             for each)

      1. moodle/course:update

      2. moodle/course:view

      3. moodle/course:viewhiddencourses

      4. moodle/question:viewall

      5. webservice/rest:use

      6. mod/quiz:view

      7. mod/quiz:viewreports

  1. Scroll down and click Create This Role and then you’ll be presented with the definition of the role after

Assign the new role to the user

  1. Go to Site Administration> Users > Permissions > Assign system roles

  2. Select the Honorlock API Access role

  3. Add the Honorlock API user to the Existing users list

    1. Click the user from the Potential users list

    2. Click the ← Add button

    3. Make sure the user appears in the Existing users list

Create a token for the user

  1. Go to Site administration > Server > Web services > Manage tokens

  2. Click Create token

  3. Ensure in the user field search the Honorlock API user and click on it to add it

    1. Make sure the user is added to the field

  4. In the Service field click on the dropdown and select the Honorlock Moodle API service 

  5. Make sure the Valid until field does not expire bay keeping the enable check box unchecked

  6. Click the Save changes button

  7. Take note of the created token value in the Token column (This is needed for the next step

 Test the LTI integration

  1. Go to Course and click the external tool Honorlock LTI 

  2. Launch the LTI from both the test taker side and the exam administer side.

 

Provide the following information to your Honorlock Client Success Manager

  1. Deployment ID (LTI 1.3): The deployment Id from the LTI Configuration section above

  2. Client ID (LTI 1.3): The client ID from the LTI Configuration section above

  3. Dev API Key (provided by school Moodle): the token created in the previous step

  4. LMS Domain/Link (provided by school or organization): full base URL for the Moodle instance

 

Was this article helpful?