Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 39 and 311]

(no description)

File Size: 307 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: online_users_test  - X-Ref

Online users testcase

setUp()   X-Ref
Tests initial setup.

Prepare the site with some courses, groups, users and
simulate various recent accesses.

test_fetcher_course1_group_members()   X-Ref
Check logged in group 1, 2 & 3 members in course 1 (should be 3, 4 and 0).

param: array $data Array of user, course and group objects
param: int $now Current Unix timestamp
param: int $timetoshowusers The time window (in seconds) to check for the latest logged in users

test_fetcher_courses()   X-Ref
Check logged in users in courses 1 & 2 (should be 9 and 0).

param: array $data Array of user, course and group objects
param: int $now Current Unix timestamp
param: int $timetoshowusers The time window (in seconds) to check for the latest logged in users

test_fetcher_sitelevel()   X-Ref
Check logged in at the site level (should be 12).

param: int $now Current Unix timestamp
param: int $timetoshowusers The time window (in seconds) to check for the latest logged in users

test_user_visibility_course1_group1_members()   X-Ref
Check user visibility setting for course group members.


test_user_visibility_courses()   X-Ref
Check user visibility setting at course level.


test_user_visibility_sitelevel()   X-Ref
Check user visibility setting at site level.