See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]
Unit tests for (some of) mod/quiz/locallib.php.
Copyright: | 2008 The Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU Public License |
File Size: | 1003 lines (45 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
mod_quiz_lib_testcase:: (23 methods):
test_quiz_has_grades()
test_quiz_format_grade()
test_quiz_get_grade_format()
test_quiz_format_question_grade()
test_quiz_delete_instance()
test_quiz_get_completion_state()
test_quiz_get_user_attempts()
test_quiz_get_group_override_priorities()
test_quiz_core_calendar_provide_event_action_open()
test_quiz_core_calendar_provide_event_action_open_for_user()
test_quiz_core_calendar_provide_event_action_closed()
test_quiz_core_calendar_provide_event_action_closed_for_user()
test_quiz_core_calendar_provide_event_action_open_in_future()
test_quiz_core_calendar_provide_event_action_open_in_future_for_user()
test_quiz_core_calendar_provide_event_action_no_capability()
test_quiz_core_calendar_provide_event_action_no_capability_for_user()
test_quiz_core_calendar_provide_event_action_already_finished()
test_quiz_core_calendar_provide_event_action_already_finished_for_user()
test_quiz_core_calendar_provide_event_action_already_completed()
test_quiz_core_calendar_provide_event_action_already_completed_for_user()
create_action_event()
test_mod_quiz_completion_get_active_rule_descriptions()
test_creation_with_no_calendar_capabilities()
Class: mod_quiz_lib_testcase - X-Ref
test_quiz_has_grades() X-Ref |
No description |
test_quiz_format_grade() X-Ref |
No description |
test_quiz_get_grade_format() X-Ref |
No description |
test_quiz_format_question_grade() X-Ref |
No description |
test_quiz_delete_instance() X-Ref |
Test deleting a quiz instance. |
test_quiz_get_completion_state() X-Ref |
Test checking the completion state of a quiz. |
test_quiz_get_user_attempts() X-Ref |
No description |
test_quiz_get_group_override_priorities() X-Ref |
Test for quiz_get_group_override_priorities(). |
test_quiz_core_calendar_provide_event_action_open() X-Ref |
No description |
test_quiz_core_calendar_provide_event_action_open_for_user() X-Ref |
No description |
test_quiz_core_calendar_provide_event_action_closed() X-Ref |
No description |
test_quiz_core_calendar_provide_event_action_closed_for_user() X-Ref |
No description |
test_quiz_core_calendar_provide_event_action_open_in_future() X-Ref |
No description |
test_quiz_core_calendar_provide_event_action_open_in_future_for_user() X-Ref |
No description |
test_quiz_core_calendar_provide_event_action_no_capability() X-Ref |
No description |
test_quiz_core_calendar_provide_event_action_no_capability_for_user() X-Ref |
No description |
test_quiz_core_calendar_provide_event_action_already_finished() X-Ref |
No description |
test_quiz_core_calendar_provide_event_action_already_finished_for_user() X-Ref |
No description |
test_quiz_core_calendar_provide_event_action_already_completed() X-Ref |
No description |
test_quiz_core_calendar_provide_event_action_already_completed_for_user() X-Ref |
No description |
create_action_event($courseid, $instanceid, $eventtype) X-Ref |
Creates an action event. param: int $courseid param: int $instanceid The quiz id. param: string $eventtype The event type. eg. QUIZ_EVENT_TYPE_OPEN. return: bool|calendar_event |
test_mod_quiz_completion_get_active_rule_descriptions() X-Ref |
Test the callback responsible for returning the completion rule descriptions. This function should work given either an instance of the module (cm_info), such as when checking the active rules, or if passed a stdClass of similar structure, such as when checking the the default completion settings for a mod type. |
test_creation_with_no_calendar_capabilities() X-Ref |
A user who does not have capabilities to add events to the calendar should be able to create a quiz. |