See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 39 and 401]
File containing onlineusers class.
Copyright: | 1999 onwards Martin Dougiamas (http://dougiamas.com) |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 193 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
fetcher:: (4 methods):
__construct()
set_sql()
get_users()
count_users()
__construct($currentgroup, $now, $timetoshowusers, $context, $sitelevel = true, $courseid = null) X-Ref |
Class constructor param: int $currentgroup The group (if any) to filter on param: int $now Time now param: int $timetoshowusers Number of seconds to show online users param: context $context Context object used to generate the sql for users enrolled in a specific course param: bool $sitelevel Whether to check online users at site level. param: int $courseid The course id to check |
set_sql($currentgroup, $now, $timetoshowusers, $context, $sitelevel, $courseid) X-Ref |
Store the SQL queries & params for listing online users param: int $currentgroup The group (if any) to filter on param: int $now Time now param: int $timetoshowusers Number of seconds to show online users param: context $context Context object used to generate the sql for users enrolled in a specific course param: bool $sitelevel Whether to check online users at site level. param: int $courseid The course id to check |
get_users($userlimit = 0) X-Ref |
Get a list of the most recent online users param: int $userlimit The maximum number of users that will be returned (optional, unlimited if not set) return: array |
count_users() X-Ref |
Count the number of online users return: int |