From ec3c9fc1082678616985a86cd59fc2fedc780ed9 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 28 May 2026 22:24:21 +0200 Subject: cockpit: fix name retrieval for students with icons --- cockpit/js/student-common.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cockpit/js') diff --git a/cockpit/js/student-common.js b/cockpit/js/student-common.js index 3938380..991876d 100644 --- a/cockpit/js/student-common.js +++ b/cockpit/js/student-common.js @@ -35,7 +35,12 @@ async function fetchStudents(nameFilter, groupFilter) { } const nameCell = row.querySelector(".c1"); - const name = nameCell.firstChild.firstChild.title; + let name; + if (nameCell.firstChild.firstChild.tagName == "SPAN") + name = nameCell.firstChild.firstChild.title; + else + name = nameCell.innerText; + const profileUrl = nameCell.querySelector("a.aabtn").href; const match = idRegex.exec(profileUrl); const id = match[1]; -- cgit v1.2.3