From 09a0b5bd95bea76537c7de3525093ecc5a0abd7c Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 19 Jul 2026 11:55:51 +0200 Subject: cockpit: add level icon to student info view --- cockpit/js/cockpit.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cockpit/js') diff --git a/cockpit/js/cockpit.js b/cockpit/js/cockpit.js index 0d989da..fb3b539 100644 --- a/cockpit/js/cockpit.js +++ b/cockpit/js/cockpit.js @@ -144,7 +144,7 @@ function updateStudentInfo() { () => pointClickHandler("red")); } - renderGraduationLevel(student.graduation, document.getElementById("student-info-level")); + renderGraduationLevel(student.graduation); // renderGraduationStickers(student.graduation, document.getElementById("student-info-stickers")); // renderGraduationBonus(student.graduation, document.getElementById("student-info-stickers")); @@ -155,8 +155,11 @@ function updateStudentInfo() { document.getElementById("student-content").style.display = "block"; } -function renderGraduationLevel(graduation, node) { - node.innerHTML = graduation.getLevelName(); +function renderGraduationLevel(graduation) { + const label = document.getElementById("student-info-level"); + label.innerHTML = graduation.getLevelName(); + const icon = document.getElementById("student-level-icon"); + icon.src = graduation.getIcon(); } // function renderGraduationStickers(graduation, node) { -- cgit v1.2.3