*** Make sure that CRON is configured to run every minute ***

Step 1 - Manually Install Moodle Plugins from ZIP File1

  1. Log in to Moodle as an administrator.
  2. On the left, select Site administration.
  3. Click on Plugins, then Install plugins.
  4. Open the Moodle plugins directory in a new tab.
  5. Select the plugin file (local_activeapi.zip). In your Moodle Plugin Installer, drag and drop the downloaded plugin ZIP file to the box under Choose a file
  6. Scroll down and select Install plugin from the ZIP file.
  7. Continue to complete the Moodle plugin installation.

Step 2 - Complete the Moodle Plugin Installation

  1. Once you’ve completed the initial plugin installation steps, the next page should state plugin validation was successful. Continue.
  2. The next page displays results from Moodle and server checks.
  3. Then scroll to the bottom to Continue.
  4. On the next page, Plugins check. Your new plugin should be listed with the status To be installed. Upgrade Moodle database now.
  5. The next page should state “Success”. Continue.
  6. You’ll be redirected to the configuration page for the newly installed plugin. Once finished, Save Changes to be redirected to your site administration notifications.

Step 3 - Adding a new role

  1. Log in to Moodle as an administrator.
  2. On the left, select Site administration.
  3. Click on Users, then under Permissions click on Define roles.
  4. On Manage Role page, scroll down to the bottom of the page, then click on Add new role button.
  5. Use role or archetype” keep the select value as default i.e No roles.
  6. On “Use role preset” select the given role preset file api-role.xml or directly drag and drop file on file picker. Then click on Continue button.
  7. On next page just click on “Create this role” button.

Step 4 - Create user

  1. Log in with your administrator account.
  2. From the left panel (the Navigation drawer) click Site administration.
  3. Click the Users tab.
  4. Click Add a new user.
  5. Add your user details.
  6. Click Create user.

Step 5 - Assign the role to user

  1. Log in as Site administrator.
  2. Navigate to Site Administration > Users > Permissions > Assign system roles.
  3. Click on the role that we created (Api-Role).
  4. Select the name from the right and move it over to the left.

Step 6 - Enabling web services & protocols

  1. Access Administration > Site administration > Advanced features
  2. Check ‘Enable web services‘ then click ‘Save Changes‘.
  3. Access Administration > Site administration > Plugins > Web services > Manage protocols
  4. Enable the REST protocol (Click on eye icon to enable).

Step 7 - Create a token

  1. Administration > Site Administration > Plugins > Web services > Manage tokens
  2. Click on Add
  3. Select the created user.
  4. Select the service active_service
  5. Click on Save changes
  6. Now copy the token created in the 4th step and save it offline (later you will add it to the settings in the the Zoo2Moo admin portal).