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

\core\hook\backup\get_excluded_events() hook naming and location wrong

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 4.4
    • 4.4
    • Backup

      \core\hook\backup\get_excluded_events():

      • wrong namespace - it should be \core_backup\hook located in backup\util\ui\classes
      • wrong naming
      • poor naming for add_events because we are excluding events
      • use of an array of strings rather than a varidic

      IN addition I discovered a bug whereby the creation of this hook has lead to an event bleed between iterations of the hook beacuse the $params are modified between array iterations. As a result, if multiple readers are enabled, with the legacy logstore being last, the legacy logstore will also ignore the event when it should not do so.

      Changes proposed:

      • move to correct namespace
      • rename to before_course_modified_check
      • rename get_excluded_events::add_events(string[] $events) to before_course_modified_check::exclude_events(string ...$events)
      • fix the $params bleed.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Paul Holden Paul Holden
            Jun Pataleta Jun Pataleta
            Jun Pataleta Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            7 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, 1 minute
                2h 1m

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