]> git.mjollnir.org Git - moodle.git/commitdiff
Only show "recent activity" for chats in the current course.
authormoodler <moodler>
Mon, 21 Jul 2003 01:35:28 +0000 (01:35 +0000)
committermoodler <moodler>
Mon, 21 Jul 2003 01:35:28 +0000 (01:35 +0000)
mod/chat/lib.php

index df47ca55b2a2552bf18574c6bba5c74ebc5fee09..c00254473d76816af35cf8bacde40b23a6f60eac 100644 (file)
@@ -100,8 +100,11 @@ function chat_print_recent_activity($course, $isteacher, $timestart) {
 
     if (!$chatusers = get_records_sql("SELECT u.id, cu.chatid, u.firstname, u.lastname
                                         FROM {$CFG->prefix}chat_users as cu,
+                                             {$CFG->prefix}chat as ch,
                                              {$CFG->prefix}user as u
                                        WHERE cu.userid = u.id 
+                                         AND cu.chatid = ch.id
+                                         AND ch.course = '$course->id'
                                        ORDER BY cu.chatid ASC") ) {
         return false;
     }