From c30f7abbb7e6f7fd6507272ae437b1c16d83a388 Mon Sep 17 00:00:00 2001 From: "Carlos Shirasawa (Shiro)" Date: Fri, 19 Jun 2015 17:49:40 -0300 Subject: [PATCH] Fixing with full info --- lib.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib.php b/lib.php index d92638f..3e41e43 100644 --- a/lib.php +++ b/lib.php @@ -99,7 +99,14 @@ class enrol_apply_plugin extends enrol_plugin { // 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('context' => $context))->trigger(); + \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"); }