Course Tag API: Site admistrator
Introduction
This Course Tag API tool plugin uses standard Moodle Web service functionality to enable a custom API web service to tag courses. Hence, this plugin provides a simple process for tagging courses in bulk.
This requires some initial setup from a site administrator to configure both a webservice and a custom role. Once configured, a suitable user should be granted the role, which has the relevant capabilities required for this plugin to tag courses.
Administration
This section is for the administration of the Course Tag API tool plugin.
Version Support
This plugin is supported for Moodle versions 3.9, 3.11, 4.00, 4.01, 4.02, and 4.03.
Deployment
To install the Course Tag API tool (tool_coursetagger):
- Unzip and copy the coursetagger folder into Moodle’s admin/tool/ folder.
- Go to Site administration > Notifications to install the tool.
Further installation instructions can be found on the Installing plugins Moodle documentation page.
Copyright and funding
This plugin has been developed, maintained, and is copyrighted by Brickfield Education Labs. The funding for this plugin was provided by Dublin City University (DCU) and Maynooth.
Usage as Site administrator
This involves creating and configuring a custom role for users to use for the purpose of using this Course Tag API tool. Additionally, this will require configuring a web service and creating a token for the user to use. This token is then used for any API calls pushing data to the web service.
Creating the custom role
To create the custom role to use this Course Tag API tool:
- Create a new custom user role, following this Moodle user roles documentation.
- Add the following capabilities to the new user role:
- ‘webservice/rest:use’ capability – Use REST protocol.
- If using any different protocols, please add their capabilities as well.
- ‘moodle/tag:manage’ capability – Manage all tags.
- ‘moodle/course:tag’ capability – Change course tags.
- ‘webservice/rest:use’ capability – Use REST protocol.
- Assign a new user to this custom role.
Configuring the Web services
To configure the Web services for this Course Tag API tool:
- Go to Site administration > General > Advanced features
- Ensure the Enable web services setting is enabled.
- Go to Site administration > Server > Web services > Manage protocols
Ensure the REST protocol is enabled or the protocol you intend to use.
Authorising the user
To authorise the user for this Course Tag API tool:
- Ensure a user has been assigned the custom role.
- Go to Site administration > Server > Web services > External services
- Click the Authorised users link for the External service: Create course tags. This will bring you to the Select Authorised users page.
- Select the custom role in the Not authorised users list. For convenience, you can consider using the admin account just for a local development site. However, for a production site, you should use a dedicated specific user to process this.
- Click the Add button.
Creating a user token
To create the user token for this Course Tag API tool:
- Go to Site administration > Server > Web services > Overview
- Click the Create a token for a user link.
- In the User drop-down menu, select the user assigned the custom role.
- In the Service drop-down menu, select the Create course tags option.
- Click the Save changes button.
- Copy and save the Token to use.