diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-09-28 15:56:31 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-09-28 15:56:31 +0200 |
| commit | 482c006782c8270801d82e82e113fa5fba6b774d (patch) | |
| tree | 7c538097100ea633258064c0b1088e08e1071c24 /src/utils-prod.js | |
| parent | 5267fd80deb6ab5cdfba117b4f20f75b9f91fcfd (diff) | |
| download | bycs-sol-482c006782c8270801d82e82e113fa5fba6b774d.tar.gz bycs-sol-482c006782c8270801d82e82e113fa5fba6b774d.zip | |
utils: move get*Id functions into utils-common.ts
Diffstat (limited to 'src/utils-prod.js')
| -rw-r--r-- | src/utils-prod.js | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/utils-prod.js b/src/utils-prod.js index 447a17a..3662c97 100644 --- a/src/utils-prod.js +++ b/src/utils-prod.js @@ -3,7 +3,9 @@ export { DATETIME_FMT, dateStringNow, datetimeStringNow, + getCourseId, getUserIconUrl, + getUserId, splitmix32, } from "./utils-common.ts"; @@ -31,16 +33,6 @@ export function getName() { .textContent; } -export function getUserId() { - // M is exported by Moodle - return String(M.cfg.userId); -} - -export function getCourseId() { - // M is exported by Moodle - return String(M.cfg.courseId); -} - export async function getActivityUrl(name) { const courseUrl = `https://lernplattform.bycs.de/course/view.php?id=${getCourseId()}`; const courseRes = await fetch(courseUrl); |
