Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
A test helper trait. More...
Functions | |
assign_user_capability ($capability, $contextid, $roleid=null) | |
Assign a capability to $USER The function creates a student $USER if $USER->id is empty. More... | |
attempt_quiz ($quiz, $user) | |
Answer questions for a quiz + user. More... | |
create_module_test_file (string $xml, string $cmid) | |
Create a file in a modules filearea. More... | |
create_template (string $xml=null) | |
Create test template. More... | |
create_test_draftarea_file (string $xml) | |
Creates a file in the user draft area. More... | |
create_test_quiz ($course, $requiresafeexambrowser=settings_provider::USE_SEB_NO) | |
Create a test quiz for the specified course. More... | |
get_access_manager () | |
Get access manager for testing. More... | |
get_test_settings () | |
Get a test object containing mock test settings. More... | |
make_rule () | |
A helper method to make the rule form the currently created quiz and course. More... | |
set_up_quiz_view_page () | |
A helper method to set up quiz view page. | |
strip_all_prefixes (\stdClass $settings) | |
Strip the seb_ prefix from each setting key. More... | |
Variables | |
global | $CFG |
stdClass | $quiz |
$quiz A test quiz. | |
stdClass | $user |
$user A test logged-in user. | |
trait | quizaccess_seb_test_helper_trait |
A test helper trait. More... | |
A test helper trait.