aboutsummaryrefslogtreecommitdiff
path: root/Info/9/3
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2026-05-15 18:21:09 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2026-05-15 18:21:09 +0200
commit650f0c19a28ff5a632639a384b2b950485904dc0 (patch)
tree9790269b583dd28ffd0ccb2631ead23f0f16cc73 /Info/9/3
parentb5eb6b24510b93e868c76dfde0430f028ee23d4f (diff)
downloadunterricht-650f0c19a28ff5a632639a384b2b950485904dc0.tar.gz
unterricht-650f0c19a28ff5a632639a384b2b950485904dc0.zip
planet: auto detect the course's logins activity
Use moodle's link to activity filter to get a link to the correct online-ide login activity without specifying the course specific id.
Diffstat (limited to 'Info/9/3')
-rw-r--r--Info/9/3/Planet/modellierung/landung/online-ide.md20
1 files changed, 13 insertions, 7 deletions
diff --git a/Info/9/3/Planet/modellierung/landung/online-ide.md b/Info/9/3/Planet/modellierung/landung/online-ide.md
index e94e77fa..f1988231 100644
--- a/Info/9/3/Planet/modellierung/landung/online-ide.md
+++ b/Info/9/3/Planet/modellierung/landung/online-ide.md
@@ -18,13 +18,15 @@ include-after: |
// Get the user's firstname via the moodle generico filter
const firstname = "{firstname}";
const lastname = "{lastname}";
-
- const resource = 90441121;
- // Moodle some insists in wrapping urls in <a> tags breaking the JS code.
- // We use a base64 encoding for the url: https://lernplattform.bycs.de/mod/resource/view.php?id=
- const resourceUrl = "aHR0cHM6Ly9sZXJucGxhdHRmb3JtLmJ5Y3MuZGUvbW9kL3Jlc291cmNlL3ZpZXcucGhwP2lkPQo=";
- const url = window.atob(resourceUrl) + resource;
-
+
+ // Get a link to this course's online-ide logins activity
+ const activityAutoLinkDiv = document.getElementById("hint-autolink");
+ const activityLinkNode = activityAutoLinkDiv.children[0].children[0];
+ // Remember the autolink target
+ const url = activityLinkNode.href;
+ // Remove the dummy autolink
+ activityLinkNode.remove();
+
fetchJson(url).then((logins) => {
if (logins) {
for (const user of logins) {
@@ -39,6 +41,10 @@ include-after: |
</script>
---
+:::{#hint-autolink}
+Online-IDE Logins
+:::
+
:::{.terminal}
### Online-IDE