Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-51409

Force statistics to be recalculated after removing data required by its cached results

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.8.8, 2.9.2, 3.2.5, 3.3.2, 3.4
    • Questions, Quiz
    • MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE

      This issue would complete MDL-51147 fix, which is working as expected, but there is a remaining case, if a user that just generated statistics removes a matching question question/answer pair, and returns to the statistics report in less than 15 minutes (\core_question\statistics\responses\analyser::TIME_TO_CACHE) the error attached below appears, because the cached data depends on a selected matching question question/answer that does not exist any more.

      Tim said it is not straight forward to fix, the error is temporary (15 mins) and it is not likely to happen regularly, so we can separate it from the original issue, although I am guessing that matching question data is not the only piece of information that cached statistics depends on.

      To reproduce:

      1. Create a quiz with a match question with 4 matches
      2. Attempt it as a student (I marked the same answer everywhere)
      3. Go to the quiz statistics report as a teacher/admin and select the only question you have
      4. Edit the question removing the option that the student marked (I haven't tried with other options than the one the student marked)
      5. Go to statistics again and select the same question
      6. I can see the following error:

        Notice: Undefined offset: 116 in /home/davidm/Desktop/moodlecode/int/master/question/classes/statistics/responses/analysis_for_question.php on line 131
         
        Fatal error: Call to a member function get_response_class() on a non-object in /home/davidm/Desktop/moodlecode/int/master/question/classes/statistics/responses/analyser.php on line 161
        

            Unassigned Unassigned
            dmonllao David Monllaó
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.