- Unzip the plugin folder.
- Copy the plugin folder into moodle/local/.
- Navigate to the Moodle frontend and follow the installation instructions.
- Once installed, navigate to /admin/settings.php?section=local_graidy_settings and follow the Web Service setup instructions.
- Once the token is generated, provide the token to your GRAiDY representative.
- cd into moodle/local/.
- git clone https://github.com/CustomAppsSA-Team/GRAiDY-Plugins.git graidy.
- Navigate to the Moodle frontend and follow the installation instructions.
- Once installed, navigate to /admin/settings.php?section=local_graidy_settings and follow the Web Service setup instructions.
- Once the token is generated, provide the token to your GRAiDY representative.
All the Web service functions are defined in graidy/db/services.php and the code is stored in graidy/classes/external/*. The Web service functions have been broken into their "types" e.g. course or mod. There are some example files set up already.
In services.php, you will find two example functions defined:
- local_graidy_get_course_info - this is the custom function which has the code stored in graidy/classes/external/course/get_course_info.php.
- local_graidy_course_get_courses - this is utilising Moodle's Core Web service function course_get_courses.
These examples explain how to add a custom function into the GRAiDY plugin that might be needed or how to reference a Core Web service function without having to write all the code from scratch. It's up to the developer to choose which approach is best depending on the requirements.
The existing commented code can be uncommented and the corresponding Web service files updated when necessary.
See Moodle's documentation for guidance on making changes. For an example, see Writing a service.
- Ensure the role is already uploaded in Site administration > Users > Permissions > Define roles.
- Click on the settings cog to edit the role.
- Once the role has been updated, click the Export button.
- Copy the file into the local/graidy plugin.
- If you update the role name, ensure that you change the linked reference to it (variable name $roledownloadurl) in classes/settings/admin_setting_custom_webservicesoverview.php.