See Release Notes
Long Term Support Release
(no description)
File Size: | 676 lines (29 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
imsenterprise_unenrol_test:: (12 methods):
setUp()
set_test_config()
set_xml_file()
generate_test_user_records()
generate_test_course_records()
link_users_with_courses()
test_users_are_enroled_on_courses()
test_no_action_when_unenrol_disabled()
test_existing_roles_and_enrolments_unaffected()
test_disable_enrolments_only()
test_disable_enrolments_and_remove_roles()
test_delete_roles_and_enrolments()
Class: imsenterprise_unenrol_test - X-Ref
IMS Enterprise test casesetUp() X-Ref |
Setup required for all tests. |
set_test_config() X-Ref |
Sets the plugin configuration for testing |
set_xml_file($users = false, $courses = false, $usercoursemembership = 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 param: bool|array $usercoursemembership false or of courses StdClass |
generate_test_user_records($numberofrecordsrequired) X-Ref |
Utility function for generating test user records param: int $numberofrecordsrequired - number of test users required return: array of StdClass objects representing test user records |
generate_test_course_records($numberofrecordsrequired) X-Ref |
Utility function for generating test course records param: int $numberofrecordsrequired - number of test course records required return: array of StdClass objects representing test course records |
link_users_with_courses($users, $courses, $linkmatrix) X-Ref |
Utility function for generating test membership structure for given users and courses. Linkmatrix is expected to be in [row, col] format, where courses are rows and users are columns. Each element of the link matrix is expected to contain <roletype>:<role status>:<role recstatus>. param: array $users param: array $courses param: array $linkmatrix - matrix/two dimensional array of required user course enrolments return: array |
test_users_are_enroled_on_courses() X-Ref |
Add new users, courses and enrolments |
test_no_action_when_unenrol_disabled() X-Ref |
Check that the unenrol actions are completely ignored when "unenrol" setting is disabled |
test_existing_roles_and_enrolments_unaffected() X-Ref |
When a user has existing roles and enrolments, they are unaffected by IMS instructions for other courses |
test_disable_enrolments_only() X-Ref |
Enrolments alone are disabled |
test_disable_enrolments_and_remove_roles() X-Ref |
Enrolments are disabled but retained) and roles removed |
test_delete_roles_and_enrolments() X-Ref |
Enrolments and roles are deleted for specified user |