diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-05-28 22:24:21 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-05-28 22:24:21 +0200 |
| commit | ec3c9fc1082678616985a86cd59fc2fedc780ed9 (patch) | |
| tree | c9bebbc7ceaa169deb2e1f51f404ac0cf57f6e49 /cockpit | |
| parent | 83238bd1d7c55a87ae2169f9e97411774c41b270 (diff) | |
| download | bycs-sol-ec3c9fc1082678616985a86cd59fc2fedc780ed9.tar.gz bycs-sol-ec3c9fc1082678616985a86cd59fc2fedc780ed9.zip | |
cockpit: fix name retrieval for students with icons
Diffstat (limited to 'cockpit')
| -rw-r--r-- | cockpit/js/student-common.js | 7 |
1 files changed, 6 insertions, 1 deletions
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]; |
