Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 1.23 KB

README.md

File metadata and controls

40 lines (34 loc) · 1.23 KB

Build Status

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

  1. Install plugin in Moodle
  2. Enable WebServices
  3. Assign the function to the web service user
  4. 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)

Closed issues: