MDL-47162 core_message: Add course id to message eventdata

This commit is contained in:
Amanda Doughty
2016-10-27 18:11:27 +02:00
committed by Eloy Lafuente (stronk7)
parent 577bd70d38
commit cc350fd9c8
34 changed files with 345 additions and 76 deletions
@@ -83,7 +83,7 @@ class notification_task extends \core\task\adhoc_task {
$template = $subscription->template;
$template = $this->replace_placeholders($template, $subscription, $eventobj, $context);
$htmlmessage = format_text($template, $subscription->templateformat, array('context' => $context));
$msgdata = new \stdClass();
$msgdata = new \core\message\message();
$msgdata->component = 'tool_monitor'; // Your component name.
$msgdata->name = 'notification'; // This is the message name from messages.php.
$msgdata->userfrom = \core_user::get_noreply_user();