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.

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.