From: dongsheng Date: Wed, 27 Aug 2008 02:21:11 +0000 (+0000) Subject: "MDL-13413, chat transcripts donot include instructor when using separate groups" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f1644b99f1bdd8aa54f3f1c957ddcec3ce291486;p=moodle.git "MDL-13413, chat transcripts donot include instructor when using separate groups" --- 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 = ""; }