Merge branch 'MDL-87341_501' of https://github.com/TomoTsuyuki/moodle into MOODLE_501_STABLE

This commit is contained in:
Jun Pataleta
2025-12-15 18:48:45 +08:00
3 changed files with 7 additions and 4 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -408,8 +408,11 @@ function(
var pageItems = root.find(SELECTORS.PAGE_ITEM);
// We want to request all of the strings at once rather than
// one at a time.
var stringRequests = pageItems.toArray().map(function(index, page) {
var stringRequests = pageItems.toArray().map(function(page) {
page = $(page);
if (page.attr('data-page') == undefined) {
return {};
}
var pageNumber = getPageNumber(root, page);
if (pageNumber === activePageNumber) {
@@ -425,7 +428,7 @@ function(
param: pageNumber
};
}
});
}).filter(Boolean);
Str.get_strings(stringRequests).then(function(strings) {
pageItems.each(function(index, page) {