Merge branch 'MDL-77712-master' of https://github.com/laurentdavid/moodle

This commit is contained in:
Paul Holden 2023-04-04 12:06:41 +01:00
commit 7b041826b5
No known key found for this signature in database
GPG key ID: A81A96D6045F6164
3 changed files with 4 additions and 3 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

@ -84,6 +84,7 @@ define(
TOGGLE: '.toggle-display,.dropdown-toggle',
SECTIONLI: 'li.section',
SECTIONACTIONMENU: '.section_action_menu',
SECTIONITEM: '[data-for="section_title"]',
ADDSECTIONS: '.changenumsections [data-add-sections]',
SECTIONBADGES: '[data-region="sectionbadges"]',
};
@ -992,7 +993,7 @@ define(
// The section and activity names are edited using inplace editable.
// The "update" jQuery event must be captured in order to update the course state.
$('body').on('updated', `${SELECTOR.SECTIONLI} [data-inplaceeditable]`, function(e) {
$('body').on('updated', `${SELECTOR.SECTIONLI} ${SELECTOR.SECTIONITEM} [data-inplaceeditable]`, function(e) {
if (e.ajaxreturn && e.ajaxreturn.itemid) {
const state = courseeditor.state;
const section = state.section.get(e.ajaxreturn.itemid);