diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-09-14 17:34:14 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-09-14 17:35:34 +0200 |
| commit | 9876d989b52528574861ef44409a5b680e542340 (patch) | |
| tree | 763f0517114edbee346bf49b4f4e640b99d2cc21 /src/student-prod.ts | |
| parent | d18d5f869d57d31c987b4b7fe0c7feae9aba8b2e (diff) | |
| download | bycs-sol-9876d989b52528574861ef44409a5b680e542340.tar.gz bycs-sol-9876d989b52528574861ef44409a5b680e542340.zip | |
remove groups
Diffstat (limited to 'src/student-prod.ts')
| -rw-r--r-- | src/student-prod.ts | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/student-prod.ts b/src/student-prod.ts index 5a1673e..90398c9 100644 --- a/src/student-prod.ts +++ b/src/student-prod.ts @@ -50,15 +50,12 @@ async function _fetchStudents() { } const id = match[1]; - const groupCell = row.querySelector(".c5")!; - const group = groupCell.querySelector<HTMLElement>("a.quickeditlink")!.textContent; - - fetchedStudents.push(new Student(Number(id), name, group)); + fetchedStudents.push(new Student(Number(id), name)); }); return fetchedStudents; } -async function fetchStudents(idFilter?: number, nameFilter?: string, groupFilter?: string) { +async function fetchStudents(idFilter?: number, nameFilter?: string) { if (students === null) { const studentsPromise = _fetchStudents(); const storedStudents = localStorage.getItem("students"); @@ -66,7 +63,7 @@ async function fetchStudents(idFilter?: number, nameFilter?: string, groupFilter studentsPromise.then((fetched) => localStorage.setItem("students", JSON.stringify(fetched))); students = []; for (const o of JSON.parse(storedStudents)) { - students.push(new Student(o.id, o.name, o.group)); + students.push(new Student(o.id, o.name)); } } else { students = await studentsPromise; @@ -77,13 +74,12 @@ async function fetchStudents(idFilter?: number, nameFilter?: string, groupFilter return students.filter( (s) => (typeof idFilter === "undefined" || s.id === idFilter) && - (typeof nameFilter === "undefined" || s.name.includes(nameFilter)) && - (typeof groupFilter === "undefined" || s.group.includes(groupFilter)), + (typeof nameFilter === "undefined" || s.name.includes(nameFilter)) ); } -async function fetchStudent(idFilter?: number, nameFilter?: string, groupFilter?: string) { - const students = await fetchStudents(idFilter, nameFilter, groupFilter); +async function fetchStudent(idFilter?: number, nameFilter?: string) { + const students = await fetchStudents(idFilter, nameFilter); return students[0]; } |
