Versions Compared

Key

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

...

In Moodle, external services are a feature that allows integration with external applications or services, enabling them to interact with Moodle and access certain functionalities. The replicator parameter SERVICE refers to the external service short name.
To use external services in Moodle, administrators need to configure the service's settings, including authentication credentials, access permissions, and specific functions that can be accessed by the external application.

Steps:

Code Block
Create External ServiceServices
Add functions to the External Services
Authorise User
Create Token
Manage Protocols
Expand
titleHow to create and external Service

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

Image Added


Select create service
Add a new External service name and the short name “enrol_user“. 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

Image Added

Image AddedImage Added

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 users

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

Image AddedImage Added

Expand
titleHow to create a token

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

Image Added

Image Modified

Image Modified

Expand
titleManage Protocol

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

Image Added

The REST protocol must be enable

Image Added

Course Criteria

...