Documentation
¶
Overview ¶
Package csvgen builds the CSV export rows from already-fetched planning data. The plexams package gathers the exams from the DB and marshals/writes the returned rows; the pure row builders here are I/O-free over graph/model types and unit-tested. Keeping the CSV shaping out of the plexams god-package is the point (mirrors plexams/pdfgen).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CsvExam ¶
type CsvExam struct {
Ancode int `csv:"Ancode"`
Module string `csv:"Modul"`
MainExamer string `csv:"Erstprüfer:in"`
ExamDate string `csv:"Termin"`
Rooms string `csv:"Räume"`
Comment string `csv:"Anmerkungen"`
}
CsvExam is one row of the per-program export (one row per planned room, or one placeholder row when no rooms are planned yet).
func ProgramRows ¶
func ProgramRows(exams []*model.PlannedExam, program string, slotTime func(day, slot int) time.Time) []CsvExam
ProgramRows builds the per-program CSV rows, sorted by the exam's Primuss ancode in this program. An exam is keyed by the ancode of its Primuss section in the program; a section with no registrations is skipped, and an exam without a matching section is dropped (it never enters the sort order). One row per planned room; a placeholder row when no rooms are planned yet.
type CsvExamEXaHM ¶
type CsvExamEXaHM struct {
Ancode int `csv:"Ancode"`
Module string `csv:"Modul"`
MainExamer string `csv:"Erstprüfender"`
ExamDate string `csv:"Termin"`
MaxDuration int `csv:"Maximale Länge"`
Students int `csv:"Anmeldungen"`
Rooms string `csv:"Räume"`
Type string `csv:"Typ"`
Jira string `csv:"Jira"`
}
CsvExamEXaHM is one row of the EXaHM/SEB export.
func ExahmRows ¶
func ExahmRows(exams []*model.PlannedExam, slotTime func(day, slot int) time.Time) []CsvExamEXaHM
ExahmRows builds the EXaHM/SEB CSV rows for the exams carrying an EXaHM or SEB room constraint. slotTime resolves the plan entry to its start.