From 369fbaa84bdb86d91752c53824bb3b13c45b483f Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 19 Jul 2026 11:55:51 +0200 Subject: misc commit Included changes: * Cache the fetched students * Add level icons * Improve mass-graduation interface * Move utility functions from config.js to utils-ENV.js --- js/config.js | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'js/config.js') diff --git a/js/config.js b/js/config.js index 5fc456c..e69de29 100644 --- a/js/config.js +++ b/js/config.js @@ -1,29 +0,0 @@ -const courseId = 2466361; -function getCourseId() { - return courseId; -} - -// TODO(muhq): retrieve when loading activities/DBs -const cockpidId = 93017047; -function getCockpitId() { - return cockpidId; -} - -function getCourseParticipantsUrl() { - return `https://lernplattform.bycs.de/user/index.php?id=${courseId}`; -} - -async function getUserIconUrl(userId) { - console.assert(userId, "getUserIconUrl needs a userId"); - const userRes = await fetch(`https://lernplattform.bycs.de/user/profile.php?id=${userId}`) - const userDoc = new DOMParser().parseFromString(await userRes.text(), 'text/html') - const userpicture = userDoc.querySelector(".userpicture"); - return userpicture ? userpicture.src : ""; -} - -export { - getCourseId, - getCockpitId, - getUserIconUrl, - getCourseParticipantsUrl -}; -- cgit v1.2.3