mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Don't show old chat users in recent activity
This commit is contained in:
parent
9f39874ec5
commit
c5a05b9598
1 changed files with 3 additions and 0 deletions
|
@ -106,12 +106,15 @@ function chat_print_recent_activity($course, $isteacher, $timestart) {
|
|||
|
||||
global $CFG;
|
||||
|
||||
$timeold = time() - $CFG->chat_old_ping;
|
||||
|
||||
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 cu.lastping > '$timeold'
|
||||
AND ch.course = '$course->id'
|
||||
ORDER BY cu.chatid ASC") ) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue