Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

How to:

Expand
titleHow to create and external an External Service

Log in to Moodle as an administrator.
Goto: Site administration → Plugins → Webservices → External services.


Select create service
Add a new External service name and the short name “enrol_user“. The Short name is a mandatory field and is the name used to call the service.

Note

Short name is not a mandatory field in Moode, if left blank the interface will not work.

Expand
titleHow to add functions to the External Service

Goto: Site administration → Plugins → Webservices → External services → Functions

The following functions need to be added to the external service.

Code Block
auth_userkey_request_login_url
core_completion_get_course_completion_status
core_course_get_courses
core_enrol_get_enrolled_users
core_enrol_unenrol_user_enrolment
core_user_create_users
core_user_get_users
core_user_get_users_by_field
core_user_update_users
core_webservice_get_site_info
enrol_manual_enrol_users
enrol_manual_unenrol_users

Expand
titleAuthorised How to authorise users

Goto: Go to Site administration → Plugins → Webservices → External services → Authorised users

Expand
titleHow to create a token

Go to: Site Administrator → Plugins → Web Services → Manage Token

While creating the token you have to select the already created External Service from the drop-down button.

Expand
titleHow to Manage Protocol

Go to , Site Administrator → Plugins → Web Services → Manage Protocol

The REST protocol must be enabled.

...