Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAK-50505 SakaiGrader don't display empty groups in the group picker #12889

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

st-manu
Copy link
Contributor

@st-manu st-manu commented Sep 13, 2024

No description provided.

@ern ern changed the title SAK-50505 Sakai Grader: Do not filter out empty groups SAK-50505 SakaiGrader don't filter out empty groups Sep 16, 2024
@@ -53,7 +53,7 @@ export const graderRenderingMixin = Base => class extends Base {
${this.groups ? html`
<div class="grader-groups">
<div>${this.i18n.group_label}</div>
<sakai-group-picker .groups=${this.groups}
<sakai-group-picker .groups=${this.groups.filter(group => group.users && group.users.length > 0)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this doing the opposite of what the title of the PR says?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ern It could be, depending on how this is understood. For me, it's correct. The change proposes that the groups available in the group selector should only be those that have students (thereby filtering out the empty ones).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@st-manu I'd put your groups filter into the data mixin, where the groups data is set. Less logic in the templates is usually better.

@adrianfish adrianfish changed the title SAK-50505 SakaiGrader don't filter out empty groups SAK-50505 SakaiGrader don't display empty groups in the group picker Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants