Merge branch 'mdl-78095-master' of https://github.com/james-cnz/moodle

This commit is contained in:
Sara Arjona 2024-02-07 17:50:31 +01:00 committed by Andrew Nicols
commit 7179bd713a
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14
3 changed files with 12 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

@ -125,12 +125,12 @@ class BulkSelector {
}
return this._getContentCheckboxes(bulk.selectedType).every(bulkSelect => {
if (bulkSelect.disabled) {
return false;
return true;
}
// Section zero is never selectale for bulk actions.
// Some sections may not be selectale for bulk actions.
if (bulk.selectedType == 'section') {
const section = this.courseEditor.get('section', bulkSelect.dataset.id);
if (section.number == 0) {
if (!section.bulkeditable) {
return true;
}
}
@ -227,6 +227,12 @@ class BulkSelector {
if (bulkSelect.disabled) {
return true;
}
if (elementType == 'section') {
const section = this.courseEditor.get('section', bulkSelect.dataset.id);
if (value && !section?.bulkeditable) {
return true;
}
}
if (bulkSelect.dataset.id == id || bulkSelect.dataset.id == lastSelectedId) {
found++;
}
@ -277,7 +283,7 @@ class BulkSelector {
}
if (elementType == 'section') {
const section = this.courseEditor.get('section', bulkSelect.dataset.id);
if (section?.number == 0) {
if (value && !section?.bulkeditable) {
return;
}
}