-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.7, 4.1.2
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MDL-77626_401 -
Steps to reproduce:
- As teacher, in a test course.
- Create category in the quetion bank called 'Variants of Q1'.
- In that category, create 2 different true-false questions.
- Create a quiz.
- On the 'Questions' page where you build the quiz, Add a Random question, picking from the 'Variants of Q1'
- Then, add a second question to the quiz. This should be a new question, which can also be true-false.
- Now, you need to log in with a number of different student accounts.
- With each student, attempt the quiz, and answer all the questions. Try to get a mixture of right and wrong answers.
- You need to keep making quiz attempts with different students until for each of the two possible questions that can be selected randomly as Q1 of the quiz, two different students have seen each question.
- Then, log in again as teacher.
- Go to Quiz -> Results -> Statistics.
- Verify that the report displayes. For Q1, there should be a row saying something like '
Range of statistics for these questions' with some sensible numbers in the Standard deviation column. - Now go to the Quiz -> Questions page.
- Set the Mark for Q1 to 0.
- Go back to Quiz -> Results -> Statistics.
- (If necessary, click 'Recalculate'.)
Expected result: the resport displays without errors. Stats for Q1 will probably now display a lot of '-' or similar.
Actual result: Fatal error: Divide by Zero.
- line 118 of /question/classes/statistics/questions/calculated_question_summary.php: DivisionByZeroError thrown
- line 84 of /question/classes/statistics/questions/calculated_question_summary.php: call to core_question\\statistics\\questions
calculated_question_summary->get_min_max_of_sd() - line 342 of /mod/quiz/report/statistics/statistics_table.php: call to core_question\\statistics\\questions
calculated_question_summary->get_min_max_of() - line 832 of /lib/tablelib.php: call to quiz_statistics_table->col_sd()
- line 477 of /mod/quiz/report/statistics/report.php: call to flexible_table->format_row()
- line 275 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->output_quiz_structure_analysis_table()
- line 97 of /mod/quiz/report.php: call to quiz_statistics_report->display()
- is a regression caused by
-
MDL-63390 Usability improvements for statistics report
-
- Closed
-