*** Make sure that CRON is configured to run every minute ***
Step 1 - Manually Install Moodle Plugins from ZIP File1
- Log in to Moodle as an administrator.
- On the left, select Site administration.
- Click on Plugins, then Install plugins.
- Open the Moodle plugins directory in a new tab.
- 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
- Scroll down and select Install plugin from the ZIP file.
- Continue to complete the Moodle plugin installation.
Step 2 - Complete the Moodle Plugin Installation
- Once you’ve completed the initial plugin installation steps, the next page should state plugin validation was successful. Continue.
- The next page displays results from Moodle and server checks.
- Then scroll to the bottom to Continue.
- On the next page, Plugins check. Your new plugin should be listed with the status To be installed. Upgrade Moodle database now.
- The next page should state “Success”. Continue.
- 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
- Log in to Moodle as an administrator.
- On the left, select Site administration.
- Click on Users, then under Permissions click on Define roles.
- On Manage Role page, scroll down to the bottom of the page, then click on Add new role button.
- “Use role or archetype” keep the select value as default i.e No roles.
- 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.
- On next page just click on “Create this role” button.
Step 4 - Create user
- Log in with your administrator account.
- From the left panel (the Navigation drawer) click Site administration.
- Click the Users tab.
- Click Add a new user.
- Add your user details.
- Click Create user.
Step 5 - Assign the role to user
- Log in as Site administrator.
- Navigate to Site Administration > Users > Permissions > Assign system roles.
- Click on the role that we created (Api-Role).
- Select the name from the right and move it over to the left.
Step 6 - Enabling web services & protocols
- Access Administration > Site administration > Advanced features
- Check ‘Enable web services‘ then click ‘Save Changes‘.
- Access Administration > Site administration > Plugins > Web services > Manage protocols
- Enable the REST protocol (Click on eye icon to enable).
Step 7 - Create a token
- Administration > Site Administration > Plugins > Web services > Manage tokens
- Click on Add
- Select the created user.
- Select the service active_service
- Click on Save changes
- 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).