mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Slightly more robust in case it can't find users. See bug 562.
This commit is contained in:
parent
3960a44b62
commit
c05f2f763b
2 changed files with 9 additions and 7 deletions
|
@ -53,13 +53,6 @@ if (isset($_GET['beep'])) {
|
|||
|
||||
chat_delete_old_users();
|
||||
|
||||
|
||||
/// Get list of users
|
||||
|
||||
if (!$chatusers = chat_get_users($chatuser->chatid)) {
|
||||
error("Could not find any users!");
|
||||
}
|
||||
|
||||
|
||||
/// Print headers
|
||||
|
||||
|
@ -85,6 +78,14 @@ $str->mins = get_string("mins");
|
|||
$str->sec = get_string("sec");
|
||||
$str->secs = get_string("secs");
|
||||
|
||||
/// Get list of users
|
||||
|
||||
if (!$chatusers = chat_get_users($chatuser->chatid)) {
|
||||
print_string("errornousers");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
echo "<table width=\"100%\">";
|
||||
foreach ($chatusers as $chatuser) {
|
||||
$lastping = $timenow - $chatuser->lastmessageping;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue