In order to provide Coachview access via web services, the following settings are important in Moodle. If you are logged in as an administrator you can use the URL (see the last column in the table) to jump directly to the page in Moodle to set up the various data. For example: https://moodle.coachview.net/admin/settings.php?section=webserviceprotocols. Support/tested up to version 2.9 (note screens 3.0 and higher may differ). You can check your Moodle version via 'Site-administration' and 'Registrations'. |
Settings Moodle: | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Setting | Value | URL | ||||||||
Enable web services | yes | /admin/search.php?query=enablewebservices | ||||||||
Enable protocols | Enable ‘REST protocol’ | /admin/settings.php?section=webserviceprotocols | ||||||||
Create user account. | Click on the 'Add' button. Username = ws_coachview.net Authentication method = Webservice authentication First name: Web service (= example) Last name: Coachview (= example) E-mail address: [email protected] (= example) Click on 'Create user'. | /admin/user.php | ||||||||
Create user role with rights | Click on 'Add new role'. Use role for archetype = 'No role'. Click on 'Continue'. Short name = ws_coachviewroll Custom full name = Coachview web service role Context types in which this role may be assigned = check system Allow assignment of roles = Student (otherwise you can't enrol as a student) Scroll down and fill in at 'Filter' one by one. Note: the filter starts automatically, don't click enter.
Click on 'Save changes'. No needed: moodle/user:delete, moodle/cohort:view, moodle/course:viewparticipants, | /admin/roles/manage.php | ||||||||
Show user identity (showuseridentity) vary rights | Show the identity of the user = Check Number (ID). Click on 'Save changes'. This will identify a participant from Coachview in Moodle. | /admin/settings.php?section=userpolicies | ||||||||
Link user role to user account | Click on the name 'Coachview webservice role'. Under 'Create user role with rights' this is the name that is filled in under 'Custom full name'. Select 'Webservice Coachview' and click 'Add'. | /admin/roles/assign.php?contextid=1 | ||||||||
New Custom (web) service creation and linking of web service functions | Click on 'Add'. Name = Coachview webservice Short name = ws_coachview Enabled = tick Authorized users only = check box Click on 'Add service'. | /admin/settings.php?section=externalservices | ||||||||
Click on 'Functions' in the table. Click on 'Add functions'. Enter the following items one by one under 'Search' and click on <enter> each time to add them.
Click on 'Add functions'. | ||||||||||
Link user account to new web service | Click on 'Authorized users' in the same table. Select 'Webservice Coachview' and click 'Add'. | /admin/settings.php?section=externalservices | ||||||||
Create token for the user account. | Click on 'Add' and fill in the following:
Click on 'Save changes'. Return token to Coachview or add token via Service center in Coachview. Debug messages turn on Debug messages: none -> Developer (/admin/settings.php?section=debugging) | /admin/settings.php?section=webservicetokens | ||||||||
Set up additional customerfields. These can be used to display information from free fields, recorded in the personal file in Coachview. | Create a profile field there of the type 'text input'. Fill in the Coachview free field code (=preference) for shortname. or choose your own code/name and fill in the same code/name. In the Service Center of Coachview you can set which data has to be transferred. | /user/profile/index.php | ||||||||
AVG | From Moodle version 3.3.5 onwards, have you set up the GDPR/AVG Privacy Tool? If so, you must give your consent to the terms and conditions that have been set via Site Administration -> Privacy and Policy -> user agreements on behalf of the web service account. |