Class used to list and count online users.
More...
|
| | __construct ($currentgroup, $now, $timetoshowusers, $context, $sitelevel=true, $courseid=null) |
| | Class constructor.
|
| |
| | count_users () |
| | Count the number of online users.
|
| |
| | get_users ($userlimit=0) |
| | Get a list of the most recent online users.
|
| |
|
|
string | $csql |
| | The SQL query for counting the number of online users.
|
| |
|
string | $params |
| | The params for the SQL queries.
|
| |
|
string | $sql |
| | The SQL query for retrieving a list of online users.
|
| |
|
| | set_sql ($currentgroup, $now, $timetoshowusers, $context, $sitelevel, $courseid) |
| | Store the SQL queries & params for listing online users.
|
| |
Class used to list and count online users.
- Copyright
- 1999 onwards Martin Dougiamas (http://dougiamas.com)
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
| block_online_users\fetcher::__construct |
( |
| $currentgroup, |
|
|
| $now, |
|
|
| $timetoshowusers, |
|
|
| $context, |
|
|
| $sitelevel = true, |
|
|
| $courseid = null ) |
Class constructor.
- Parameters
-
| int | $currentgroup | The group (if any) to filter on |
| int | $now | Time now |
| int | $timetoshowusers | Number of seconds to show online users |
| context | $context | Context object used to generate the sql for users enrolled in a specific course |
| bool | $sitelevel | Whether to check online users at site level. |
| int | $courseid | The course id to check |
◆ count_users()
| block_online_users\fetcher::count_users |
( |
| ) |
|
Count the number of online users.
- Return values
-
◆ get_users()
| block_online_users\fetcher::get_users |
( |
| $userlimit = 0 | ) |
|
Get a list of the most recent online users.
- Parameters
-
| int | $userlimit | The maximum number of users that will be returned (optional, unlimited if not set) |
- Return values
-
◆ set_sql()
| block_online_users\fetcher::set_sql |
( |
| $currentgroup, |
|
|
| $now, |
|
|
| $timetoshowusers, |
|
|
| $context, |
|
|
| $sitelevel, |
|
|
| $courseid ) |
|
protected |
Store the SQL queries & params for listing online users.
- Parameters
-
| int | $currentgroup | The group (if any) to filter on |
| int | $now | Time now |
| int | $timetoshowusers | Number of seconds to show online users |
| context | $context | Context object used to generate the sql for users enrolled in a specific course |
| bool | $sitelevel | Whether to check online users at site level. |
| int | $courseid | The course id to check |
The documentation for this class was generated from the following file:
- blocks/online_users/classes/fetcher.php