aboutsummaryrefslogtreecommitdiff
path: root/cockpit/js
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2026-07-19 11:55:51 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2026-07-19 11:59:15 +0200
commit09a0b5bd95bea76537c7de3525093ecc5a0abd7c (patch)
treed7fa296e2046bacd01c7ab04ffeb9666d820d63f /cockpit/js
parentd9228fac4c9be3c6ab805fca8962c472b63a0741 (diff)
downloadbycs-sol-09a0b5bd95bea76537c7de3525093ecc5a0abd7c.tar.gz
bycs-sol-09a0b5bd95bea76537c7de3525093ecc5a0abd7c.zip
cockpit: add level icon to student info view
Diffstat (limited to 'cockpit/js')
-rw-r--r--cockpit/js/cockpit.js9
1 files changed, 6 insertions, 3 deletions
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) {