mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-68070 messaging: Fix error when personal notification is disabled
This commit is contained in:
parent
46f977a8bf
commit
bf17107882
2 changed files with 5 additions and 0 deletions
|
@ -391,6 +391,7 @@ $string['loginasonecourse'] = 'You cannot enter this course.<br /> You have to t
|
|||
$string['maxbytesfile'] = 'The file {$a->file} is too large. The maximum size you can upload is {$a->size}.';
|
||||
$string['maxareabytes'] = 'The file is larger than the space remaining in this area.';
|
||||
$string['messagingdisable'] = 'Messaging is disabled on this site';
|
||||
$string['messageundeliveredbynotificationsettings'] = 'Message failed to deliver. Please check the notification settings.';
|
||||
$string['mimetexisnotexist'] = 'Your system is not configured to run mimeTeX. You need to obtain the C source from <a href="https://www.forkosh.com/mimetex.zip">https://www.forkosh.com/mimetex.zip</a>, compile it and put the executable into your moodle/filter/tex/ directory.';
|
||||
$string['mimetexnotexecutable'] = 'Custom mimetex is not executable!';
|
||||
$string['missingfield'] = 'Field "{$a}" is missing';
|
||||
|
|
|
@ -1699,6 +1699,10 @@ class api {
|
|||
|
||||
$messageid = message_send($eventdata);
|
||||
|
||||
if (!$messageid) {
|
||||
throw new \moodle_exception('messageundeliveredbynotificationsettings', 'moodle');
|
||||
}
|
||||
|
||||
$messagerecord = $DB->get_record('messages', ['id' => $messageid], 'id, useridfrom, fullmessage,
|
||||
timecreated, fullmessagetrust');
|
||||
$message = (object) [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue