From e455c5bdb83c98cfbc4e2f3b514f6a14ffd14c84 Mon Sep 17 00:00:00 2001 From: Laurent David Date: Wed, 13 Sep 2023 11:16:09 +0200 Subject: [PATCH] MDL-79194 core_course: Refresh modules menus with section changes * Whenever a section is hidden, we need to refresh all contextual (hamburger) menus of each course modules. --- course/format/amd/src/local/content.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/course/format/amd/src/local/content.js b/course/format/amd/src/local/content.js index 55a7992fc37..eb0f5e284ec 100644 --- a/course/format/amd/src/local/content.js +++ b/course/format/amd/src/local/content.js @@ -235,6 +235,8 @@ export default class Component extends BaseComponent { {watch: `transaction:start`, handler: this._startProcessing}, {watch: `course.sectionlist:updated`, handler: this._refreshCourseSectionlist}, {watch: `section.cmlist:updated`, handler: this._refreshSectionCmlist}, + // Section visibility. + {watch: `section.visible:updated`, handler: this._reloadSection}, // Reindex sections and cms. {watch: `state:updated`, handler: this._indexContents}, ];