Configuring the Moodle service

Ryan Knuth
Ryan Knuth
  • Updated

In order to activate the integration in Wicket, the Moodle Instance needs to be configured following these steps: 

    1. Login to the Moodle instance to be configured using an account with administrator permissions. The user must be in the list of site administrators of the Moodle instance.

    2. Enable web services: Go to the Advanced Features page of the Site Administration section (/admin/settings.php?section=optionalsubsystems), find the field “Enable web services” and click the checkbox. Click “Save changes” to proceed.

      moodle-enable-webservices.png

    3. Enable protocols: Go to "Manage protocols" located under the “Plugins > Web services” sub-menu in the Site Administration section (/admin/settings.php?section=webserviceprotocols) and click “Enable” for the REST protocol. Click “Save changes” to proceed.

      moodle-enable-protocols.png

    4. Create a specific user: A Web services user is required to represent the system controlling Moodle. Create the user on the “Add a new user” page (/user/editadvanced.php?id=-1) under the "Users > Accounts" sub-menu on the Site Administration section. The username and password of this user will be required on the Moodle service configuration page in Wicket.

    5. Check user capabilities: Create a webservice role or assign the user a role with the following capabilities:
      • moodle/webservice:createtoken
      • moodle/webservice:managealltokens
      • moodle/webservice/rest:use
      • moodle/site:viewuseridentity
      • moodle/user:viewalldetails
      • moodle/course:view
      • moodle/user:update

    6. Make the user a site administrator: Go to the Site administrators page located under "Users > Permissions" in the Site Administration menu. Add the user created in Step 4 as a Site administrator.

    7. Create a service: Go to the External services page under the "Plugins > Web services > External services" sub-menu on the Site Administration section (/admin/settings.php?section=externalservices). Click “Add” under the Custom services table.

      moodle-create-service.png

      Give the service a Name and Short name, then click the “Enabled” checkbox. Finally, click “Add service” to proceed. The short name used for the service will be required on the Moodle service configuration page in Wicket.

      moodle-external-service.png

    8. Add functions to the web service: Select the required Moodle functions for the created service. On the External services page, find the service created in the last step in the “Custom services” table. Click the “Functions” link of the created service.

      moodle-create-service.png

      Next, click the “Add functions” link.

      moodle-add-functions.png

      Add the following functions:
      • core_course_get_courses
      • core_user_get_users_by_field
      • core_user_update_users

        moodle-service-add-functions.png

    9. Select a specific user for the service: Assign the user created in step 4 to the recently created service. On the External services page, find the service created in the last step within the “Custom services” table. Click the “Authorised users” link for the service.

      moodle-create-service.png

      Next, select the user and click “Add” to assign it to the service.

      moodle-select-auth-users.png

    10. Create a token for the user/service: Under the “Plugins > Web services” sub-menu in the Site Administration section, go to the “Manage tokens” page (/admin/settings.php?section=webservicetokens). Click “Add.”

      moodle-manage-tokens.png

      Next, select the User and Service, then click “Save changes” to generate the token.

      moodle-save-token.png

    11. Activate the service in Wicket: In Wicket admin, go to Settings > Integrations > Moodle > and click “Edit configuration”.

      Enable the service, select the desired data synchronization flow (Outbound and/or Inbound), select the synchronization fields (such as Name, Phone Number, Address), then add select the synchronization roles if required.

      moodle-wicket-config-sync-options.png

      Enter the Moodle API credentials:
      • The Moodle instance URL
      • The Moodle Webservice Name created on Step 6
      • The User Name and Password of the user created in Step 4

        moodle-wicket-config-creds.png

        Click “Save.”

The Integration is now configured.

Was this article helpful?

1 out of 1 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.