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

Migrate quiz statistics callbacks to Hooks API

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.4
    • 4.4
    • Quiz

      MDL-79254 introduced an event observer and MDL-79806  MDL-79807 introduced new class callbacks in mod_quiz/quiz_statistics. Now that we have the Hook API available, these can be replaced with Hooks.

      This will create 2 new hooks:

      \mod_quiz\hook\attempt_state_changed - This will be triggered when an attempt is created or deleted, and observed by quiz_statistics to trigger a recalculation.

      \mod_quiz\hook\structure_modified - This will directly replace the current quiz_structure_modified callback, and be observed by quiz_statistics to trigger a purge of the statistics cache.

            marxjohnson Mark Johnson
            marxjohnson Mark Johnson
            Tim Hunt Tim Hunt
            Ilya Tregubov Ilya Tregubov
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 minutes
                1d 2m

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