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

Event handler for meta enrolment plugin. More...

Inheritance diagram for enrol_meta_handler:
enrol_meta_observer

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 handler for meta enrolment plugin.

We try to keep everything in sync via listening to events, it may fail sometimes, so we always do a full sync in cron too.

Member Function Documentation

◆ sync_course_instances()

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

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 )
staticprotected

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_not_supposed_to_be_here()

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

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: