Projekt

Allgemein

Profil

Fehler #1206

error Intro files Zusammenfassung link to Ausblick

Von Birte Reich vor etwa 2 Monaten hinzugefügt. Vor etwa 5 Stunden aktualisiert.

Status:
Neu
Priorität:
Normal
Zugewiesen an:
Beginn:
07.05.2025
Abgabedatum:
% erledigt:

0%

Geschätzter Aufwand:

Dateien

logic.js (122 KB) logic.js Avishan Sharafi, 24.05.2025 15:52
modstart.html (3,94 KB) modstart.html Avishan Sharafi, 24.05.2025 15:52
logic.js (2,83 KB) logic.js Avishan Sharafi, 17.06.2025 10:32
learning_analytics.js (18,1 KB) learning_analytics.js Avishan Sharafi, 26.06.2025 17:13

Historie

#1

Von Birte Reich vor etwa 2 Monaten aktualisiert

In all of the Intro files there is a part in the end where it is supposed to have a link called Zusammenfassung and if you click on it, there should be a direct link to the chapter Ausblick. But Ausblick doesn't work.
There are other links in the Intro files which are working, just Zusammenfassung -> Ausblick not
Maybe it is a problem because they are not called the same (then replace Zusammenfassung with Ausblick so it is called the same).
Maybe it is just a typo.

#2

Von Birte Reich vor etwa 2 Monaten aktualisiert

Example:
4_kv_termegleichungen.tex
Here in the end there is for example a link to Quadratische Gleichungen.

Allerdings erhält man hier eine quadratische Gleichung, die immer noch einen Term mit t2, einen Term mit t und einen ohne die Variable t enthält, sodass man sie allein durch Äquivalenzumformungen nicht nach t auflösen kann. Man benötigt also eine Strategie, um Quadratische Gleichungen zu lösen.

With clicking on Quadratische Gleichungen, you should see the chapter about it in Moodle and in the file you should be able to see how it is made.

This is the part where it doesn't work.
Was Sie in der ausführlichen Lerneinheit dieses Wissensbereichs erwartet, können Sie im Ausblick nachlesen: Zusammenfassung

Clicking on Zusammenfassung should lead you to the chapter Ausblick.

#3

Von Birte Reich vor etwa 1 Monat aktualisiert

fo example here (at the bottom of the page) but it is in all Intro files: https://moodle.math.uni-paderborn.de/course/view.php?id=15

#4

Von Birte Reich vor etwa 1 Monat aktualisiert

If that doesn't work, we can try it together.
For testing you need to compile the Intros: python3 tex2x.py studifinder and upload them in moodle.
Use one of the intern courses -> more -> course reuse -> restore -> upload one of the zip output files you created with compiling.

#5

Von Avishan Sharafi vor etwa 1 Monat aktualisiert

Currently you need to add these 2 files
C:\Users\avish\Desktop\Birte\studifinder\input\files-studifinder
modstart has this path

C:\Users\avish\Desktop\Birte\studifinder\input\files-studifinder\js
path for lojic.js

#6

Von Avishan Sharafi vor etwa 1 Monat aktualisiert

I was unable to compile tex2x.py using Python 3 on my system because my current Python version is Python 13, while the Moodle codebase was originally developed to be compatible with Python 11.

I attempted to install Python 11 separately, but encountered some issues with the system paths. However, there’s no need to worry — the two code files mentioned above have been tested and are working correctly. The full code should run smoothly within the Moodle environment, since its core already uses Python 11

#7

Von Avishan Sharafi vor etwa 1 Monat aktualisiert

Modified Files : modestart.html and logic.js
They are on the path: input\files-studifinder

Problem 1 : In the HTML file, the old code prevents scrolling/navigation :

Old code:if (window.location.href.indexOf("modstart.html") > -1) return false;

Solution 1 : I changed it to: if (false) return false;

Problem 2 :There’s no element with id="ausblick" in the entire modstart.html. This code prints Ausblick, but it doesn't have an anchor.

old code: <div id="score">
Ausblick
</div>

Solution 2 : I changed it to: <div id="score" name="ausblick">

#8

Von Birte Reich vor 14 Tagen aktualisiert

https://moodle.math.uni-paderborn.de/course/view.php?id=10
There for example Zusammenfassung does not work but Dezimalschreibweise right above does. We can rename Zusammenfassung in Ausblick if that makes it easier.

#9

Von Birte Reich vor 14 Tagen aktualisiert

#10

Von Avishan Sharafi vor 10 Tagen aktualisiert

code that was added :
This code was added in line 83 of logic.js .Updated logic.js is attached to this

// Scroll to Ausblick when the "Zusammenfassung" button is clicked
$(document).on("click", "button:contains('Zusammenfassung')", function () {
const target = document.getElementById("ausblick");
if (target) {
target.scrollIntoView({ behavior: "smooth" });
}
});
#11

Von Avishan Sharafi vor 10 Tagen aktualisiert

Problem
The "Zusammenfassung" button and the "Ausblick" section are not connected.
The #ausblick anchor target exists in modstart.html, but no scroll or navigation logic was attached to the button labeled "Zusammenfassung".

Additionally, this button is inserted dynamically via JavaScript, which means static event listeners (like window.onload) do not detect it.As a result, clicking the button updates the UI but fails to bring the user to the expected section of the page.

solution
I implemented a JavaScript fix using event delegation, which listens for any click on a dynamically added button labeled "Zusammenfassung" and scrolls the page to the #ausblick section when triggered.By adding this code to line 83 inside
$(document).ready(function()....

#12

Von Avishan Sharafi vor etwa 21 Stunden aktualisiert

// link Ausblick
// var linksausblick = document.getElementsByClassName('bottom_link_score');
// for (let elmt of linksausblick) {
// elmt.addEventListener('click', function() {
// var linknr = get_linknr_kv(elmt, 'bottom_link_score');
// logger('click', "Link Ausblick" + linknr);
// }, false)
// };

// link Ausblick Avishan made changes here.
var linksausblick = document.getElementsByClassName('bottom_link_score');
for (let elmt of linksausblick) {
elmt.addEventListener('click', function() {
var linknr = get_linknr_kv(elmt, 'bottom_link_score');
logger('click', "Link Ausblick" + linknr);

// ✅ Redirect to Ausblick tab
window.location.href = "https://moodle.math.uni-paderborn.de/course/view.php?id=7&section=4#tabs-tree-start";
}, false);
}

The commented parties are the original part in the code that is not properly linked to Ausblick page.
Learning_analytics.js is attached to this ticket.
The output folder zip is uploaded in scibo
https://uni-paderborn.sciebo.de/apps/files/files/868690596?dir=/Avishan/Zussemfassung
A added the link part in the code.

#13

Von Birte Reich vor etwa 5 Stunden aktualisiert

python tex2x.py studifinder -> Intro

Auch abrufbar als: Atom PDF