From a1b93588cdc888138f7f7ab014335ae94a0582f7 Mon Sep 17 00:00:00 2001 From: Friederike Schwager <schwager@cil.rwth-aachen.de> Date: Thu, 26 Sep 2019 10:34:09 +0200 Subject: [PATCH] bugfix: don't send message to the user who created a new annotation --- model/comment.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/comment.class.php b/model/comment.class.php index 5f70694..fb46b55 100644 --- a/model/comment.class.php +++ b/model/comment.class.php @@ -114,7 +114,7 @@ class pdfannotator_comment { $messagetext->html = pdfannotator_format_notification_message_html($course, $cm, $context, get_string('modulename', 'pdfannotator'), $cm->name, $question, 'newquestion'); $messagetext->url = $question->urltoanswer; foreach ($recipients as $recipient) { - if ($recipient == $USER) { + if ($recipient->id == $USER->id) { continue; } $messageid = pdfannotator_notify_manager($recipient, $course, $cm, 'newquestion', $messagetext, $anonymous); -- GitLab