Enrol external functions.
More...
Enrol external functions.
This api is mostly read only, the actual enrol and unenrol support is in each enrol plugin.
- Copyright
- 2010 Jerome Mouneyrac
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- Since
- Moodle 2.2
◆ 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 | $coursecapabilities | array of course ids and associated capability names {courseid, {capabilities}} |
- Return values
-
array | An 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 | $courseid | Course id |
int | $enrolid | Enrolment id |
string | $search | The query |
boolean | $searchanywhere | Match anywhere in the string |
int | $page | Page number |
int | $perpage | Max per page |
- Return values
-
◆ get_potential_users_parameters()
static core_enrol_external::get_potential_users_parameters |
( |
| ) |
|
|
static |
Returns description of method parameters value.
- Return values
-
◆ 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
-
◆ 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
-
The documentation for this class was generated from the following file: