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: management_helper_test  - X-Ref

Course and category management helper class tests.

get_user_objects(\testing_data_generator $generator, $contextid)   X-Ref
Returns a user object and its assigned new role.

param: testing_data_generator $generator
param: $contextid
return: array The user object and the role ID

test_action_category_hide_and_show()   X-Ref
Tests:
- action_category_hide
- action_category_show

In order to show/hide the user must have moodle/category:manage on the parent context.
In order to view hidden categories the user must have moodle/category:viewhiddencategories

test_action_category_hide_and_show_by_id()   X-Ref
Tests hiding and showing of a category by its ID.

This mimics the logic of {@link test_action_category_hide_and_show()}

test_action_category_move_courses_into()   X-Ref
Test moving courses between categories.


test_action_category_movedown_and_moveup()   X-Ref
Test moving a categories up and down.


test_action_category_resort_courses()   X-Ref
Test resorting of courses within a category.

\core_course\management\helper::action_category_resort_courses

test_action_category_resort_subcategories()   X-Ref
Tests resorting sub categories of a course.

\core_course\management\helper::action_category_resort_courses

test_action_course_hide_show()   X-Ref
Test hiding and showing of a course.


test_action_course_hide_show_by_record()   X-Ref
Test hiding and showing of a course.


test_action_course_movedown_and_moveup()   X-Ref
Tests moving a course up and down by one.


test_get_category_listitem_actions()   X-Ref
Tests the fetching of actions for a category.


test_get_course_detail_actions()   X-Ref
Tests fetching the course actions.


test_get_course_detail_array()   X-Ref
Test fetching course details.


test_move_courses_into_category()   X-Ref
No description