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.
This commit is contained in:
Laurent David 2023-09-13 11:16:09 +02:00
parent d76e211be6
commit bbd992dcb6
3 changed files with 4 additions and 2 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -238,6 +238,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},
];