From f1644b99f1bdd8aa54f3f1c957ddcec3ce291486 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Wed, 27 Aug 2008 02:21:11 +0000 Subject: [PATCH] "MDL-13413, chat transcripts donot include instructor when using separate groups" --- mod/chat/report.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mod/chat/report.php b/mod/chat/report.php index 6f08cd8aba..ad1f61989c 100644 --- a/mod/chat/report.php +++ b/mod/chat/report.php @@ -50,8 +50,10 @@ $params = array('currentgroup'=>$currentgroup, 'chatid'=>$chat->id, 'start'=>$start, 'end'=>$end); + // If the user is allocated to a group, only show messages from people + // in the same group, or no group if ($currentgroup) { - $groupselect = " AND groupid = :currentgroup"; + $groupselect = " AND (groupid = :currentgroup OR groupid = 0)"; } else { $groupselect = ""; } @@ -116,8 +118,10 @@ $params = array('currentgroup'=>$currentgroup, 'chatid'=>$chat->id, 'start'=>$start, 'end'=>$end); + // If the user is allocated to a group, only show discussions with people in + // the same group, or no group if (!empty($currentgroup)) { - $groupselect = " AND groupid = :currentgroup"; + $groupselect = " AND (groupid = :currentgroup OR groupid = 0)"; } else { $groupselect = ""; } -- 2.39.5