Moodle Plugins directory: Get User Cohort | Moodle.org
Get User Cohort
Local plugins ::: local_get_user_cohorts
Maintained by
Christos Savva
This plugin can be used to retrieve the cohorts of a given user in Moodle by providing the USER ID
Latest release:
34 sites
12 downloads
5 fans
Current versions available: 1
Description
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
}
)
Useful links
Contributors
Christos Savva (Lead maintainer)
Please login to view contributors details and/or to contact them
Comments