Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]
Quiz events tests.
Copyright: | 2013 Adrian Greeve |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 793 lines (32 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
events_test:: (23 methods):
prepare_quiz()
prepare_quiz_attempt()
prepare_quiz_data()
test_attempt_submitted()
test_attempt_becameoverdue()
test_attempt_abandoned()
test_attempt_started()
test_edit_page_viewed()
test_attempt_deleted()
test_preview_attempt_deleted()
test_report_viewed()
test_attempt_reviewed()
test_attempt_summary_viewed()
test_user_override_created()
test_group_override_created()
test_user_override_updated()
test_group_override_updated()
test_user_override_deleted()
test_group_override_deleted()
test_attempt_viewed()
test_attempt_preview_started()
test_question_manually_graded()
test_attempt_regraded()
Class: events_test - X-Ref
Unit tests for quiz events.prepare_quiz() X-Ref |
Setup a quiz. return: quiz the generated quiz. |
prepare_quiz_attempt($quizobj, $ispreview = false) X-Ref |
Setup a quiz attempt at the quiz created by {@link prepare_quiz()}. param: quiz $quizobj the generated quiz. param: bool $ispreview Make the attempt a preview attempt when true. return: array with three elements, array($quizobj, $quba, $attempt) |
prepare_quiz_data($ispreview = false) X-Ref |
Setup some convenience test data with a single attempt. param: bool $ispreview Make the attempt a preview attempt when true. return: array with three elements, array($quizobj, $quba, $attempt) |
test_attempt_submitted() X-Ref |
No description |
test_attempt_becameoverdue() X-Ref |
No description |
test_attempt_abandoned() X-Ref |
No description |
test_attempt_started() X-Ref |
No description |
test_edit_page_viewed() X-Ref |
Test the edit page viewed event. There is no external API for updating a quiz, so the unit test will simply create and trigger the event and ensure the event data is returned as expected. |
test_attempt_deleted() X-Ref |
Test the attempt deleted event. |
test_preview_attempt_deleted() X-Ref |
Test that preview attempt deletions are not logged. |
test_report_viewed() X-Ref |
Test the report viewed event. There is no external API for viewing reports, so the unit test will simply create and trigger the event and ensure the event data is returned as expected. |
test_attempt_reviewed() X-Ref |
Test the attempt reviewed event. There is no external API for reviewing attempts, so the unit test will simply create and trigger the event and ensure the event data is returned as expected. |
test_attempt_summary_viewed() X-Ref |
Test the attempt summary viewed event. There is no external API for viewing the attempt summary, so the unit test will simply create and trigger the event and ensure the event data is returned as expected. |
test_user_override_created() X-Ref |
Test the user override created event. There is no external API for creating a user override, so the unit test will simply create and trigger the event and ensure the event data is returned as expected. |
test_group_override_created() X-Ref |
Test the group override created event. There is no external API for creating a group override, so the unit test will simply create and trigger the event and ensure the event data is returned as expected. |
test_user_override_updated() X-Ref |
Test the user override updated event. There is no external API for updating a user override, so the unit test will simply create and trigger the event and ensure the event data is returned as expected. |
test_group_override_updated() X-Ref |
Test the group override updated event. There is no external API for updating a group override, so the unit test will simply create and trigger the event and ensure the event data is returned as expected. |
test_user_override_deleted() X-Ref |
Test the user override deleted event. |
test_group_override_deleted() X-Ref |
Test the group override deleted event. |
test_attempt_viewed() X-Ref |
Test the attempt viewed event. There is no external API for continuing an attempt, so the unit test will simply create and trigger the event and ensure the event data is returned as expected. |
test_attempt_preview_started() X-Ref |
Test the attempt previewed event. |
test_question_manually_graded() X-Ref |
Test the question manually graded event. There is no external API for manually grading a question, so the unit test will simply create and trigger the event and ensure the event data is returned as expected. |
test_attempt_regraded() X-Ref |
Test the attempt regraded event. There is no external API for regrading attempts, so the unit test will simply create and trigger the event and ensure the event data is returned as expected. |