MDL-47162 core_message: Updating all uses of messaging to add courseid
This commit is contained in:
@@ -930,6 +930,7 @@ class manager {
|
||||
$userfrom->customheaders[] = 'In-Reply-To: ' . $messageid;
|
||||
|
||||
// The message will be sent from the intended user.
|
||||
$eventdata->courseid = SITEID;
|
||||
$eventdata->userfrom = \core_user::get_support_user();
|
||||
$eventdata->userto = $USER;
|
||||
$eventdata->subject = $this->get_reply_subject($this->currentmessagedata->envelope->subject);
|
||||
@@ -971,6 +972,7 @@ class manager {
|
||||
$messagedata->error = $error;
|
||||
|
||||
$eventdata = new \core\message\message();
|
||||
$eventdata->courseid = SITEID;
|
||||
$eventdata->component = 'tool_messageinbound';
|
||||
$eventdata->name = 'messageprocessingerror';
|
||||
$eventdata->userfrom = $userfrom;
|
||||
@@ -1030,6 +1032,7 @@ class manager {
|
||||
$messagedata->subject = $this->currentmessagedata->envelope->subject;
|
||||
|
||||
$eventdata = new \core\message\message();
|
||||
$eventdata->courseid = SITEID;
|
||||
$eventdata->component = 'tool_messageinbound';
|
||||
$eventdata->name = 'messageprocessingsuccess';
|
||||
$eventdata->userfrom = $userfrom;
|
||||
|
||||
@@ -84,6 +84,7 @@ class notification_task extends \core\task\adhoc_task {
|
||||
$template = $this->replace_placeholders($template, $subscription, $eventobj, $context);
|
||||
$htmlmessage = format_text($template, $subscription->templateformat, array('context' => $context));
|
||||
$msgdata = new \core\message\message();
|
||||
$msgdata->courseid = empty($subscription->courseid) ? SITEID : $subscription->courseid;
|
||||
$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();
|
||||
|
||||
Reference in New Issue
Block a user