See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]
Quiz module external functions tests.
Copyright: | 2016 Juan Leyva <juan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 247 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
testable_mod_quiz_external:: (2 methods):
validate_attempt()
validate_attempt_review()
external_test:: (6 methods):
setUp()
test_sequential_navigation_view_attempt()
test_sequential_navigation_attempt_summary()
test_sequential_navigation_get_attempt_data()
prepare_sequential_quiz()
create_quiz_attempt_object()
Class: testable_mod_quiz_external - X-Ref
Silly class to access mod_quiz_external internal methods.validate_attempt($params, $checkaccessrules = true, $failifoverdue = true) X-Ref |
Public accessor. param: array $params Array of parameters including the attemptid and preflight data param: bool $checkaccessrules whether to check the quiz access rules or not param: bool $failifoverdue whether to return error if the attempt is overdue return: array containing the attempt object and access messages |
validate_attempt_review($params) X-Ref |
Public accessor. param: array $params Array of parameters including the attemptid return: array containing the attempt object and display options |
Class: external_test - X-Ref
Quiz module external functions testssetUp() X-Ref |
Set up for every test |
test_sequential_navigation_view_attempt() X-Ref |
Test that a sequential navigation quiz is not allowing to see questions in advance except if reviewing |
test_sequential_navigation_attempt_summary() X-Ref |
Test that a sequential navigation quiz is not allowing to see questions in advance for a student |
test_sequential_navigation_get_attempt_data() X-Ref |
Test that a sequential navigation quiz is not allowing to see questions in advance for student |
prepare_sequential_quiz() X-Ref |
Prepare quiz for sequential navigation tests return: quiz |
create_quiz_attempt_object($quizobj, $userid = null, $ispreview = false) X-Ref |
Create question attempt param: quiz $quizobj param: int|null $userid param: bool|null $ispreview return: quiz_attempt |