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.
This commit is contained in:
committed by
David Monllao
parent
75aa0f73db
commit
9a5f3f7672
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user