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

Move uses of core_courseformat\base::session_cache_reset and core_courseformat\base::session_cache_reset_all to hooks

XMLWordPrintable

    • 3
    • HQ 2024 Sprint I4.2 Moppies

      The course editor uses a frontend cache to prevent unnecessary reloadings. However, if there is some chang in the course, the backend can call core_courseformat\base::session_cache_reset or core_courseformat\base::session_cache_reset_all to force reloading the frontend cache.

      When the cache was implemented, Moodle did not have a proper hooks implementation, and many of the session cache resets were introduced in all the places where the course is edited.

      This issue involves reviewing all places where the cache reset is triggered and relocating them to hooks. In many cases, the hooks already exist; in others, it presents an excellent opportunity to create useful new hooks.

      All listeners should be placed in course/format/classes/hook_listener.php created in MDL-83185.

            laurent.david@moodle.com Laurent David
            tusefomal Ferran Recio
            Ferran Recio Ferran Recio
            Amaia Anabitarte Amaia Anabitarte
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 6 hours, 55 minutes
                1d 6h 55m

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