/** * Observer for \core\event\course_module_created event. * * @param \core\event\course_module_created $event * @return void */ public static function course_module_created(\core\event\course_module_created $event) { global $CFG; if ($event->other['modulename'] === 'facetoface') { // Include the Face-to-Face library to make use of the facetoface_instance_created function. require_once $CFG->dirroot . '/mod/facetoface/lib.php'; $facetoface = $event->get_record_snapshot('facetoface', $event->other['instanceid']); facetoface_instance_created($event->get_context(), $forum); } }
/** * Observer for \core\event\course_module_created event. * * @param \core\event\course_module_created $event * @return void */ public static function course_module_created(\core\event\course_module_created $event) { global $CFG; if ($event->other['modulename'] === 'quora') { // Include the quora library to make use of the quora_instance_created function. require_once $CFG->dirroot . '/mod/quora/lib.php'; $quora = $event->get_record_snapshot('quora', $event->other['instanceid']); quora_instance_created($event->get_context(), $quora); } }
/** * Observer for \core\event\course_module_created event. * * @param \core\event\course_module_created $event * @return void */ public static function course_module_created(\core\event\course_module_created $event) { global $CFG; if ($event->other['modulename'] === 'hsuforum') { // Include the forum library to make use of the hsuforum_instance_created function. require_once $CFG->dirroot . '/mod/hsuforum/lib.php'; $forum = $event->get_record_snapshot('hsuforum', $event->other['instanceid']); hsuforum_instance_created($event->get_context(), $forum); } }