Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Class: mod_quiz_calendar_event_modified_testcase  - X-Ref


create_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.