mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +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
|
@ -12,6 +12,7 @@ $string['chatreport'] = "Chat sessions";
|
||||||
$string['currentchats'] = "Active chat sessions";
|
$string['currentchats'] = "Active chat sessions";
|
||||||
$string['currentusers'] = "Current users";
|
$string['currentusers'] = "Current users";
|
||||||
$string['enterchat'] = "Click here to enter the chat";
|
$string['enterchat'] = "Click here to enter the chat";
|
||||||
|
$string['errornousers'] = "Could not find any users!";
|
||||||
$string['idle'] = "Idle";
|
$string['idle'] = "Idle";
|
||||||
$string['messagebeepseveryone'] = "\$a beeps everyone!";
|
$string['messagebeepseveryone'] = "\$a beeps everyone!";
|
||||||
$string['messagebeepsyou'] = "\$a has just beeped you!";
|
$string['messagebeepsyou'] = "\$a has just beeped you!";
|
||||||
|
|
|
@ -53,13 +53,6 @@ if (isset($_GET['beep'])) {
|
||||||
|
|
||||||
chat_delete_old_users();
|
chat_delete_old_users();
|
||||||
|
|
||||||
|
|
||||||
/// Get list of users
|
|
||||||
|
|
||||||
if (!$chatusers = chat_get_users($chatuser->chatid)) {
|
|
||||||
error("Could not find any users!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Print headers
|
/// Print headers
|
||||||
|
|
||||||
|
@ -85,6 +78,14 @@ $str->mins = get_string("mins");
|
||||||
$str->sec = get_string("sec");
|
$str->sec = get_string("sec");
|
||||||
$str->secs = get_string("secs");
|
$str->secs = get_string("secs");
|
||||||
|
|
||||||
|
/// Get list of users
|
||||||
|
|
||||||
|
if (!$chatusers = chat_get_users($chatuser->chatid)) {
|
||||||
|
print_string("errornousers");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "<table width=\"100%\">";
|
echo "<table width=\"100%\">";
|
||||||
foreach ($chatusers as $chatuser) {
|
foreach ($chatusers as $chatuser) {
|
||||||
$lastping = $timenow - $chatuser->lastmessageping;
|
$lastping = $timenow - $chatuser->lastmessageping;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue