From 451289788c6b5cc5cf9e53f5815da31797a1e221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?manu=20=E2=80=A2=E2=80=A2?= Date: Fri, 13 Sep 2024 14:28:24 +0200 Subject: [PATCH 1/2] SAK-50505 Sakai Grader: Do not filter out empty groups --- .../packages/sakai-grader/src/sakai-grader-rendering-mixin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-grader-rendering-mixin.js b/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-grader-rendering-mixin.js index 9f22ff2e8cef..e1e1f6507740 100644 --- a/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-grader-rendering-mixin.js +++ b/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-grader-rendering-mixin.js @@ -53,7 +53,7 @@ export const graderRenderingMixin = Base => class extends Base { ${this.groups ? html`
${this.i18n.group_label}
- group.users && group.users.length > 0)} @groups-selected=${this._groupsSelected} group-ref=${ifDefined(this.selectedGroup)}> From cfe06e44c8145062d6d4830b6cc00544ca09a8d0 Mon Sep 17 00:00:00 2001 From: Adrian Fish Date: Wed, 9 Oct 2024 11:58:46 +0100 Subject: [PATCH 2/2] Moved empty group filter to the data mixin --- .../packages/sakai-grader/src/sakai-gradable-data-mixin.js | 2 +- .../packages/sakai-grader/src/sakai-grader-rendering-mixin.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-gradable-data-mixin.js b/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-gradable-data-mixin.js index d38ee3b01690..10f235d6b8b1 100644 --- a/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-gradable-data-mixin.js +++ b/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-gradable-data-mixin.js @@ -36,7 +36,7 @@ export const gradableDataMixin = Base => class extends Base { this.anonymousGrading = gradableData.gradable.anonymousGrading; this.closeTime = gradableData.gradable.closeTimeString; this.ltiGradableLaunch = gradableData.gradable.ltiGradableLaunch; - this.groups = gradableData.groups; + this.groups = gradableData.groups.filter(g => g.users?.length); this._totalSubmissions = gradableData.totalSubmissions; this._totalGraded = 0; diff --git a/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-grader-rendering-mixin.js b/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-grader-rendering-mixin.js index e1e1f6507740..299d77e38fb2 100644 --- a/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-grader-rendering-mixin.js +++ b/webcomponents/tool/src/main/frontend/packages/sakai-grader/src/sakai-grader-rendering-mixin.js @@ -4,7 +4,7 @@ import { ifDefined } from "lit/directives/if-defined.js"; import "../sakai-grader-file-picker.js"; import { Submission } from "./submission.js"; import "@sakai-ui/sakai-date-picker"; -import "@sakai-ui/sakai-group-picker"; +import "@sakai-ui/sakai-group-picker/sakai-group-picker.js"; import "@sakai-ui/sakai-document-viewer/sakai-document-viewer.js"; import "@sakai-ui/sakai-lti-iframe/sakai-lti-iframe.js"; import "@sakai-ui/sakai-user-photo"; @@ -53,7 +53,7 @@ export const graderRenderingMixin = Base => class extends Base { ${this.groups ? html`
${this.i18n.group_label}
- group.users && group.users.length > 0)} +