Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_enrol_external Class Reference

Enrol external functions. More...

Inheritance diagram for core_enrol_external:

Static Public Member Functions

static get_enrolled_users_with_capability ($coursecapabilities, $options)
 Return users that have the capabilities for each course specified.
 
static get_enrolled_users_with_capability_parameters ()
 Returns description of method parameters.
 
static get_enrolled_users_with_capability_returns ()
 Returns description of method result value.
 
static get_potential_users ($courseid, $enrolid, $search, $searchanywhere, $page, $perpage)
 Get potential users.
 
static get_potential_users_parameters ()
 Returns description of method parameters value.
 
static get_users_courses ($userid, $returnusercount=true)
 Get list of courses user is enrolled in (only active enrolments are returned).
 
static get_users_courses_parameters ()
 Returns description of method parameters.
 
static get_users_courses_returns ()
 Returns description of method result value.
 

Detailed Description

Enrol external functions.

This api is mostly read only, the actual enrol and unenrol support is in each enrol plugin.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Since
Moodle 2.2

Member Function Documentation

◆ get_enrolled_users_with_capability()

static core_enrol_external::get_enrolled_users_with_capability ( $coursecapabilities,
$options )
static

Return users that have the capabilities for each course specified.

For each course and capability specified, a list of the users that are enrolled in the course and have that capability are returned.

Parameters
array$coursecapabilitiesarray of course ids and associated capability names {courseid, {capabilities}}
Return values
arrayAn array of arrays describing users for each associated courseid and capability
Since
Moodle 2.4

◆ get_enrolled_users_with_capability_parameters()

static core_enrol_external::get_enrolled_users_with_capability_parameters ( )
static

Returns description of method parameters.

Return values
external_function_parameters
Since
Moodle 2.4

◆ get_enrolled_users_with_capability_returns()

static core_enrol_external::get_enrolled_users_with_capability_returns ( )
static

Returns description of method result value.

Return values
external_multiple_structure
Since
Moodle 2.4

◆ get_potential_users()

static core_enrol_external::get_potential_users ( $courseid,
$enrolid,
$search,
$searchanywhere,
$page,
$perpage )
static

Get potential users.

Parameters
int$courseidCourse id
int$enrolidEnrolment id
string$searchThe query
boolean$searchanywhereMatch anywhere in the string
int$pagePage number
int$perpageMax per page
Return values
arrayAn array of users

◆ get_potential_users_parameters()

static core_enrol_external::get_potential_users_parameters ( )
static

Returns description of method parameters value.

Return values
core_external\external_description

◆ get_users_courses()

static core_enrol_external::get_users_courses ( $userid,
$returnusercount = true )
static

Get list of courses user is enrolled in (only active enrolments are returned).

Please note the current user must be able to access the course, otherwise the course is not included.

Parameters
int$userid
bool$returnusercount
Return values
arrayof courses

◆ get_users_courses_parameters()

static core_enrol_external::get_users_courses_parameters ( )
static

Returns description of method parameters.

Return values
external_function_parameters

◆ get_users_courses_returns()

static core_enrol_external::get_users_courses_returns ( )
static

Returns description of method result value.

Return values
core_external\external_description

The documentation for this class was generated from the following file: