Differences Between: [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]
Local stuff for meta course enrolment plugin.
Copyright: | 2010 Petr Skoda {@link http://skodak.org} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 665 lines (31 kb) |
Included or required: | 0 times |
Referenced: | 2 times |
Includes or requires: | 0 files |
enrol_meta_handler:: (5 methods):
sync_course_instances()
sync_with_parent_course()
user_not_supposed_to_be_here()
enrol_meta_sync()
enrol_meta_create_new_group()
Class: enrol_meta_handler - X-Ref
Event handler for meta enrolment plugin.sync_course_instances($courseid, $userid) X-Ref |
Synchronise meta enrolments of this user in this course param: int $courseid param: int $userid return: void |
sync_with_parent_course(stdClass $instance, $userid) X-Ref |
Synchronise user enrolments in given instance as fast as possible. All roles are removed if the meta plugin disabled. param: stdClass $instance param: int $userid return: void |
user_not_supposed_to_be_here($instance, $ue, context_course $context, $plugin) X-Ref |
Deal with users that are not supposed to be enrolled via this instance param: stdClass $instance param: stdClass $ue param: context_course $context param: enrol_meta $plugin return: void |
enrol_meta_sync($courseid = NULL, $verbose = false) X-Ref |
Sync all meta course links. param: int $courseid one course, empty mean all param: bool $verbose verbose CLI output return: int 0 means ok, 1 means error, 2 means plugin disabled |
enrol_meta_create_new_group($courseid, $linkedcourseid) X-Ref |
Create a new group with the course's name. param: int $courseid param: int $linkedcourseid return: int $groupid Group ID for this cohort. |