Moodle Website Configuration (for v1.4.2 and lower)

Configure your Moodle Website

Once you have installed and activated the Edwiser Bridge plugin on your website the next step would be to configure the Moodle website and generate an ‘Access Token‘ which will be used on the WordPress website as well as Moodle website.

Create an External Service on Moodle

  • Log in to your Moodle site and go to Site Administration -> Plugins -> Web Services -> External Services.
screenshot bridge.edwiser.org 2019.07.25 16 28 41
  • Click on the ‘Add‘ button on the external services page. Enter a name for the External Service, check the ‘Enabled‘ field, check the ‘Authorised Users Only‘ field.
screenshot bridge.edwiser.org 2019.07.25 16 44 29
  • Now click on the ‘Add Service’ and follow it up with clicking the ‘Add functions‘ link.
screenshot bridge.edwiser.org 2019.07.25 16 45 58
  • Select the following functions and save the changes made.
    • core_user_create_users: Create users.
    • core_user_get_users_by_field: Retrieve users information for a specified unique field.
    • core_user_update_users: Update users.
    • core_course_get_courses: Return course details
    • core_course_get_categories: Return category details
    • enrol_manual_enrol_users: Manual enrol users
    • enrol_manual_unenrol_users: Manual unenroll users
    • core_enrol_get_users_courses: Get the list of courses a user is enrolled in
    • eb_test_connection
    • eb_get_site_data
    • eb_get_course_progress
  • The next step would be to add users to the list of authorized users for the external service that you created. To do this you will have to go to Site Administration -> Plugins -> Web Services -> External Services and click on the ‘Authorised users‘ link against the external service you created.
  • Once there you will be able to add users to the list of authorized users. Conversely, you can also remove users from the same setting at a later point of time if required.
    Note: The User account added to Authorised users should have an admin role in your Moodle site.

Enable the REST Protocol

  • Go to Site Administration –> Plugins –> Web Services –> Manage Protocols.
  • Click on the grey icon in the REST protocol row to enable the REST protocol and save the changes made.
screenshot bridge.edwiser.org 2019.07.25 16 49 59

Generate a Moodle Web Service Token

  • Go to Site Administration –> Plugins –> Web Services –> Manage Tokens
  • Click on the ‘Add‘ link and select the admin user under the ‘User‘ list.
  • Now select the external service that you created earlier in the ‘Service‘ drop-down list.
  • Click on the ‘Save Changes’ button. The token generated will be used in the Edwiser Bridge settings page on your WordPress website.
screenshot bridge.edwiser.org 2019.07.25 16 59 20

Enable Web Services

  • Go to Site Administration –> Advance features, check the ‘Enable Web Services’ field and click ‘Save Changes‘ to save the changes you have made.
screenshot bridge.edwiser.org 2019.07.25 18 33 09 1

Disable Password Policy

  • Users will register for courses from the WordPress website. Their password for the Moodle website will also be created on WordPress. Therefore, we will have to change the Moodle website’s password policy, or else a user’s Moodle account will not be created after course registration.
  • To disable the password policy go to Home -> Site Administration -> Security -> Site Policies and disable the Password policy by unchecking the check-box.
screenshot bridge.edwiser.org 2019.07.25 18 33 56
  • With that last bit on disabling the password policy, we have completed the Moodle end configurations for the WordPress – Moodle integration to work seamlessly.

Enable Extended Characters in Username

  • A username created in WordPress can have characters. Therefore, it is mandatory to enable this setting in Moodle. Navigate to Site administration > Security > Site security settings > Enable Allow extended characters in usernames.

Note: Please be advised in order to Create & link Registered User’s from WordPress site automatically to the Moodle site, kindly use Edwiser Bridge’s user profile page. The shortcode that displays the user profile page is [eb_user_account]

For already registered WordPress users, you have to navigate to WordPress backend > Users and click on Link to Moodle account.

Was this page helpful?