mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-47162 core_message: Add course id to message eventdata
This commit is contained in:
parent
577bd70d38
commit
cc350fd9c8
34 changed files with 345 additions and 76 deletions
|
@ -920,7 +920,7 @@ class manager {
|
|||
$addressmanager->set_handler('\tool_messageinbound\message\inbound\invalid_recipient_handler');
|
||||
$addressmanager->set_data($record->id);
|
||||
|
||||
$eventdata = new \stdClass();
|
||||
$eventdata = new \core\message\message();
|
||||
$eventdata->component = 'tool_messageinbound';
|
||||
$eventdata->name = 'invalidrecipienthandler';
|
||||
|
||||
|
@ -970,7 +970,7 @@ class manager {
|
|||
$messagedata->subject = $this->currentmessagedata->envelope->subject;
|
||||
$messagedata->error = $error;
|
||||
|
||||
$eventdata = new \stdClass();
|
||||
$eventdata = new \core\message\message();
|
||||
$eventdata->component = 'tool_messageinbound';
|
||||
$eventdata->name = 'messageprocessingerror';
|
||||
$eventdata->userfrom = $userfrom;
|
||||
|
@ -1029,7 +1029,7 @@ class manager {
|
|||
$messagedata = new \stdClass();
|
||||
$messagedata->subject = $this->currentmessagedata->envelope->subject;
|
||||
|
||||
$eventdata = new \stdClass();
|
||||
$eventdata = new \core\message\message();
|
||||
$eventdata->component = 'tool_messageinbound';
|
||||
$eventdata->name = 'messageprocessingsuccess';
|
||||
$eventdata->userfrom = $userfrom;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue