diff options
Diffstat (limited to 'muendliche-nachpruefung/lib.typ')
-rw-r--r-- | muendliche-nachpruefung/lib.typ | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/muendliche-nachpruefung/lib.typ b/muendliche-nachpruefung/lib.typ index 900cfc0..356d750 100644 --- a/muendliche-nachpruefung/lib.typ +++ b/muendliche-nachpruefung/lib.typ @@ -2,18 +2,22 @@ // // SPDX-License-Identifier: MIT -#let oral-post-exam( +#let event(name: "", year: "", did_attend: "") = ( + box(height: 1.2em)[*#name*], [#year], [#did_attend] +) + +#let exam-report( lecture: "", // Fach date: datetime(year: 0, month: 1, day: 1), // Prüfungsdatum examiner: "", // PrüferIn (Prof) assistant: "", // BeisitzerIn did_pass: none, // Bestanden? true || false exam_duration: duration(minutes: 0), // Prüfungsdauer - attendance: (: - /* Veranstaltung, Jahr, regelmäßig besucht? */ - "Vorlesung": (year: "", did_attend: ""), - "Übung": (year: "", did_attend: ""), - "Tutorium": (year: "", did_attend: ""), + attendance: ( + /* Veranstaltung, Jahr, regelmäßig besucht? */ + event(name: "Vorlesung", year: "", did_attend: ""), + event(name: "Übung", year: "", did_attend: ""), + event(name: "Tutorium", year: "", did_attend: ""), ), preparation_time: [ // Wie lange und wie hast alleine bzw. mit anderen vorbereitet? @@ -34,13 +38,6 @@ ) = [ #let checkbox(checked: false) = if (checked) {$times.square$} else {$square$} - #let events = ( - "Vorlesung": (year: "", did_attend: ""), - "Übung": (year: "", did_attend: ""), - "Tutorium": (year: "", did_attend: ""), - ..attendance - ) - #show <date>: if date.year() > 0 {date.display("[day].[month].[year]")} #show <examiner>: examiner #show <assistant>: assistant @@ -64,8 +61,7 @@ let _ = g.remove("label") table(..g, ..it.fields().children.at(0).children, - ..events.pairs().map(((location, (year, did_attend))) => - (box(height: 1.2em)[*#location*], [#year], [#did_attend])).flatten() + ..(attendance + 3*(event(),)).slice(0,3).flatten() ) } |