This plugin can be used to retrieve the cohorts of a given user in Moodle by providing the USER ID
- 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
int Default to "null" //The ID of the user"
object {
cohorts list of (
object {
cohortid int //Cohort ID
idnumber string //Cohort id number
name string //Cohort name
}
)
}
Fixed PHP LINT errors
Closed issues: