MOBILE-3833 data: Hide All participants with visible groups
parent
604e866943
commit
9c2116c33b
|
@ -218,6 +218,12 @@ export class AddonModDataIndexComponent extends CoreCourseModuleMainActivityComp
|
|||
}
|
||||
|
||||
this.groupInfo = await CoreGroups.getActivityGroupInfo(this.database.coursemodule);
|
||||
if (this.groupInfo.visibleGroups && this.groupInfo.groups?.length) {
|
||||
// There is a bug in Moodle with All participants and visible groups (MOBILE-3597). Remove it.
|
||||
this.groupInfo.groups = this.groupInfo.groups.filter(group => group.id !== 0);
|
||||
this.groupInfo.defaultGroupId = this.groupInfo.groups[0].id;
|
||||
}
|
||||
|
||||
this.selectedGroup = CoreGroups.validateGroupId(this.selectedGroup, this.groupInfo);
|
||||
|
||||
this.access = await AddonModData.getDatabaseAccessInformation(this.database.id, {
|
||||
|
|
|
@ -174,6 +174,12 @@ export class AddonModDataEditPage implements OnInit {
|
|||
|
||||
if (refresh) {
|
||||
this.groupInfo = await CoreGroups.getActivityGroupInfo(this.database.coursemodule);
|
||||
if (this.groupInfo.visibleGroups && this.groupInfo.groups?.length) {
|
||||
// There is a bug in Moodle with All participants and visible groups (MOBILE-3597). Remove it.
|
||||
this.groupInfo.groups = this.groupInfo.groups.filter(group => group.id !== 0);
|
||||
this.groupInfo.defaultGroupId = this.groupInfo.groups[0].id;
|
||||
}
|
||||
|
||||
this.selectedGroup = CoreGroups.validateGroupId(this.selectedGroup, this.groupInfo);
|
||||
this.initialSelectedGroup = this.selectedGroup;
|
||||
}
|
||||
|
|
|
@ -174,6 +174,12 @@ export class AddonModDataEntryPage implements OnInit, OnDestroy {
|
|||
this.access = await AddonModData.getDatabaseAccessInformation(this.database.id, { cmId: this.moduleId });
|
||||
|
||||
this.groupInfo = await CoreGroups.getActivityGroupInfo(this.database.coursemodule);
|
||||
if (this.groupInfo.visibleGroups && this.groupInfo.groups?.length) {
|
||||
// There is a bug in Moodle with All participants and visible groups (MOBILE-3597). Remove it.
|
||||
this.groupInfo.groups = this.groupInfo.groups.filter(group => group.id !== 0);
|
||||
this.groupInfo.defaultGroupId = this.groupInfo.groups[0].id;
|
||||
}
|
||||
|
||||
this.selectedGroup = CoreGroups.validateGroupId(this.selectedGroup, this.groupInfo);
|
||||
|
||||
const actions = AddonModDataHelper.getActions(this.database, this.access, this.entry!);
|
||||
|
|
Loading…
Reference in New Issue