Moodle plugins directory: Get User Cohort: Versions: 1.1 | Moodle.org
Get User Cohort
General plugins (Local) ::: 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
Get User Cohort 1.1
Moodle 2.8, 2.9, 3.0, 3.1, 3.2, 3.3
Released: Tuesday, 19 September 2017, 8:22 PM
Get User cohorts
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
}
)
}
Change log
[1.0] (2017-07-26)
Fixed PHP LINT errors
[1.1] (2017-09-19)
Version information
- Version build number
- 2017091900
- Version release name
- 1.1
- Maturity
- Stable version
- MD5 Sum
- c909a62ed7e84c955eec3017697cca8d
- Supported software
- Moodle 2.8, Moodle 2.9, Moodle 3.0, Moodle 3.1, Moodle 3.2, Moodle 3.3
- Latest release for Moodle 2.8
- Latest release for Moodle 2.9
- Latest release for Moodle 3.0
- Latest release for Moodle 3.1
- Latest release for Moodle 3.2
- Latest release for Moodle 3.3
Version control information
- Version control system (VCS)
- GIT
- VCS repository URL
Default installation instructions for plugins of the type General plugins (Local)
- Make sure you have all the required versions.
- Download and unpack the module.
- Place the folder in the "local" subdirectory.
- Visit http://yoursite.com/admin to finish the installation.