Commit 4ce12125 authored by Ruslan Kabalin's avatar Ruslan Kabalin
Browse files

Send mahara system message if user notification error occured.


Signed-off-by: default avatarRuslan Kabalin <ruslan.kabalin@luns.net.uk>
parent e64639ee
......@@ -110,4 +110,5 @@ $string['reallydeleteallnotifications'] = 'Are you sure you want to delete all y
$string['viewsubmittedsubject'] = 'View submitted to %s';
$string['viewsubmittedmessage'] = '%s has submitted their view "%s" to %s';
$string['adminnotificationerror'] = 'User notification error was probably caused by your server configuration.';
?>
......@@ -451,6 +451,13 @@ abstract class ActivityType {
// go into the activity log as 'unread'
$changes->read = 0;
update_record('notification_internal_activity', $changes);
// Though, admins should probably know about the error
$message = (object) array(
'users' => get_column('usr', 'id', 'admin', 1),
'subject' => get_string('adminnotificationerror', 'activity'),
'message' => $e,
);
activity_occurred('maharamessage', $message);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment