Moodle  2.2.1
http://www.collinsharper.com
enrol_meta_handler Class Reference

Static Public Member Functions

static role_assigned ($ra)
static role_unassigned ($ra)
static user_enrolled ($ue)
static user_unenrolled ($ue)
static user_enrol_modified ($ue)
static course_deleted ($course)

Static Protected Member Functions

static sync_course_instances ($courseid, $userid)
static sync_with_parent_course (stdClass $instance, $userid)
static user_not_supposed_to_be_here ($instance, $ue, context_course $context, $plugin)

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.

Definition at line 35 of file locallib.php.


Member Function Documentation

static course_deleted ( course) [static]

Triggered via course_deleted event.

Parameters:
stdClass$course
Returns:
bool success

Definition at line 361 of file locallib.php.

Here is the call graph for this function:

static role_assigned ( ra) [static]

Triggered via role assigned event.

Parameters:
stdClass$ra
Returns:
bool success

Definition at line 238 of file locallib.php.

Here is the call graph for this function:

static role_unassigned ( ra) [static]

Triggered via role unassigned event.

Parameters:
stdClass$ra
Returns:
bool success

Definition at line 267 of file locallib.php.

Here is the call graph for this function:

static sync_course_instances ( courseid,
userid 
) [static, protected]

Synchronise meta enrolments of this user in this course

Parameters:
int$courseid
int$userid
Returns:
void

Definition at line 44 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static sync_with_parent_course ( stdClass $  instance,
userid 
) [static, protected]

Synchronise user enrolments in given instance as fast as possible.

All roles are removed if the meta plugin disabled.

Parameters:
stdClass$instance
int$userid
Returns:
void

Definition at line 82 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static user_enrol_modified ( ue) [static]

Triggered via user enrolment modification event.

Parameters:
stdClass$ue
Returns:
bool success

Definition at line 339 of file locallib.php.

Here is the call graph for this function:

static user_enrolled ( ue) [static]

Triggered via user enrolled event.

Parameters:
stdClass$ue
Returns:
bool success

Definition at line 297 of file locallib.php.

Here is the call graph for this function:

static user_not_supposed_to_be_here ( instance,
ue,
context_course context,
plugin 
) [static, protected]

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

Parameters:
stdClass$instance
stdClass$ue
context_course$context
enrol_meta$plugin
Returns:
void

Definition at line 208 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static user_unenrolled ( ue) [static]

Triggered via user unenrolled event.

Parameters:
stdClass$ue
Returns:
bool success

Definition at line 319 of file locallib.php.

Here is the call graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations