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

When a question is added or removed from a quiz, we must remove all cached stats immediately

XMLWordPrintable

      As reported by François Lizotte here: https://moodle.org/mod/forum/discuss.php?d=450118

      1. Create a quiz with two true-false questions.
      2. Log in as a student.
      3. Attempt the quiz.
      4. Log in as teacher.
      5. View the quiz statistics (to compute and cache the stats).
      6. Delete the student's attempt.
      7. Go to the Quiz -> Questions page, and remove one of the questions.
      8. View the quiz statistics again.

      Expected results: the report says there is no data to display now.

      Acutal result: fatal error, because it tries to display the cached stats, which refers to slot 2, and the quiz now only contains one slot, and the code is not robust to this.

        1. error.png
          error.png
          81 kB
        2. MDL-79807_integration_401.png
          MDL-79807_integration_401.png
          120 kB
        3. MDL-79807_integration_402.png
          MDL-79807_integration_402.png
          120 kB
        4. MDL-79807_integration_403.png
          MDL-79807_integration_403.png
          121 kB
        5. MDL-79807_integration_master.png
          MDL-79807_integration_master.png
          124 kB

            marxjohnson Mark Johnson
            timhunt Tim Hunt
            Marcus Green Marcus Green
            Tim Hunt Tim Hunt
            Meirza Meirza
            Votes:
            2 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 15 minutes
                2h 15m

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