From d44a738a17f212e96634fec84f9794a3b6cef50a Mon Sep 17 00:00:00 2001 From: Johannes Burk Date: Wed, 1 Jun 2016 14:37:28 +0200 Subject: [PATCH] Remove event triggering, it is already done by the enrol_user method --- lib.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib.php b/lib.php index 2a49582..40c7422 100644 --- a/lib.php +++ b/lib.php @@ -79,18 +79,6 @@ class enrol_apply_plugin extends enrol_plugin { $DB->insert_record('enrol_apply_applicationinfo', $applicationinfo, false); $this->sendConfirmMailToTeachers($instance, $data, $applydescription); $this->sendConfirmMailToManagers($instance, $data, $applydescription); - - // Deprecated fixed by Shiro - //add_to_log($instance->courseid, 'course', 'enrol', '../enrol/users.php?id='.$instance->courseid, $instance->courseid); //there should be userid somewhere! - $context = context_course::instance($instance->courseid); - \core\event\user_enrolment_created::create( - array( - 'objectid' => $instance->id, - 'courseid' => $instance->courseid, - 'context' => $context, - 'relateduserid' => $USER->id, - 'other' => array('enrol' => 'apply') - ))->trigger(); redirect("$CFG->wwwroot/course/view.php?id=$instance->courseid"); }