Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
enrol_meta_observer Class Reference

Event observer for enrol_meta. More...

Inheritance diagram for enrol_meta_observer:

Static Public Member Functions

static course_deleted (\core\event\course_deleted $event)
 Triggered via course_deleted event.
 
static enrol_instance_updated (\core\event\enrol_instance_updated $event)
 Triggered via enrol_instance_updated event.
 
static role_assigned (\core\event\role_assigned $event)
 Triggered via role_assigned event.
 
static role_unassigned (\core\event\role_unassigned $event)
 Triggered via role_unassigned event.
 
static user_enrolment_created (\core\event\user_enrolment_created $event)
 Triggered via user_enrolment_created event.
 
static user_enrolment_deleted (\core\event\user_enrolment_deleted $event)
 Triggered via user_enrolment_deleted event.
 
static user_enrolment_updated (\core\event\user_enrolment_updated $event)
 Triggered via user_enrolment_updated event.
 

Static Protected Member Functions

static sync_course_instances ($courseid, $userid)
 Synchronise meta enrolments of this user in this course.
 
static sync_with_parent_course (stdClass $instance, $userid)
 Synchronise user enrolments in given instance as fast as possible.
 
static user_not_supposed_to_be_here ($instance, $ue, context_course $context, $plugin)
 Deal with users that are not supposed to be enrolled via this instance.
 

Detailed Description

Event observer for enrol_meta.

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

Member Function Documentation

◆ course_deleted()

static enrol_meta_observer::course_deleted ( \core\event\course_deleted $event)
static

Triggered via course_deleted event.

Parameters
core\event\course_deleted$event
Return values
booltrue on success

◆ enrol_instance_updated()

static enrol_meta_observer::enrol_instance_updated ( \core\event\enrol_instance_updated $event)
static

Triggered via enrol_instance_updated event.

Parameters
core\event\enrol_instance_updated$event
Return values
boolean

◆ role_assigned()

static enrol_meta_observer::role_assigned ( \core\event\role_assigned $event)
static

Triggered via role_assigned event.

Parameters
core\event\role_assigned$event
Return values
booltrue on success.

◆ role_unassigned()

static enrol_meta_observer::role_unassigned ( \core\event\role_unassigned $event)
static

Triggered via role_unassigned event.

Parameters
core\event\role_unassigned$event
Return values
booltrue on success

◆ sync_course_instances()

static enrol_meta_handler::sync_course_instances ( $courseid,
$userid )
staticprotectedinherited

Synchronise meta enrolments of this user in this course.

Parameters
int$courseid
int$userid
Return values
void

◆ sync_with_parent_course()

static enrol_meta_handler::sync_with_parent_course ( stdClass $instance,
$userid )
staticprotectedinherited

Synchronise user enrolments in given instance as fast as possible.

All roles are removed if the meta plugin disabled.

Parameters
stdClass$instance
int$userid
Return values
void

◆ user_enrolment_created()

static enrol_meta_observer::user_enrolment_created ( \core\event\user_enrolment_created $event)
static

Triggered via user_enrolment_created event.

Parameters
core\event\user_enrolment_created$event
Return values
booltrue on success.

◆ user_enrolment_deleted()

static enrol_meta_observer::user_enrolment_deleted ( \core\event\user_enrolment_deleted $event)
static

Triggered via user_enrolment_deleted event.

Parameters
core\event\user_enrolment_deleted$event
Return values
booltrue on success.

◆ user_enrolment_updated()

static enrol_meta_observer::user_enrolment_updated ( \core\event\user_enrolment_updated $event)
static

Triggered via user_enrolment_updated event.

Parameters
core\event\user_enrolment_updated$event
Return values
booltrue on success

◆ user_not_supposed_to_be_here()

static enrol_meta_handler::user_not_supposed_to_be_here ( $instance,
$ue,
context_course $context,
$plugin )
staticprotectedinherited

Deal with users that are not supposed to be enrolled via this instance.

Parameters
stdClass$instance
stdClass$ue
context_course$context
enrol_meta$plugin
Return values
void

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