summaryrefslogtreecommitdiff
path: root/muendliche-pruefung/lib.typ
diff options
context:
space:
mode:
authororangerot <orangerot@orangerot.dev>2025-09-09 13:18:10 +0200
committerorangerot <orangerot@orangerot.dev>2025-09-09 13:18:10 +0200
commit2ed73f8bf490c946915547fff63b3be1c659890b (patch)
tree3a2c9c1724662171f334dcd874fda69fe4d349d6 /muendliche-pruefung/lib.typ
parentc6e566775daa8c77b1a9108ef2bfd1d9c1146b9d (diff)
feat: package definiton with library and template
Diffstat (limited to 'muendliche-pruefung/lib.typ')
-rw-r--r--muendliche-pruefung/lib.typ19
1 files changed, 10 insertions, 9 deletions
diff --git a/muendliche-pruefung/lib.typ b/muendliche-pruefung/lib.typ
index 85117a1..47b884d 100644
--- a/muendliche-pruefung/lib.typ
+++ b/muendliche-pruefung/lib.typ
@@ -9,7 +9,11 @@
"NONE": ""
)
-#let oral-exam(
+#let event(name: "", lecturer: "", year: "", did_attend: "") = (
+ name, lecturer, year, did_attend
+)
+
+#let exam-report(
study: "", // Studiengang
lecture: "", // Fach
kind: KIND.NONE, // Prüfungsart KIND.{WAHLPFLICHT, VERTIEFUNGSFACH, ERGUENZUNGSFACH}
@@ -21,10 +25,10 @@
exam_duration: duration(minutes: 0), // Prüfungsdauer
attendance: (
/* Veranstaltung, Dozent(in), Jahr, regelmäßig besucht? */
- (lecture: "", lecturer: "", year: "", did_attend: ""),
- (lecture: "", lecturer: "", year: "", did_attend: ""),
- (lecture: "", lecturer: "", year: "", did_attend: ""),
- (lecture: "", lecturer: "", year: "", did_attend: ""),
+ event(name: "", lecturer: "", year: "", did_attend: ""),
+ event(name: "", lecturer: "", year: "", did_attend: ""),
+ event(name: "", lecturer: "", year: "", did_attend: ""),
+ event(name: "", lecturer: "", year: "", did_attend: ""),
),
attendance_worth: [
// Hat sich der Besuch / Nichtbesuch der Veranstaltung für dich gelohnt?
@@ -81,13 +85,10 @@
let g = it.fields()
let _ = g.remove("children")
let _ = g.remove("label")
- let events = attendance.map(((lecture, lecturer, year, did_attend)) =>
- (lecture, lecturer, year, did_attend)
- ).flatten()
table(..g,
..it.fields().children.at(0).children,
- ..(events + 4*4*([],)).slice(0,4*4)
+ ..(attendance + 4*(event(),)).slice(0,4).flatten()
)
}