aboutsummaryrefslogtreecommitdiff
path: root/src/student-common.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/student-common.ts')
-rw-r--r--src/student-common.ts12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/student-common.ts b/src/student-common.ts
index a76a816..56dab43 100644
--- a/src/student-common.ts
+++ b/src/student-common.ts
@@ -5,23 +5,16 @@ import type { Graduation } from "./graduation-common.ts";
export class Student {
id: number;
name: string;
- group: string;
graduation: Graduation | null = null;
- constructor(id: number, name: string, group: string) {
+ constructor(id: number, name: string) {
this.id = id;
this.name = name;
- this.group = group;
- }
-
- getGroup() {
- return this.group;
}
/**
static async fetchById(id: number) {
let name = "";
- let group = "";
const res = await fetch(`/user/view.php?id=${id}&course=${getCourseId()}`);
const doc = new DOMParser().parseFromString(await res.text(), "text/html");
@@ -32,11 +25,10 @@ export class Student {
for (const card of cards) {
if (card.querySelector("dt")!.textContent !== "Gruppe")
continue;
- group = card.querySelector("dd > a")!.textContent;
break;
}
- return new Student(id, name, group);
+ return new Student(id, name);
}
*/
}