See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 401 and 402] [Versions 401 and 403]
Unit tests for (some of) mod/quiz/locallib.php.
Copyright: | 2008 Tim Hunt |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 685 lines (29 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
locallib_test:: (15 methods):
test_quiz_rescale_grade()
quiz_attempt_state_data_provider()
test_quiz_attempt_state()
test_quiz_question_tostring()
test_quiz_question_tostring_does_not_filter()
test_quiz_view()
test_quiz_is_overriden_calendar_event_no_override()
test_quiz_is_overriden_calendar_event_no_module_event()
test_quiz_is_overriden_calendar_event_different_quiz_instance()
test_quiz_is_overriden_calendar_event_user_override()
test_quiz_is_overriden_calendar_event_group_override()
test_quiz_get_user_timeclose()
setup_quiz_and_tags()
test_quiz_override_summary()
test_quiz_send_confirmation()
Class: locallib_test - X-Ref
Unit tests for (some of) mod/quiz/locallib.php.test_quiz_rescale_grade() X-Ref |
No description |
quiz_attempt_state_data_provider() X-Ref |
No description |
test_quiz_attempt_state($attemptstate,$relativetimefinish, $relativetimeclose, $expectedstate) X-Ref |
param: unknown $attemptstate as in the quiz_attempts.state DB column. param: unknown $relativetimefinish time relative to now when the attempt finished, or null for 0. param: unknown $relativetimeclose time relative to now when the quiz closes, or null for 0. param: unknown $expectedstate expected result. One of the mod_quiz_display_options constants/ |
test_quiz_question_tostring() X-Ref |
test_quiz_question_tostring_does_not_filter() X-Ref |
test_quiz_view() X-Ref |
Test quiz_view return: void |
test_quiz_is_overriden_calendar_event_no_override() X-Ref |
Return false when there are not overrides for this quiz instance. |
test_quiz_is_overriden_calendar_event_no_module_event() X-Ref |
Return false if the given event isn't an quiz module event. |
test_quiz_is_overriden_calendar_event_different_quiz_instance() X-Ref |
Return false if there is overrides for this use but they belong to another quiz instance. |
test_quiz_is_overriden_calendar_event_user_override() X-Ref |
Return true if there is a user override for this event and quiz instance. |
test_quiz_is_overriden_calendar_event_group_override() X-Ref |
Return true if there is a group override for the event and quiz instance. |
test_quiz_get_user_timeclose() X-Ref |
Test test_quiz_get_user_timeclose(). |
setup_quiz_and_tags($qnum, $randomqnum, $questiontags = [], $unusedtags = []) X-Ref |
This function creates a quiz with some standard (non-random) and some random questions. The standard questions are created first and then random questions follow them. So in a quiz with 3 standard question and 2 random question, the first random question is at slot 4. param: int $qnum Number of standard questions that should be created in the quiz. param: int $randomqnum Number of random questions that should be created in the quiz. param: array $questiontags Tags to be used for random questions. param: string[] $unusedtags Some additional tags to be created. return: array An array of 2 elements: $quiz and $tagobjects. |
test_quiz_override_summary() X-Ref |
No description |
test_quiz_send_confirmation() X-Ref |
Test quiz_send_confirmation function. |