From af8585faa1aa7c39564c583963349c4a2922df9c Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 24 Jun 2026 09:18:26 +0200 Subject: cockpit: finish prototype UI * remove process and calendar * add observation period * improve mocking --- js/student-common.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js/student-common.js') diff --git a/js/student-common.js b/js/student-common.js index 48f7d60..f0d8ed3 100644 --- a/js/student-common.js +++ b/js/student-common.js @@ -1,8 +1,11 @@ import { getUserIconUrl, getCourseParticipantsUrl } from "./config.js"; +import { fetchGraduation } from "./graduation-common.js"; /** * Class to represent Students. */ class Student { + graduation = null; + constructor(id, name, groups) { this.id = id; this.name = name; @@ -23,6 +26,14 @@ class Student { } return this.groups.filter((g) => g !== this.getGroupName()); } + + async getGraduation() { + if(!this.graduation) { + // fetchGraduation(this) sets this.graduation + await fetchGraduation(this); + } + return this.graduation; + } } async function fetchStudent(idFilter, nameFilter, groupFilter) { -- cgit v1.2.3