enrol_support extends facade
Facade for local_middag\framework\support\moodle\enrol_support.
Tags
Table of Contents
Methods
- enrol_user() : bool
- get_enrol() : user_enrolment|null
- get_enrol_cohorts() : array<string|int, mixed>
- get_facade_accessor() : string
- Return the service accessor key for this facade.
- user_is_enrolled() : bool
Methods
enrol_user()
public
static enrol_user(int $courseid, int $userid[, int $roleid = = '5' ]) : bool
Parameters
- $courseid : int
- $userid : int
- $roleid : int = = '5'
Return values
boolget_enrol()
public
static get_enrol(int $courseid, int $userid) : user_enrolment|null
Parameters
- $courseid : int
- $userid : int
Return values
user_enrolment|nullget_enrol_cohorts()
public
static get_enrol_cohorts(int $courseid, int $userid) : array<string|int, mixed>
Parameters
- $courseid : int
- $userid : int
Return values
array<string|int, mixed>get_facade_accessor()
Return the service accessor key for this facade.
public
static get_facade_accessor() : string
Return values
stringuser_is_enrolled()
public
static user_is_enrolled(int $courseid, int $userid) : bool
Parameters
- $courseid : int
- $userid : int