csvgen

package
v1.228.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: BSD-3-Clause Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL