插件本地插件稳定版
Get User Cohort
- Moodle 2.8–3.3
- 更新 2017-09-19
This plugin can be used to retrieve the cohorts of a given user in Moodle by providing the USER ID
This plugin can be used to retrieve the cohorts of a given user in Moodle by providing the USER ID
How it works
Install plugin in Moodle
Enable WebServices
Assign the function to the web service user
Send a request to the server
http://[moodleurl]/webservice/rest/server.php?wstoken=[YOURTOKEN]&wsfunction=local_wsgetusercohorts&userid=18&moodlewsrestformat=json Parameters
int Default to “null” //The ID of the user” Returns
object {
cohorts list of (
object {
cohortid int //Cohort ID
idnumber string //Cohort id number
name string //Cohort name
}
)
- 1.1Moodle 2.8, 2.9, 3.0, 3.1, 3.2, 3.3