Merge branch 'mdl-82784_main_wip' of https://github.com/james-cnz/moodle

This commit is contained in:
Sara Arjona 2024-09-19 16:07:38 +02:00
commit 2236a2f449
No known key found for this signature in database
3 changed files with 8 additions and 6 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

@ -778,10 +778,12 @@ export default class extends BaseComponent {
}
});
const courseAddSection = this.getElement(this.selectors.COURSEADDSECTION);
const addSection = courseAddSection.querySelector(this.selectors.ADDSECTION);
addSection.classList.toggle(this.classes.DISPLAYNONE, locked);
const noMoreSections = courseAddSection.querySelector(this.selectors.MAXSECTIONSWARNING);
noMoreSections.classList.toggle(this.classes.DISPLAYNONE, !locked);
if (courseAddSection) {
const addSection = courseAddSection.querySelector(this.selectors.ADDSECTION);
addSection.classList.toggle(this.classes.DISPLAYNONE, locked);
const noMoreSections = courseAddSection.querySelector(this.selectors.MAXSECTIONSWARNING);
noMoreSections.classList.toggle(this.classes.DISPLAYNONE, !locked);
}
}
/**