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

IMS Enterprise test case

setUp()   X-Ref
Setup required for all tests.


test_emptyfile()   X-Ref
With an empty IMS enterprise file


test_users_existing()   X-Ref
Existing users are not created again


test_users_add()   X-Ref
Add new users


test_users_add_with_auth()   X-Ref
Add new users and set an auth type


test_user_update()   X-Ref
Update user


test_user_update_disabled()   X-Ref
No description

test_user_delete()   X-Ref
Delete user


test_user_delete_disabled()   X-Ref
Delete user disabled


test_courses_existing()   X-Ref
Existing courses are not created again


test_courses_add()   X-Ref
Add new courses


test_courses_add_createnewcourses_disabled()   X-Ref
Verify that courses are not created when createnewcourses
option is diabled.


test_courses_no_idnumber()   X-Ref
Test adding a course with no idnumber.


test_courses_add_truncate_idnumber()   X-Ref
Add new course with the truncateidnumber setting.


test_course_add_default_category()   X-Ref
Add new course without a category.


test_courses_attrmapping()   X-Ref
Course attributes mapping to IMS enterprise group description tags


test_course_update()   X-Ref
Course updates


test_course_delete()   X-Ref
Course delete. Make it hidden.


test_nested_categories()   X-Ref
Nested categories with name during course creation


test_nested_categories_for_dups()   X-Ref
Test that duplicate nested categories with name are not created


test_nested_categories_idnumber()   X-Ref
Nested categories with idnumber during course creation


test_nested_categories_idnumber_for_dups()   X-Ref
Test that duplicate nested categories with idnumber are not created


test_categories_idnumber_missing_name()   X-Ref
Test that nested categories with idnumber is not created if name is missing


test_create_category_name_no_nested()   X-Ref
Create category with name (nested categories not activated).


test_find_category_name_no_nested()   X-Ref
Find a category with name (nested categories not activated).


test_create_category_idnumber_no_nested()   X-Ref
Create category with idnumber (nested categories not activated).


test_find_category_idnumber_no_nested()   X-Ref
Find a category with idnumber (nested categories not activated).


test_category_idnumber_missing_name_no_nested()   X-Ref
Test that category with idnumber is not created if name is missing (nested categories not activated).


set_test_config()   X-Ref
Sets the plugin configuration for testing


set_xml_file($users = false, $courses = false)   X-Ref
Creates an IMS enterprise XML file and adds it's path to config settings.

param: bool|array $users false or array of users stdClass
param: bool|array $courses false or of courses stdClass

test_imsenterprise_cron_task()   X-Ref
IMS Enterprise enrolment task test.