@ -79,18 +79,6 @@ class enrol_apply_plugin extends enrol_plugin {
$DB->insert_record('enrol_apply_applicationinfo', $applicationinfo, false);
$DB->insert_record('enrol_apply_applicationinfo', $applicationinfo, false);
$this->sendConfirmMailToTeachers($instance, $data, $applydescription);
$this->sendConfirmMailToTeachers($instance, $data, $applydescription);
$this->sendConfirmMailToManagers($instance, $data, $applydescription);
$this->sendConfirmMailToManagers($instance, $data, $applydescription);
// Deprecated fixed by Shiro < gigashiro @ gmail . com >
//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");
redirect("$CFG->wwwroot/course/view.php?id=$instance->courseid");
}
}