From 9a5f3f7672ef92dbc9e29d35cfe88d4e3da9751e Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Thu, 5 Nov 2015 15:54:17 +0000 Subject: [PATCH] MDL-46049 chat: update calendar times on repeating chat sessions Previously were using the invalid chat id and the calendar entry was not updated. Thanks to Andy McGill who worked this out. --- mod/chat/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/chat/lib.php b/mod/chat/lib.php index 6649eb11f1a..14b8c30df34 100644 --- a/mod/chat/lib.php +++ b/mod/chat/lib.php @@ -634,7 +634,7 @@ function chat_update_chat_times($chatid=0) { $event = new stdClass(); // Update calendar too. $cond = "modulename='chat' AND instance = :chatid AND timestart <> :chattime"; - $params = array('chattime' => $chat->chattime, 'chatid' => $chatid); + $params = array('chattime' => $chat->chattime, 'chatid' => $chat->id); if ($event->id = $DB->get_field_select('event', 'id', $cond, $params)) { $event->timestart = $chat->chattime;