Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Class: userselector_test  - X-Ref

Tests for the implementation of {@link user_selector_base} class.

setup_hidden_siteidentity()   X-Ref
Setup the environment for the tests.


test_hidden_siteidentity_fields_no_access()   X-Ref
No identity fields are not shown to student user (no permission to view identity fields).


test_hidden_siteidentity_fields_course_only_access()   X-Ref
Teacher can see students' identity fields only within the course.


test_hidden_siteidentity_fields_course_prevented_access()   X-Ref
Teacher can be prevented from seeing students' identity fields even within the course.


test_hidden_siteidentity_fields_anywhere_access()   X-Ref
Manager can see students' identity fields anywhere.


test_hidden_siteidentity_fields_schismatic_access()   X-Ref
Manager can be prevented from seeing hidden fields outside the course.


test_hidden_siteidentity_fields_hard_to_prevent_access()   X-Ref
Two capabilities must be currently set to prevent manager from seeing hidden fields.


test_hidden_siteidentity_fields_explicit_extrafields()   X-Ref
For legacy reasons, user selectors supported ability to override $CFG->showuseridentity.

However, this was found as violating the principle of respecting site privacy settings. So the feature has been
dropped in Moodle 3.6.