Skip to content

This plugin can be used to retrieve the cohorts of a given user in Moodle by providing the USER ID

Notifications You must be signed in to change notification settings

poleumdev/moodle-local_get_user_cohorts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

This plugin can be used to retrieve the cohorts of a given user in Moodle by providing the USER ID

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages