mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
Fix for bug 2285: chatd shows all chat users as present in every chatroom
Should be fixed, but needs testing.
This commit is contained in:
parent
62faef84c4
commit
548c4e2e55
1 changed files with 22 additions and 20 deletions
|
@ -251,12 +251,14 @@ class ChatDaemon {
|
|||
echo '</script></head><body style="font-face: serif;" bgcolor="'.$THEME->body.'">';
|
||||
|
||||
echo '<table style="width: 100%;"><tbody>';
|
||||
if(empty($this->sets_info)) {
|
||||
// No users
|
||||
echo '<tr><td> </td></tr>';
|
||||
}
|
||||
else {
|
||||
foreach ($this->sets_info as $usersid => $userinfo) {
|
||||
|
||||
// Get the users from that chatroom
|
||||
$users = $this->chatrooms[$info['chatid']]['users'];
|
||||
|
||||
foreach ($users as $usersessionid => $userid) {
|
||||
// Fetch each user's sessionid and then the rest of his data from $this->sets_info
|
||||
$userinfo = $this->sets_info[$usersessionid];
|
||||
|
||||
$lastping = $timenow - $userinfo['chatuser']->lastmessageping;
|
||||
$popuppar = '\'/user/view.php?id='.$userinfo['user']->id.'&course='.$userinfo['courseid'].'\',\'user'.$userinfo['chatuser']->id.'\',\'\'';
|
||||
echo '<tr><td width="35">';
|
||||
|
@ -271,7 +273,7 @@ class ChatDaemon {
|
|||
echo "</font></p>";
|
||||
echo "<td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
echo '</tbody></table>';
|
||||
|
||||
// About 2K of HTML comments to force browsers to render the HTML
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue