Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

Provides {@link core_user_selector_testcase} class.

Copyright: 2018 David Mudrák <david@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 266 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_user_selector_testcase  - 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.