summaryrefslogtreecommitdiff
path: root/muendliche-pruefung
diff options
context:
space:
mode:
Diffstat (limited to 'muendliche-pruefung')
-rw-r--r--muendliche-pruefung/README.md12
-rw-r--r--muendliche-pruefung/lib.typ19
-rw-r--r--muendliche-pruefung/main.typ12
3 files changed, 22 insertions, 21 deletions
diff --git a/muendliche-pruefung/README.md b/muendliche-pruefung/README.md
index 923700a..4cf93f6 100644
--- a/muendliche-pruefung/README.md
+++ b/muendliche-pruefung/README.md
@@ -16,9 +16,9 @@ Zum Erstellen des Dokumentes müssen lediglich die Argumente in der Datei
`main.typ` ausgefüllt werden.
```typst
-#import "lib.typ": oral-exam, KIND
+#import "lib.typ": exam-report, event, KIND
-#show: oral-exam.with(
+#show: exam-report.with(
study: "", // Studiengang
lecture: "", // Fach
kind: KIND.NONE, // Prüfungsart KIND.{WAHLPFLICHT, VERTIEFUNGSFACH, ERGUENZUNGSFACH}
@@ -30,10 +30,10 @@ Zum Erstellen des Dokumentes müssen lediglich die Argumente in der Datei
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?
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()
)
}
diff --git a/muendliche-pruefung/main.typ b/muendliche-pruefung/main.typ
index 40e8da0..cf6adcf 100644
--- a/muendliche-pruefung/main.typ
+++ b/muendliche-pruefung/main.typ
@@ -1,6 +1,6 @@
-#import "lib.typ": oral-exam, KIND
+#import "lib.typ": exam-report, event, KIND
-#show: oral-exam.with(
+#show: exam-report.with(
study: "", // Studiengang
lecture: "", // Fach
kind: KIND.NONE, // Prüfungsart KIND.{WAHLPFLICHT, VERTIEFUNGSFACH, ERGUENZUNGSFACH}
@@ -12,10 +12,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?