Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Class: grouplib_test  - X-Ref

Unit tests for lib/grouplib.php

test_groups_get_group_by_idnumber()   X-Ref
No description

test_groups_get_grouping_by_idnumber()   X-Ref
No description

test_groups_get_members_ids_sql()   X-Ref
No description

test_groups_get_members_ids_sql_multiple_groups()   X-Ref
No description

test_groups_get_members_ids_sql_multiple_groups_join_types()   X-Ref
No description

test_groups_get_members_ids_sql_valid_context()   X-Ref
No description

test_groups_get_members_ids_sql_empty_context()   X-Ref
No description

test_groups_get_members_ids_sql_invalid_context()   X-Ref
No description

test_groups_get_names_concat_sql()   X-Ref
Test retrieving users with concatenated group names from a course


test_groups_get_group_by_name()   X-Ref
No description

test_groups_get_grouping()   X-Ref
No description

test_groups_get_course_data()   X-Ref
No description

test_groups_group_visible()   X-Ref
Tests for groups_group_visible.


test_groups_get_groupmode()   X-Ref
No description

test_groups_allgroups_course_menu()   X-Ref
Tests for groups_allgroups_course_menu() .


test_groups_ordering()   X-Ref
This unit test checks that groups_get_all_groups returns groups in
alphabetical order even if they are in a grouping.


test_groups_get_all_groups_in_grouping_with_members()   X-Ref
Tests for groups_get_all_groups when grouping is set and we want members as well.


test_groups_get_user_groups()   X-Ref
Tests for groups_get_user_groups() method.


make_group_list($number)   X-Ref
Create dummy groups array for use in menu tests

param: int $number
return: array

test_groups_sort_menu_options_empty()   X-Ref
No description

test_groups_sort_menu_options_allowed_goups_only()   X-Ref
No description

test_groups_sort_menu_options_user_goups_only()   X-Ref
No description

test_groups_sort_menu_options_user_both()   X-Ref
No description

test_groups_sort_menu_options_user_both_many_groups()   X-Ref
No description

test_groups_user_groups_visible()   X-Ref
Tests for groups_user_groups_visible.


test_groups_get_groups_members()   X-Ref
Tests for groups_get_groups_members() method.


test_groups_get_activity_shared_group_members()   X-Ref
Tests for groups_get_activity_shared_group_members() method.