mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-78095 course: Respect is_bulk_editable()
This commit is contained in:
parent
f30110b5eb
commit
02037c5f2c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user