]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-13413, chat transcripts donot include instructor when using separate groups"
authordongsheng <dongsheng>
Wed, 27 Aug 2008 02:21:11 +0000 (02:21 +0000)
committerdongsheng <dongsheng>
Wed, 27 Aug 2008 02:21:11 +0000 (02:21 +0000)
mod/chat/report.php

index 6f08cd8aba954ea1698bba77a3e13fcc98a71a17..ad1f61989cff0c1fcb9d40ab161d1d33ee0f8f86 100644 (file)
 
         $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 = "";
         }
 
     $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 = "";
     }