From: moodler Date: Mon, 23 Oct 2006 07:46:57 +0000 (+0000) Subject: Merged tidy-ups from stable X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9d5210af2267d7663eaf55c8d541fa3dca27d293;p=moodle.git Merged tidy-ups from stable --- diff --git a/blocks/online_users/block_online_users.php b/blocks/online_users/block_online_users.php index 697724ac12..c0d10062f1 100644 --- a/blocks/online_users/block_online_users.php +++ b/blocks/online_users/block_online_users.php @@ -72,9 +72,9 @@ class block_online_users extends block_base { ul.userid = u.id $courseselect $timeselect - $groupselect ".sql_paging_limit(0,20); + $groupselect "; - if ($pusers = get_records_sql($SQL)) { + if ($pusers = get_records_sql($SQL, 0, 20)) { foreach ($pusers as $puser) { $puser->fullname = fullname($puser); $users[$puser->id] = $puser; @@ -95,8 +95,14 @@ class block_online_users extends block_base { foreach ($users as $user) { $this->content->text .= '
  • '; $timeago = format_time(time() - max($user->timeaccess, $user->lastaccess)); //bruno to calculate correctly on frontpage - $this->content->text .= print_user_picture($user->id, $COURSE->id, $user->picture, 16, true).' '; - $this->content->text .= ''.$user->fullname.''; + if ($user->username == 'guest') { + $this->content->text .= print_user_picture($user->id, $COURSE->id, $user->picture, 16, true, false).' '; + $this->content->text .= get_string('guestuser'); + + } else { + $this->content->text .= print_user_picture($user->id, $COURSE->id, $user->picture, 16, true).' '; + $this->content->text .= ''.$user->fullname.''; + } if (!empty($USER->id) and ($USER->id != $user->id) and !empty($CFG->messaging) and !isguest() and $user->username != 'guest') { // Only when logged in and messaging active etc $this->content->text .= "\n".' '