Differences Between: [Versions 310 and 403] [Versions 39 and 403]
(no description)
File Size: | 519 lines (19 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
calendar_event_modified_test:: (13 methods):
create_quiz_instance()
create_quiz_calendar_event()
test_mod_quiz_core_calendar_event_timestart_updated_unknown_event()
test_mod_quiz_core_calendar_event_timestart_updated_open_event()
test_mod_quiz_core_calendar_event_timestart_updated_close_event()
test_mod_quiz_core_calendar_event_timestart_updated_open_event_override()
test_student_role_cant_update_quiz_activity()
test_teacher_role_can_update_quiz_activity()
test_mod_quiz_core_calendar_get_valid_event_timestart_range_unknown_event()
test_mod_quiz_core_calendar_get_valid_event_timestart_range_open_event()
test_mod_quiz_core_calendar_get_valid_event_timestart_range_override_event()
test_mod_quiz_core_calendar_get_valid_event_timestart_range_close_event()
test_core_calendar_event_timestart_updated_update_quiz_attempt()
Class: calendar_event_modified_test - X-Ref
Unit tests for the calendar event modification callbacks usedcreate_quiz_instance(array $properties) X-Ref |
Create an instance of the quiz activity. param: array $properties Properties to set on the activity return: stdClass Quiz activity instance |
create_quiz_calendar_event(\stdClass $quiz, array $eventproperties) X-Ref |
Create a calendar event for a quiz activity instance. param: \stdClass $quiz The activity instance param: array $eventproperties Properties to set on the calendar event return: calendar_event |
test_mod_quiz_core_calendar_event_timestart_updated_unknown_event() X-Ref |
An unkown event type should not change the quiz instance. |
test_mod_quiz_core_calendar_event_timestart_updated_open_event() X-Ref |
A QUIZ_EVENT_TYPE_OPEN event should update the timeopen property of the quiz activity. |
test_mod_quiz_core_calendar_event_timestart_updated_close_event() X-Ref |
A QUIZ_EVENT_TYPE_CLOSE event should update the timeclose property of the quiz activity. |
test_mod_quiz_core_calendar_event_timestart_updated_open_event_override() X-Ref |
A QUIZ_EVENT_TYPE_OPEN event should not update the timeopen property of the quiz activity if it's an override. |
test_student_role_cant_update_quiz_activity() X-Ref |
If a student somehow finds a way to update the quiz calendar event then the callback should not update the quiz activity otherwise that would be a security issue. |
test_teacher_role_can_update_quiz_activity() X-Ref |
A teacher with the capability to modify a quiz module should be able to update the quiz activity dates by changing the calendar event. |
test_mod_quiz_core_calendar_get_valid_event_timestart_range_unknown_event() X-Ref |
An unkown event type should not have any limits |
test_mod_quiz_core_calendar_get_valid_event_timestart_range_open_event() X-Ref |
The open event should be limited by the quiz's timeclose property, if it's set. |
test_mod_quiz_core_calendar_get_valid_event_timestart_range_override_event() X-Ref |
An override event should not have any limits. |
test_mod_quiz_core_calendar_get_valid_event_timestart_range_close_event() X-Ref |
The close event should be limited by the quiz's timeopen property, if it's set. |
test_core_calendar_event_timestart_updated_update_quiz_attempt() X-Ref |
When the close date event is changed and it results in the time close value of the quiz being updated then the open quiz attempts should also be updated. |