model

package
v1.120.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: BSD-3-Clause Imports: 5 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

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AddedPrimussAncode

type AddedPrimussAncode struct {
	Ancode        int               `json:"ancode"`
	PrimussAncode ZPAPrimussAncodes `json:"primuss_ancodes"`
}

type AnCode

type AnCode struct {
	Ancode int `json:"ancode"`
}

type AnnyBooking added in v1.77.0

type AnnyBooking struct {
	Number                 string     `json:"number" bson:"number"`
	StartDate              time.Time  `json:"startDate" bson:"start_date"`
	EndDate                time.Time  `json:"endDate" bson:"end_date"`
	BlockerStartDate       time.Time  `json:"blockerStartDate" bson:"blocker_start_date"`
	BlockerEndDate         time.Time  `json:"blockerEndDate" bson:"blocker_end_date"`
	ChargedDuration        int        `json:"chargedDuration" bson:"charged_duration"`
	Description            string     `json:"description" bson:"description"`
	CreatedAt              time.Time  `json:"createdAt" bson:"created_at"`
	UpdatedAt              time.Time  `json:"updatedAt" bson:"updated_at"`
	CanceledAt             *time.Time `json:"canceledAt,omitempty" bson:"canceled_at,omitempty"`
	Status                 string     `json:"status" bson:"status"`
	StatusReason           any        `json:"-" bson:"status_reason,omitempty"`
	IsBlocker              bool       `json:"isBlocker" bson:"is_blocker"`
	CanEdit                bool       `json:"canEdit" bson:"can_edit"`
	IsEditable             bool       `json:"isEditable" bson:"is_editable"`
	ManuallyCreated        bool       `json:"manuallyCreated" bson:"manually_created"`
	Note                   string     `json:"note" bson:"note"`
	Room                   string     `json:"room,omitempty" bson:"room,omitempty"`
	Self                   string     `json:"self" bson:"self"`
	PersonalizationName    string     `json:"personalizationName" bson:"personalization_name"`
	BookingGroupIdentifier string     `json:"bookingGroupIdentifier,omitempty" bson:"booking_group_identifier,omitempty"`
	CancelableUntil        *time.Time `json:"cancelableUntil,omitempty" bson:"cancelable_until,omitempty"`
	HasCustomDescription   bool       `json:"hasCustomDescription" bson:"has_custom_description"`
	ResourceID             string     `json:"-" bson:"resource_id,omitempty"`
}

type BalanceReport added in v1.98.0

type BalanceReport struct {
	Satisfied       bool `json:"satisfied"`
	Invigilators    int  `json:"invigilators"`
	ToleranceMin    int  `json:"toleranceMin"`
	WithinTolerance int  `json:"withinTolerance"`
	Over            int  `json:"over"`
	Under           int  `json:"under"`
	MaxOver         int  `json:"maxOver"`
	MaxUnder        int  `json:"maxUnder"`
}

BalanceReport: are all invigilators within ±tolerance of their target minutes.

type BlockedRoom added in v1.119.0

type BlockedRoom struct {
	Room   string  `json:"room"`
	Day    int     `json:"day"`
	Slot   int     `json:"slot"`
	Reason *string `json:"reason,omitempty"`
}

A room blocked for one slot (not usable for planning there).

type Conflict

type Conflict struct {
	AnCode        int `json:"ancode"`
	NumberOfStuds int `json:"numberOfStuds"`
}

type ConflictPerProgram

type ConflictPerProgram struct {
	Program   string      `json:"program"`
	Conflicts []*Conflict `json:"conflicts"`
}

type Conflicts

type Conflicts struct {
	AnCode     int         `json:"ancode"`
	Module     string      `json:"module"`
	MainExamer string      `json:"mainExamer"`
	Conflicts  []*Conflict `json:"conflicts"`
}

type ConflictsPerProgramAncode

type ConflictsPerProgramAncode struct {
	Program   string     `json:"program"`
	Ancode    int        `json:"ancode"`
	Conflicts *Conflicts `json:"conflicts,omitempty"`
}

type ConnectedExam

type ConnectedExam struct {
	ZpaExam           *ZPAExam       `json:"zpaExam"`
	PrimussExams      []*PrimussExam `json:"primussExams"`
	OtherPrimussExams []*PrimussExam `json:"otherPrimussExams"`
	Errors            []string       `json:"errors"`
}

type Constraints

type Constraints struct {
	Ancode          int              `json:"ancode"`
	NotPlannedByMe  bool             `json:"notPlannedByMe"`
	ExcludeDays     []*time.Time     `json:"excludeDays,omitempty"`
	PossibleDays    []*time.Time     `json:"possibleDays,omitempty"`
	FixedDay        *time.Time       `json:"fixedDay,omitempty"`
	FixedTime       *time.Time       `json:"fixedTime,omitempty"`
	SameSlot        []int            `json:"sameSlot,omitempty"`
	Online          bool             `json:"online"`
	RoomConstraints *RoomConstraints `json:"roomConstraints,omitempty"`
}

type ConstraintsInput added in v1.20.0

type ConstraintsInput struct {
	AllowedRooms     []string     `json:"allowedRooms,omitempty"`
	NotPlannedByMe   *bool        `json:"notPlannedByMe,omitempty"`
	ExcludeDays      []*time.Time `json:"excludeDays,omitempty"`
	PossibleDays     []*time.Time `json:"possibleDays,omitempty"`
	FixedDay         *time.Time   `json:"fixedDay,omitempty"`
	FixedTime        *time.Time   `json:"fixedTime,omitempty"`
	SameSlot         []int        `json:"sameSlot,omitempty"`
	Online           *bool        `json:"online,omitempty"`
	PlacesWithSocket *bool        `json:"placesWithSocket,omitempty"`
	Lab              *bool        `json:"lab,omitempty"`
	Exahm            *bool        `json:"exahm,omitempty"`
	Seb              *bool        `json:"seb,omitempty"`
	KdpJiraURL       *string      `json:"kdpJiraURL,omitempty"`
	MaxStudents      *int         `json:"maxStudents,omitempty"`
	Comments         *string      `json:"comments,omitempty"`
}

type CoverageReport added in v1.98.0

type CoverageReport struct {
	Positions int `json:"positions"`
	Unfilled  int `json:"unfilled"`
}

CoverageReport: how many positions are filled.

type DistributionBucket added in v1.98.0

type DistributionBucket struct {
	Count        int `json:"count"`
	Invigilators int `json:"invigilators"`
}

type EmailAttachmentInfo added in v1.102.0

type EmailAttachmentInfo struct {
	Kind        string    `json:"kind"`
	Key         string    `json:"key"`
	Filename    string    `json:"filename"`
	ContentType string    `json:"contentType"`
	Size        int       `json:"size"`
	UploadedAt  time.Time `json:"uploadedAt"`
}

EmailAttachmentInfo describes one uploaded attachment (without its binary data). kind is e.g. "cover-page" or "invigilation-image"; key is the teacher / invigilator id the attachment belongs to. The binaries themselves are uploaded via the REST endpoints /upload/email-attachment and /upload/email-attachments-zip.

type Emails added in v1.12.0

type Emails struct {
	Profs            string   `json:"profs"`
	Lbas             string   `json:"lbas"`
	LbasLastSemester string   `json:"lbasLastSemester"`
	AdditionalExamer []string `json:"additionalExamer"`
	Fs               string   `json:"fs"`
	Sekr             string   `json:"sekr"`
	// Recipient for building-management room requests (Gebäudemanagement).
	RoomManagement string `json:"roomManagement"`
}

type EnhancedPrimussExam

type EnhancedPrimussExam struct {
	Exam        *PrimussExam          `json:"exam"`
	StudentRegs []*EnhancedStudentReg `json:"studentRegs"`
	Conflicts   []*Conflict           `json:"conflicts"`
	Ntas        []*NTA                `json:"ntas"`
}

type EnhancedStudentReg added in v1.62.0

type EnhancedStudentReg struct {
	Mtknr      string      `json:"mtknr"`
	Ancode     int         `json:"ancode"`
	Program    string      `json:"program"`
	Group      string      `json:"group"`
	Name       string      `json:"name"`
	Presence   string      `json:"presence"`
	ZpaStudent *ZPAStudent `json:"zpaStudent,omitempty"`
}

type ExamDay

type ExamDay struct {
	Number int       `json:"number"`
	Date   time.Time `json:"date"`
}

type ExamTime added in v1.93.0

type ExamTime struct {
	From  time.Time `json:"from"`
	Until time.Time `json:"until"`
}

ExamTime is the time span of one exam an invigilator is the main examer of: from the start time of the slot until the end time (start + maxDuration of the exam, i.e. the longest exam in the slot including NTA extensions).

type ExamWithRegsAndRooms

type ExamWithRegsAndRooms struct {
	Exam              *PlannedExam   `json:"exam"`
	NormalRegsMtknr   []string       `json:"normalRegsMtknr"`
	NtasInNormalRooms []*NTA         `json:"ntasInNormalRooms"`
	NtasInAloneRooms  []*NTA         `json:"ntasInAloneRooms"`
	Rooms             []*PlannedRoom `json:"rooms"`
}

type ExamerInPlan

type ExamerInPlan struct {
	MainExamer   string `json:"mainExamer"`
	MainExamerID int    `json:"mainExamerID"`
}

type FK07Program

type FK07Program struct {
	Name string `json:"name"`
}

type FairnessDistribution added in v1.98.0

type FairnessDistribution struct {
	Kind    string                `json:"kind"`
	Total   int                   `json:"total"`
	Max     int                   `json:"max"`
	Buckets []*DistributionBucket `json:"buckets"`
}

FairnessDistribution: per-invigilator count histogram for one kind (reserve/nta). buckets reads as "count:invigilators", e.g. count 1 / invigilators 48.

type GeneratedExam

type GeneratedExam struct {
	Ancode           int                    `json:"ancode"`
	ZpaExam          *ZPAExam               `json:"zpaExam"`
	PrimussExams     []*EnhancedPrimussExam `json:"primussExams"`
	Constraints      *Constraints           `json:"constraints,omitempty"`
	Conflicts        []*ZPAConflict         `json:"conflicts"`
	StudentRegsCount int                    `json:"studentRegsCount"`
	Ntas             []*NTA                 `json:"ntas"`
	MaxDuration      int                    `json:"maxDuration"`
}

type Invigilation

type Invigilation struct {
	RoomName           *string `json:"roomName,omitempty"`
	Duration           int     `json:"duration"`
	InvigilatorID      int     `json:"invigilatorID"`
	Slot               *Slot   `json:"slot"`
	IsReserve          bool    `json:"isReserve"`
	IsSelfInvigilation bool    `json:"isSelfInvigilation"`
	PrePlanned         bool    `json:"prePlanned"`
}

type InvigilationReport added in v1.98.0

type InvigilationReport struct {
	Seed          int                     `json:"seed"`
	Iterations    int                     `json:"iterations"`
	IterationsRun int                     `json:"iterationsRun"`
	StoppedEarly  bool                    `json:"stoppedEarly"`
	Balance       *BalanceReport          `json:"balance"`
	Coverage      *CoverageReport         `json:"coverage"`
	Minutes       *MinutesReport          `json:"minutes"`
	Outliers      []*InvigilatorOutlier   `json:"outliers"`
	Fairness      []*FairnessDistribution `json:"fairness"`
	SoftCost      *SoftCostReport         `json:"softCost"`
}

InvigilationReport is the structured outcome of an invigilation generation run, mirroring the textual report. It is delivered once on the final RESULT line of the generateInvigilations subscription (also for dryRun, where nothing is written to the database).

type InvigilationSlot

type InvigilationSlot struct {
	Reserve               *Teacher               `json:"reserve,omitempty"`
	RoomsWithInvigilators []*RoomWithInvigilator `json:"roomsWithInvigilators"`
}

type InvigilationTimeWindow added in v1.91.0

type InvigilationTimeWindow struct {
	Date  time.Time  `json:"date"`
	From  *time.Time `json:"from,omitempty"`
	Until *time.Time `json:"until,omitempty"`
}

InvigilationTimeWindow restricts, for one calendar date, the times an invigilator may invigilate. An assigned invigilation must start no earlier than from (if set) and end no later than until (if set). The check is sub-slot granular and NTA-aware, since the end time includes the room's (possibly NTA-extended) duration.

type InvigilationTodos

type InvigilationTodos struct {
	SumExamRooms                        int            `json:"sumExamRooms"`
	SumReserve                          int            `json:"sumReserve"`
	SumOtherContributions               int            `json:"sumOtherContributions"`
	SumOtherContributionsOvertimeCutted int            `json:"sumOtherContributionsOvertimeCutted"`
	InvigilatorCount                    int            `json:"invigilatorCount"`
	TodoPerInvigilator                  int            `json:"todoPerInvigilator"`
	TodoPerInvigilatorOvertimeCutted    int            `json:"todoPerInvigilatorOvertimeCutted"`
	Invigilators                        []*Invigilator `json:"invigilators"`
}

type Invigilator

type Invigilator struct {
	Teacher      *Teacher                 `json:"teacher"`
	Requirements *InvigilatorRequirements `json:"requirements,omitempty"`
	Todos        *InvigilatorTodos        `json:"todos,omitempty"`
}

type InvigilatorOutlier added in v1.98.0

type InvigilatorOutlier struct {
	InvigilatorID int     `json:"invigilatorID"`
	Doing         int     `json:"doing"`
	Target        int     `json:"target"`
	Open          int     `json:"open"`
	Percent       float64 `json:"percent"`
}

InvigilatorOutlier: a person whose assigned minutes are furthest from target.

type InvigilatorRequirements

type InvigilatorRequirements struct {
	ExcludedDates          []*time.Time `json:"excludedDates"`
	ExcludedDays           []int        `json:"excludedDays"`
	ExamTimes              []*ExamTime  `json:"examTimes"`
	ExamDays               []int        `json:"examDays"`
	PartTime               float64      `json:"partTime"`
	OralExamsContribution  int          `json:"oralExamsContribution"`
	LiveCodingContribution int          `json:"liveCodingContribution"`
	MasterContribution     int          `json:"masterContribution"`
	FreeSemester           float64      `json:"freeSemester"`
	OvertimeLastSemester   float64      `json:"overtimeLastSemester"`
	OvertimeThisSemester   float64      `json:"overtimeThisSemester"`
	AllContributions       int          `json:"allContributions"`
	Factor                 float64      `json:"factor"`
	// fromZpa is false if the invigilator has not yet entered their requirements in
	// the ZPA. In that case default requirements (full time, no contributions) are
	// used and the invigilator still has to provide their real requirements.
	FromZpa     bool                      `json:"fromZpa"`
	TimeWindows []*InvigilationTimeWindow `json:"timeWindows"`
}

type InvigilatorTodos

type InvigilatorTodos struct {
	TotalMinutes     int             `json:"totalMinutes"`
	DoingMinutes     int             `json:"doingMinutes"`
	Enough           bool            `json:"enough"`
	InvigilationDays []int           `json:"invigilationDays,omitempty"`
	Invigilations    []*Invigilation `json:"invigilations,omitempty"`
}

type InvigilatorsForDay

type InvigilatorsForDay struct {
	Want []*Invigilator `json:"want"`
	Can  []*Invigilator `json:"can"`
}

type LogLevel added in v1.98.0

type LogLevel string

LogLevel classifies a streamed LogLine. PROGRESS lines are throttled optimizer snapshots and should be rendered in-place (like a spinner) instead of appended. DONE marks the final line of a stream.

const (
	LogLevelInfo     LogLevel = "INFO"
	LogLevelWarn     LogLevel = "WARN"
	LogLevelError    LogLevel = "ERROR"
	LogLevelProgress LogLevel = "PROGRESS"
	LogLevelResult   LogLevel = "RESULT"
	LogLevelDone     LogLevel = "DONE"
)

func (LogLevel) IsValid added in v1.98.0

func (e LogLevel) IsValid() bool

func (LogLevel) MarshalGQL added in v1.98.0

func (e LogLevel) MarshalGQL(w io.Writer)

func (LogLevel) MarshalJSON added in v1.98.0

func (e LogLevel) MarshalJSON() ([]byte, error)

func (LogLevel) String added in v1.98.0

func (e LogLevel) String() string

func (*LogLevel) UnmarshalGQL added in v1.98.0

func (e *LogLevel) UnmarshalGQL(v any) error

func (*LogLevel) UnmarshalJSON added in v1.98.0

func (e *LogLevel) UnmarshalJSON(b []byte) error

type LogLine added in v1.98.0

type LogLine struct {
	Level      LogLevel            `json:"level"`
	Text       string              `json:"text"`
	Progress   *OptimizerProgress  `json:"progress,omitempty"`
	Report     *InvigilationReport `json:"report,omitempty"`
	Validation *ValidationReport   `json:"validation,omitempty"`
}

LogLine is one streamed line of output. text carries the rendered line including ANSI color codes, so a terminal-like frontend can display it verbatim. progress is only set when level is PROGRESS; report is only set on the final RESULT line of an invigilation generation and carries the structured outcome.

type MinutesReport added in v1.98.0

type MinutesReport struct {
	WithinTolerance int `json:"withinTolerance"`
	Over            int `json:"over"`
	Under           int `json:"under"`
	ToleranceMin    int `json:"toleranceMin"`
}

MinutesReport: distribution of assigned vs. target minutes around the tolerance band.

type MucDaiExam

type MucDaiExam struct {
	PrimussAncode  int    `json:"primussAncode"`
	Module         string `json:"module"`
	MainExamer     string `json:"mainExamer"`
	MainExamerID   *int   `json:"mainExamerID,omitempty"`
	ExamType       string `json:"examType"`
	Duration       int    `json:"duration"`
	IsRepeaterExam bool   `json:"isRepeaterExam"`
	Program        string `json:"program"`
	PlannedBy      string `json:"plannedBy"`
}

type Mutation

type Mutation struct {
}

type NTA

type NTA struct {
	Name                 string  `bson:"name"`
	Email                *string `bson:"email"`
	Mtknr                string  `bson:"mtknr"`
	Compensation         string  `bson:"compensation"`
	DeltaDurationPercent int     `bson:"deltaDurationPercent"`
	NeedsRoomAlone       bool    `bson:"needsRoomAlone"`
	NeedsHardware        bool    `bson:"needsHardware"`
	Program              string  `bson:"program"`
	From                 string  `bson:"from"`
	Until                string  `bson:"until"`
	LastSemester         *string `bson:"lastSemester"`
	Deactivated          bool    `bson:"deactivated"`
}

func NtaInputToNta

func NtaInputToNta(ntaInput NTAInput) *NTA

type NTAInput

type NTAInput struct {
	Name                 string  `json:"name"`
	Email                *string `json:"email,omitempty"`
	Mtknr                string  `json:"mtknr"`
	Compensation         string  `json:"compensation"`
	DeltaDurationPercent int     `json:"deltaDurationPercent"`
	NeedsRoomAlone       bool    `json:"needsRoomAlone"`
	NeedsHardware        bool    `json:"needsHardware"`
	Program              string  `json:"program"`
	From                 string  `json:"from"`
	Until                string  `json:"until"`
}

type NTAWithRegs

type NTAWithRegs struct {
	Nta  *NTA                   `json:"nta"`
	Regs *StudentRegsPerStudent `json:"regs,omitempty"`
}

type NTAWithRegsByExam

type NTAWithRegsByExam struct {
	Exam *ZPAExam       `json:"exam"`
	Ntas []*NTAWithRegs `json:"ntas,omitempty"`
}

type NTAWithRegsByExamAndTeacher

type NTAWithRegsByExamAndTeacher struct {
	Teacher *Teacher             `json:"teacher"`
	Exams   []*NTAWithRegsByExam `json:"exams,omitempty"`
}

type OptimizerProgress added in v1.98.0

type OptimizerProgress struct {
	Iteration int     `json:"iteration"`
	Total     int     `json:"total"`
	BestCost  float64 `json:"bestCost"`
	Balance   bool    `json:"balance"`
	Unfilled  int     `json:"unfilled"`
}

OptimizerProgress is the structured payload of a PROGRESS LogLine, mirroring the simulated-annealing optimizer snapshot.

type PlanEntry

type PlanEntry struct {
	DayNumber    int        `json:"dayNumber"`
	SlotNumber   int        `json:"slotNumber"`
	ExternalTime *time.Time `json:"externalTime"`
	Ancode       int        `json:"ancode"`
	Locked       bool       `json:"locked"`
}

type PlannedExam

type PlannedExam struct {
	Ancode           int                    `json:"ancode"`
	ZpaExam          *ZPAExam               `json:"zpaExam"`
	PrimussExams     []*EnhancedPrimussExam `json:"primussExams"`
	Constraints      *Constraints           `json:"constraints,omitempty"`
	Conflicts        []*ZPAConflict         `json:"conflicts"`
	StudentRegsCount int                    `json:"studentRegsCount"`
	Ntas             []*NTA                 `json:"ntas"`
	MaxDuration      int                    `json:"maxDuration"`
	PlanEntry        *PlanEntry             `json:"planEntry,omitempty"`
	PlannedRooms     []*PlannedRoom         `json:"plannedRooms,omitempty"`
}

type PlannedRoom

type PlannedRoom struct {
	Day               int      `json:"day"`
	Slot              int      `json:"slot"`
	RoomName          string   `json:"roomName"`
	Ancode            int      `json:"ancode"`
	Duration          int      `json:"duration"`
	Handicap          bool     `json:"handicap"`
	HandicapRoomAlone bool     `json:"handicapRoomAlone"`
	Reserve           bool     `json:"reserve"`
	StudentsInRoom    []string `json:"studentsInRoom"`
	NtaMtknr          *string  `json:"ntaMtknr,omitempty"`
	PrePlanned        bool     `json:"prePlanned,omitempty"`
}

type PreExam added in v1.23.0

type PreExam struct {
	ZpaExam     *ZPAExam     `json:"zpaExam"`
	Constraints *Constraints `json:"constraints,omitempty"`
	PlanEntry   *PlanEntry   `json:"planEntry,omitempty"`
}

type PrePlannedInvigilation added in v1.84.0

type PrePlannedInvigilation struct {
	InvigilatorID int     `json:"invigilatorID"`
	Day           int     `json:"day"`
	Slot          int     `json:"slot"`
	RoomName      *string `json:"roomName,omitempty"`
	IsReserve     bool    `json:"isReserve"`
}

PrePlannedInvigilation fixes an invigilator for a room (or the reserve) in a slot before the automatic invigilation planning runs. roomName is null for a reserve invigilation.

type PrePlannedRoom added in v1.33.0

type PrePlannedRoom struct {
	Ancode   int     `json:"ancode"`
	RoomName string  `json:"roomName"`
	Mtknr    *string `json:"mtknr,omitempty"`
	Reserve  bool    `json:"reserve"`
}

type PrimussExam

type PrimussExam struct {
	AnCode     int    `bson:"AnCode"`
	Module     string `bson:"Titel"`
	MainExamer string `bson:"pruefer"`
	Program    string `bson:"Stg"`
	ExamType   string `bson:"sonst"`
	Presence   string `bson:"ist_praesenz"`
}

type PrimussExamAncode

type PrimussExamAncode struct {
	Ancode        int    `json:"ancode"`
	Program       string `json:"program"`
	NumberOfStuds int    `json:"numberOfStuds"`
}

type PrimussExamByProgram

type PrimussExamByProgram struct {
	Program string                  `json:"program"`
	Exams   []*PrimussExamWithCount `json:"exams"`
}

type PrimussExamInput

type PrimussExamInput struct {
	Ancode  int    `json:"ancode"`
	Program string `json:"program"`
}

type PrimussExamWithCount

type PrimussExamWithCount struct {
	Ancode           int    `json:"ancode"`
	Module           string `json:"module"`
	MainExamer       string `json:"mainExamer"`
	Program          string `json:"program"`
	ExamType         string `json:"examType"`
	Presence         string `json:"presence"`
	StudentRegsCount int    `json:"studentRegsCount"`
}

type Query

type Query struct {
}

type RegWithError

type RegWithError struct {
	Registration *ZPAStudentReg      `json:"registration"`
	Error        *ZPAStudentRegError `json:"error"`
}

type RegWithProgram added in v1.57.0

type RegWithProgram struct {
	Program string `json:"program"`
	Reg     int    `json:"reg"`
}

type RemovedPrimussExam

type RemovedPrimussExam struct {
	AnCode  int    `bson:"AnCode"`
	Program string `bson:"Stg"`
}

type Room

type Room struct {
	Name             string `json:"name"`
	Seats            int    `json:"seats"`
	Handicap         bool   `json:"handicap"`
	Lab              bool   `json:"lab"`
	PlacesWithSocket bool   `json:"placesWithSocket"`
	// needsRequest is derived: true when requestWith is not NONE.
	NeedsRequest bool            `json:"needsRequest"`
	RequestWith  RoomRequestType `json:"requestWith"`
	// Lower number = preferred when generating room requests (e.g. R1.006/R1.046 = 1, R1.049 = 2).
	RequestPriority int  `json:"requestPriority"`
	Exahm           bool `json:"exahm"`
	Seb             bool `json:"seb"`
	SebSeats        *int `json:"sebSeats,omitempty"`
	HmebSeats       *int `json:"hmebSeats,omitempty"`
	Deactivated     bool `json:"deactivated"`
}

type RoomAndExam

type RoomAndExam struct {
	Room *PlannedRoom `json:"room"`
	Exam *ZPAExam     `json:"exam"`
}

type RoomConstraints

type RoomConstraints struct {
	AllowedRooms     []string `json:"allowedRooms,omitempty"`
	PlacesWithSocket bool     `json:"placesWithSocket"`
	Lab              bool     `json:"lab"`
	Exahm            bool     `json:"exahm"`
	Seb              bool     `json:"seb"`
	KdpJiraURL       *string  `json:"kdpJiraURL,omitempty"`
	MaxStudents      *int     `json:"maxStudents,omitempty"`
	Comments         *string  `json:"comments,omitempty"`
}

type RoomInput added in v1.113.0

type RoomInput struct {
	Name             string          `json:"name"`
	Seats            int             `json:"seats"`
	Handicap         bool            `json:"handicap"`
	Lab              bool            `json:"lab"`
	PlacesWithSocket bool            `json:"placesWithSocket"`
	RequestWith      RoomRequestType `json:"requestWith"`
	RequestPriority  int             `json:"requestPriority"`
	Exahm            bool            `json:"exahm"`
	Seb              bool            `json:"seb"`
	SebSeats         *int            `json:"sebSeats,omitempty"`
	HmebSeats        *int            `json:"hmebSeats,omitempty"`
}

type RoomRequest added in v1.115.0

type RoomRequest struct {
	Room     string    `json:"room"`
	Day      int       `json:"day"`
	Slot     int       `json:"slot"`
	From     time.Time `json:"from"`
	Until    time.Time `json:"until"`
	Approved bool      `json:"approved"`
	Active   bool      `json:"active"`
}

type RoomRequestPreview added in v1.116.0

type RoomRequestPreview struct {
	Room              string         `json:"room"`
	Day               int            `json:"day"`
	Slot              int            `json:"slot"`
	From              time.Time      `json:"from"`
	Until             time.Time      `json:"until"`
	Students          int            `json:"students"`
	Seats             int            `json:"seats"`
	Exam              *PlannedExam   `json:"exam"`
	SimultaneousExams []*PlannedExam `json:"simultaneousExams"`
}

RoomRequestPreview is one entry of the dry-run room-request generation: a management room that would be requested for an exam in a slot. It carries the triggering exam and the other (simultaneous) exams in that slot so the result can be eyeballed in the GUI. The preview is read-only and changes nothing.

type RoomRequestType added in v1.114.0

type RoomRequestType string

RoomRequestType says how a room that needs requesting must be requested: NONE = no request needed, ANNY = via the Anny website (T-building), MANAGEMENT = via the building management (Gebäudemanagement).

const (
	RoomRequestTypeNone       RoomRequestType = "NONE"
	RoomRequestTypeAnny       RoomRequestType = "ANNY"
	RoomRequestTypeManagement RoomRequestType = "MANAGEMENT"
)

func (RoomRequestType) IsValid added in v1.114.0

func (e RoomRequestType) IsValid() bool

func (RoomRequestType) MarshalGQL added in v1.114.0

func (e RoomRequestType) MarshalGQL(w io.Writer)

func (RoomRequestType) MarshalJSON added in v1.114.0

func (e RoomRequestType) MarshalJSON() ([]byte, error)

func (RoomRequestType) String added in v1.114.0

func (e RoomRequestType) String() string

func (*RoomRequestType) UnmarshalGQL added in v1.114.0

func (e *RoomRequestType) UnmarshalGQL(v any) error

func (*RoomRequestType) UnmarshalJSON added in v1.114.0

func (e *RoomRequestType) UnmarshalJSON(b []byte) error

type RoomWithInvigilator

type RoomWithInvigilator struct {
	Name         string         `json:"name"`
	MaxDuration  int            `json:"maxDuration"`
	StudentCount int            `json:"studentCount"`
	RoomAndExams []*RoomAndExam `json:"roomAndExams"`
	Invigilator  *Teacher       `json:"invigilator,omitempty"`
}

type RoomsForSlot added in v1.31.0

type RoomsForSlot struct {
	Day       int      `json:"day"`
	Slot      int      `json:"slot"`
	RoomNames []string `json:"roomNames"`
}

type Semester

type Semester struct {
	ID string `json:"id"`
}

type SemesterConfig

type SemesterConfig struct {
	Days           []*ExamDay   `json:"days"`
	Starttimes     []*Starttime `json:"starttimes"`
	Slots          []*Slot      `json:"slots"`
	GoSlotsRaw     [][]int      `json:"goSlotsRaw,omitempty"`
	GoSlots        []*Slot      `json:"goSlots"`
	GoDay0         time.Time    `json:"goDay0"`
	ForbiddenSlots []*Slot      `json:"forbiddenSlots,omitempty"`
	From           time.Time    `json:"from"`
	FromFk07       time.Time    `json:"fromFK07"`
	Until          time.Time    `json:"until"`
	Emails         *Emails      `json:"emails"`
}

type Slot

type Slot struct {
	DayNumber  int       `json:"dayNumber"`
	SlotNumber int       `json:"slotNumber"`
	Starttime  time.Time `json:"starttime"`
}

type SlotInput added in v1.120.0

type SlotInput struct {
	Day  int `json:"day"`
	Slot int `json:"slot"`
}

A day/slot pair, used to block a room for several slots at once.

type SoftCostItem added in v1.98.0

type SoftCostItem struct {
	Name string  `json:"name"`
	Cost float64 `json:"cost"`
}

type SoftCostReport added in v1.98.0

type SoftCostReport struct {
	Total     float64         `json:"total"`
	Breakdown []*SoftCostItem `json:"breakdown"`
}

SoftCostReport: the weighted soft-constraint penalty score (lower is better).

type Starttime

type Starttime struct {
	Number int    `json:"number"`
	Start  string `json:"start"`
}

type Step

type Step struct {
	Number   int       `json:"number" mapstructure:"number"`
	Name     string    `json:"name" mapstructure:"step"`
	Done     bool      `json:"done" mapstructure:"done"`
	Deadline time.Time `json:"deadline" mapstructure:"deadline"`
}

type Student

type Student struct {
	Mtknr           string            `json:"mtknr"`
	Program         string            `json:"program"`
	Group           string            `json:"group"`
	Name            string            `json:"name"`
	Regs            []int             `json:"regs"`
	RegsWithProgram []*RegWithProgram `json:"regsWithProgram"`
	ZpaStudent      *ZPAStudent       `json:"zpaStudent,omitempty"`
	Nta             *NTA              `json:"nta,omitempty"`
}

type StudentReg

type StudentReg struct {
	Mtknr    string `bson:"MTKNR"`
	AnCode   int    `bson:"AnCode"`
	Program  string `bson:"Stg"`
	Group    string `bson:"Stgru"`
	Name     string `bson:"name"`
	Presence string `bson:"praesenz_fern"`
}

type StudentRegsForAncode

type StudentRegsForAncode struct {
	Exam        *ZPAExam                          `json:"exam"`
	StudentRegs []*StudentRegsPerAncodeAndProgram `json:"studentRegs"`
}

type StudentRegsPerAncode

type StudentRegsPerAncode struct {
	Ancode     int                               `json:"ancode"`
	PerProgram []*StudentRegsPerAncodeAndProgram `json:"perProgram"`
}

type StudentRegsPerAncodeAndProgram

type StudentRegsPerAncodeAndProgram struct {
	Program     string        `json:"program"`
	Ancode      int           `json:"ancode"`
	StudentRegs []*StudentReg `json:"studentRegs"`
}

type StudentRegsPerStudent

type StudentRegsPerStudent struct {
	Student *Student `json:"student"`
	Ancodes []int    `json:"ancodes"`
}

type Subscription added in v1.98.0

type Subscription struct {
}

type Teacher

type Teacher struct {
	Shortname    string `json:"person_shortname"`
	Fullname     string `json:"person_fullname"`
	IsProf       bool   `json:"is_prof"`
	IsLBA        bool   `json:"is_lba"`
	IsProfHC     bool   `json:"is_profhc"`
	IsStaff      bool   `json:"is_staff"`
	LastSemester string `json:"last_semester"`
	FK           string `json:"fk"`
	ID           int    `json:"person_id"`
	Email        string `json:"email"`
	IsActive     bool   `json:"is_active"`
}

type ValidationFinding added in v1.99.0

type ValidationFinding struct {
	Level          ValidationLevel `json:"level"`
	Message        string          `json:"message"`
	Ancode         *int            `json:"ancode,omitempty"`
	RelatedAncodes []int           `json:"relatedAncodes,omitempty"`
	Room           *string         `json:"room,omitempty"`
	Day            *int            `json:"day,omitempty"`
	Slot           *int            `json:"slot,omitempty"`
	InvigilatorID  *int            `json:"invigilatorID,omitempty"`
	StudentMtknr   *string         `json:"studentMtknr,omitempty"`
}

ValidationFinding is one problem (or note) found by a validator. message is clean text (no ANSI); the optional reference fields let the GUI link a finding to the affected exam / room / slot / invigilator / student and render it as a row.

type ValidationLevel added in v1.99.0

type ValidationLevel string

ValidationLevel classifies a single validation finding.

const (
	ValidationLevelInfo    ValidationLevel = "INFO"
	ValidationLevelWarning ValidationLevel = "WARNING"
	ValidationLevelError   ValidationLevel = "ERROR"
)

func (ValidationLevel) IsValid added in v1.99.0

func (e ValidationLevel) IsValid() bool

func (ValidationLevel) MarshalGQL added in v1.99.0

func (e ValidationLevel) MarshalGQL(w io.Writer)

func (ValidationLevel) MarshalJSON added in v1.99.0

func (e ValidationLevel) MarshalJSON() ([]byte, error)

func (ValidationLevel) String added in v1.99.0

func (e ValidationLevel) String() string

func (*ValidationLevel) UnmarshalGQL added in v1.99.0

func (e *ValidationLevel) UnmarshalGQL(v any) error

func (*ValidationLevel) UnmarshalJSON added in v1.99.0

func (e *ValidationLevel) UnmarshalJSON(b []byte) error

type ValidationReport added in v1.99.0

type ValidationReport struct {
	Name         string               `json:"name"`
	Ok           bool                 `json:"ok"`
	ErrorCount   int                  `json:"errorCount"`
	WarningCount int                  `json:"warningCount"`
	Findings     []*ValidationFinding `json:"findings"`
}

ValidationReport is the structured outcome of one validator. It is delivered on the final RESULT line of the validator's subscription (in LogLine.validation), while the human-readable lines stream before it.

type ZPAAncodes

type ZPAAncodes struct {
	Semester string `json:"semester"`
	AnCode   int    `json:"anCode"`
}

type ZPAConflict

type ZPAConflict struct {
	Ancode         int                  `json:"ancode"`
	NumberOfStuds  int                  `json:"numberOfStuds"`
	PrimussAncodes []*PrimussExamAncode `json:"primussAncodes"`
}

type ZPAExam

type ZPAExam struct {
	ZpaID          int                 `json:"id"`
	Semester       string              `json:"semester"`
	AnCode         int                 `json:"ancode"`
	Module         string              `json:"module"`
	MainExamer     string              `json:"main_examer"`
	MainExamerID   int                 `json:"main_examer_id"`
	ExamType       string              `json:"exam_type"`
	ExamTypeFull   string              `json:"full_name"`
	Date           string              `json:"date"`
	Starttime      string              `json:"start_time"`
	Duration       int                 `json:"duration"`
	IsRepeaterExam bool                `json:"is_repeater_exam"`
	Groups         []string            `json:"groups"`
	PrimussAncodes []ZPAPrimussAncodes `json:"primuss_ancodes"`
}

type ZPAExamPlan

type ZPAExamPlan struct {
	Semester             string             `json:"semester"`
	AnCode               int                `json:"anCode" bson:"ancode"`
	Date                 string             `json:"date"` // "19.07.2022"
	Time                 string             `json:"time"` // "14:30"
	StudentCount         int                `json:"total_number"`
	ReserveInvigilatorID int                `json:"reserveInvigilator_id"`
	Rooms                []*ZPAExamPlanRoom `json:"rooms"`
}

type ZPAExamPlanRoom

type ZPAExamPlanRoom struct {
	RoomName      string `json:"room_name"`
	InvigilatorID int    `json:"invigilator_id"`
	Duration      int    `json:"duration"`
	IsReserve     bool   `json:"reserveRoom"`
	StudentCount  int    `json:"numberStudents"`
	IsHandicap    bool   `json:"handicapCompensation"`
}

type ZPAExamWithConstraints

type ZPAExamWithConstraints struct {
	ZpaExam     *ZPAExam     `json:"zpaExam"`
	Constraints *Constraints `json:"constraints,omitempty"`
	PlanEntry   *PlanEntry   `json:"planEntry,omitempty"`
}

type ZPAExamsForType

type ZPAExamsForType struct {
	Type  string     `json:"type"`
	Exams []*ZPAExam `json:"exams"`
}

type ZPAInvigilator

type ZPAInvigilator struct {
	Teacher                  *Teacher `json:"teacher"`
	HasSubmittedRequirements bool     `json:"hasSubmittedRequirements"`
}

type ZPAPrimussAncodes

type ZPAPrimussAncodes struct {
	Program string `json:"program"`
	Ancode  int    `json:"ancode"`
}

type ZPAStudent

type ZPAStudent struct {
	Mtknr     string `json:"mtknr"`
	Greeting  string `json:"greeting"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string `json:"email"`
	Gender    string `json:"gender"`
	Group     string `json:"group"`
}

type ZPAStudentReg

type ZPAStudentReg struct {
	Semester string `json:"semester"`
	AnCode   int    `json:"anCode" bson:"ancode"`
	Mtknr    string `json:"matrikel"`
	Program  string `json:"program"`
}

type ZPAStudentRegError

type ZPAStudentRegError struct {
	Semester string `json:"semester"`
	AnCode   string `json:"anCode" bson:"ancode"`
	Exam     string `json:"exam"`
	Mtknr    string `json:"mtknr"`
	Program  string `json:"program"`
}

Jump to

Keyboard shortcuts

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