See Release Notes
Long Term Support Release
Differences Between: [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]
(no description)
File Size: | 569 lines (28 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
helper_test:: (13 methods):
test_get_all_places_where_questions_were_attempted()
prepare_quizzes()
submit_quiz()
generate_attempt_answers()
prepare_and_submit_quizzes()
extract_item_value()
load_quiz_statistics_for_place()
load_question_facility_provider()
test_load_question_facility()
load_question_discriminative_efficiency_provider()
test_load_question_discriminative_efficiency()
load_question_discrimination_index_provider()
test_load_question_discrimination_index()
Class: helper_test - X-Ref
Tests for question statistics.test_get_all_places_where_questions_were_attempted() X-Ref |
Test quizzes that contain a specified question. |
prepare_quizzes() X-Ref |
Create 2 quizzes. return: array return 2 quizzes |
submit_quiz(object $quiz, array $answers) X-Ref |
Submit quiz answers param: object $quiz param: array $answers |
generate_attempt_answers(array $correctanswerflags) X-Ref |
Generate attempt answers. param: array $correctanswerflags array of 1 or 0 return: array |
prepare_and_submit_quizzes(array $quiz1attempts, array $quiz2attempts) X-Ref |
Generate quizzes and submit answers. param: array $quiz1attempts quiz 1 attempts param: array $quiz2attempts quiz 2 attempts return: array |
extract_item_value(all_calculated_for_qubaid_condition $statistics,int $questionid, string $item) X-Ref |
To use private helper::extract_item_value function. param: all_calculated_for_qubaid_condition $statistics the batch of statistics. param: int $questionid a question id. param: string $item ane of the field names in all_calculated_for_qubaid_condition, e.g. 'facility'. return: float|null the required value. |
load_quiz_statistics_for_place(\context $context) X-Ref |
To use private helper::load_statistics_for_place function (with mod_quiz component). param: \context $context the context to load the statistics for. return: all_calculated_for_qubaid_condition|null question statistics. |
load_question_facility_provider() X-Ref |
Data provider for {@see test_load_question_facility()}. return: \Generator |
test_load_question_facility(array $quiz1attempts,array $expectedquiz1facilities,array $quiz2attempts,array $expectedquiz2facilities,array $expectedaveragefacilities) X-Ref |
Test question facility param: array $quiz1attempts quiz 1 attempts param: array $expectedquiz1facilities expected quiz 1 facilities param: array $quiz2attempts quiz 2 attempts param: array $expectedquiz2facilities expected quiz 2 facilities param: array $expectedaveragefacilities expected average facilities |
load_question_discriminative_efficiency_provider() X-Ref |
Data provider for {@see test_load_question_discriminative_efficiency()}. return: \Generator |
test_load_question_discriminative_efficiency(array $quiz1attempts,array $expectedquiz1discriminativeefficiency,array $quiz2attempts,array $expectedquiz2discriminativeefficiency,array $expectedaveragediscriminativeefficiency) X-Ref |
Test discriminative efficiency param: array $quiz1attempts quiz 1 attempts param: array $expectedquiz1discriminativeefficiency expected quiz 1 discriminative efficiency param: array $quiz2attempts quiz 2 attempts param: array $expectedquiz2discriminativeefficiency expected quiz 2 discriminative efficiency param: array $expectedaveragediscriminativeefficiency expected average discriminative efficiency |
load_question_discrimination_index_provider() X-Ref |
Data provider for {@see test_load_question_discrimination_index()}. return: \Generator |
test_load_question_discrimination_index(array $quiz1attempts,array $expectedquiz1discriminationindex,array $quiz2attempts,array $expectedquiz2discriminationindex,array $expectedaveragediscriminationindex) X-Ref |
Test discrimination index param: array $quiz1attempts quiz 1 attempts param: array $expectedquiz1discriminationindex expected quiz 1 discrimination index param: array $quiz2attempts quiz 2 attempts param: array $expectedquiz2discriminationindex expected quiz 2 discrimination index param: array $expectedaveragediscriminationindex expected average discrimination index |