This commit is contained in:
Turtle committed 2025-12-31 14:47:01 +01:00
1 parent b4aa7bb628
commit 6d4cb4edbb
5 files changed
+19 -11

No files matched your search

+9 -3
View File
@@ -25,7 +25,7 @@ async function createTemp() {
], ],
"role": "professor", "role": "professor",
"courses": [ "courses": [
"weiche_ware" "weiche_ware", "algebra", "geometrie"
] ]
}, },
"narrator": { "narrator": {
@@ -47,7 +47,7 @@ async function createTemp() {
], ],
"role": "professor", "role": "professor",
"courses": [ "courses": [
"bucket" "bucket", "statistik"
] ]
} }
}); });
@@ -125,6 +125,12 @@ async function createTemp() {
} }
], ],
"start_date": "2025-12-23", "start_date": "2025-12-23",
"expire_date": "2025-02-20" "expire_date": "2026-02-20"
}); });
await couchDB.set("course:algebra", { "title": "Algebra", "description": "Grundlagen der algebraischen Konzepte.", "owner": "math-wizard", "questions": [ { "title": "Wie gut verstehen Sie die Grundlagen der Algebra?", "type": "text" }, { "title": "Bewerten Sie die Schwierigkeit algebraischer Aufgaben.", "type": "scala" } ], "result": [ ["Einfach, weil ...", 5], ["Schwierig, weil ...", 1] ], "result_history": [ { "date": "2025-12-28", "questions": [ { "title": "1", "type": "text" }, { "title": "2", "type": "scala" } ], "result": [ ["Einfach, weil ...", 5], ["Schwierig, weil ...", 1] ] } ], "start_date": "2025-12-26", "expire_date": "2025-02-25" });
await couchDB.set("course:geometrie", { "title": "Geometrie", "description": "Erforschung geometrischer Figuren und Konzepte.", "owner": "geo-genius", "questions": [ { "title": "Wie sicher sind Sie im Umgang mit geometrischen Formen?", "type": "text" }, { "title": "Bewerten Sie die Komplexität geometrischer Aufgaben.", "type": "scala" } ], "result": [ ["Einfach, weil ...", 5], ["Schwierig, weil ...", 1] ], "result_history": [ { "date": "2025-12-29", "questions": [ { "title": "1", "type": "text" }, { "title": "2", "type": "scala" } ], "result": [ ["Einfach, weil ...", 5], ["Schwierig, weil ...", 1] ] } ], "start_date": "2025-12-24", "expire_date": "2025-03-15" });
await couchDB.set("course:statistik", { "title": "Statistik", "description": "Grundlagen der statistischen Analyse und Interpretation.", "owner": "data-analyst", "questions": [ { "title": "Wie gut verstehen Sie statistische Methoden?", "type": "text" }, { "title": "Bewerten Sie die Schwierigkeit statistischer Analysen.", "type": "scala" } ], "result": [ ["Einfach, weil ...", 5], ["Schwierig, weil ...", 1] ], "result_history": [ { "date": "2025-12-30", "questions": [ { "title": "1", "type": "text" }, { "title": "2", "type": "scala" } ], "result": [ ["Einfach, weil ...", 5], ["Schwierig, weil ...", 1] ] } ], "start_date": "2025-12-25", "expire_date": "2025-04-10" });
} }
+1
View File
@@ -134,6 +134,7 @@ overlay {
align-items: center; align-items: center;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
z-index: 1;
} }
.header_bar_1 > div { .header_bar_1 > div {
display: table-cell; display: table-cell;
+2 -1
View File
@@ -103,7 +103,8 @@ function _main_events() {
}); });
} }
} }
_main_events();
setTimeout(_main_events, 0);
/* ----------- couch db ----------- */ /* ----------- couch db ----------- */
+4 -5
View File
@@ -45,14 +45,14 @@ setUserData(couchDB);
<script> <script>
const params = new URLSearchParams(window.location.search); const params = getURLArgsMap();
const courseId = params.get("course"); const courseId = params["course"];
if (!courseId) { if (!courseId) {
console.error("Keine courseId in der URL"); console.error("Keine courseId in der URL");
} }
const qrCodeUrl = `${window.location.origin}/student/umfrage?course=${courseId}`; const qrCodeUrl = `${window.location.origin}/student/umfrage.html?course=${courseId}`;
new QRCode(document.getElementById("qrCode"), { new QRCode(document.getElementById("qrCode"), {
text: qrCodeUrl, text: qrCodeUrl,
@@ -64,13 +64,12 @@ setUserData(couchDB);
accesCodeElem.innerText = "Code: " + courseId; accesCodeElem.innerText = "Code: " + courseId;
async function AnsichtZeigen() { async function AnsichtZeigen() {
const liveButton = document.getElementById("liveButton") const liveButton = document.getElementById("liveButton")
liveButton.style.display = "none"; liveButton.style.display = "none";
const questionList = document.getElementById("questionCards"); const questionList = document.getElementById("questionCards");
const courseInfo = await couchDB.get("course:" + courseId) const courseInfo = await couchDB.get("course:" + courseId);
let index = 0; let index = 0;
for(const question of courseInfo.questions) { for(const question of courseInfo.questions) {
const overlayId = `qOver${index}` const overlayId = `qOver${index}`
+3 -2
View File
@@ -95,7 +95,7 @@ button.auswertung:hover {
.course-card { .course-card {
position: relative; position: relative;
width: 100%; width: 80%;
min-height: 300px; min-height: 300px;
padding: 16px; padding: 16px;
background: var(--accent_color_bg_o); background: var(--accent_color_bg_o);
@@ -184,6 +184,7 @@ button.auswertung:hover {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 15px; gap: 15px;
align-items: center;
} }
.createCourse { .createCourse {
@@ -276,7 +277,7 @@ async function setCourseView() {
${course.description} ${course.description}
</div> </div>
<button class="action start" onclick='location.href = "./kursAnzeige.html?course=" + "${courseId}"'> <button class="action start" onclick='location.href = "./kursAnzeige.html?user=${userData.name},course=${courseId}";'>
Umfrage Starten Umfrage Starten
</button> </button>