From 95e8b31e7438adf68d0af9993088700513929dbb Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 13 Jun 2026 13:23:57 +0200 Subject: cockpit: only show real groups --- js/student-common.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'js') diff --git a/js/student-common.js b/js/student-common.js index 930c373..a238965 100644 --- a/js/student-common.js +++ b/js/student-common.js @@ -16,6 +16,13 @@ class Student { getGroupName() { return `g${this.id}${this.name.replace(' ', '')}`; } + + getRealGroups() { + if(typeof this.groups === "string") { + return [this.groups]; + } + return this.groups.filter((g) => g !== this.getGroupName()); + } } async function fetchStudent(idFilter, nameFilter, groupFilter) { -- cgit v1.2.3