Documentation
¶
Index ¶
- Variables
- type AddedPrimussAncode
- type AdditionalExam
- type AdditionalExamInput
- type AdditionalExamRoom
- type AdditionalExamRoomInput
- type AnCode
- type AnnyBooking
- type AnnyConfig
- type ArgFilterInput
- type AssembledExam
- type AssembledExamsChange
- type AssembledExamsState
- type BalanceReport
- type BlockedRoom
- type Conflict
- type ConflictDecision
- type ConflictPerProgram
- type ConflictStudent
- type Conflicts
- type ConflictsPerProgramAncode
- type ConnectedExam
- type ConnectedExamWarning
- type ConstraintCost
- type Constraints
- type ConstraintsInput
- type CoverageReport
- type DistributionBucket
- type EmailAttachmentInfo
- type EmailTemplate
- type EmailTemplateFunction
- type EmailTemplatePreview
- type EmailTemplateVariable
- type Emails
- type EmailsInput
- type EnhancedPrimussExam
- type EnhancedStudentReg
- type ExamDay
- type ExamDurationOverride
- type ExamPair
- type ExamPlanningMailExam
- type ExamPlanningMailRecipient
- type ExamScheduleConflict
- type ExamScheduleDiagnostics
- type ExamScheduleReport
- type ExamTime
- type ExamWithRegsAndRooms
- type ExamerInPlan
- type FK07Program
- type FairnessDistribution
- type GenerateAssembledExamsResult
- type GeneratePreparationResult
- type GenerateStudentRegsResult
- type GenerationConfig
- type GenerationConfigInput
- type ImportMucDaiResult
- type Invigilation
- type InvigilationReport
- type InvigilationSlot
- type InvigilationTimeWindow
- type InvigilationTimeWindowInput
- type InvigilationTodos
- type Invigilator
- type InvigilatorConstraints
- type InvigilatorConstraintsInput
- type InvigilatorOutlier
- type InvigilatorRequirements
- type InvigilatorTodos
- type InvigilatorsForDay
- type LogLevel
- type LogLine
- type MinutesReport
- type MucDaiExam
- type Mutation
- type MutationLogArg
- type MutationLogEntry
- type NTA
- type NTAInput
- type NTAWithRegs
- type NTAWithRegsByExam
- type NTAWithRegsByExamAndTeacher
- type NtaRoomAloneWaiver
- type OptimizerConstraint
- type OptimizerProgress
- type PermanentNonInvigilator
- type PlanEntry
- type Planer
- type PlannedExam
- type PlannedRoom
- type PlanningCondition
- type PlanningGate
- type PlanningPhase
- type PlanningState
- type PreExam
- type PrePlannedInvigilation
- type PrePlannedRoom
- type PreplanExam
- type PreplanExamInput
- type PreplanKindNeed
- type PreplanOverview
- type PreplanProgramConflict
- type PreplanSameSlotGroup
- type PreplanSameSlotMember
- type PreplanSlotNeed
- type PreplanValidation
- type PrimussExam
- type PrimussExamAncode
- type PrimussExamByProgram
- type PrimussExamInput
- type PrimussExamWithCount
- type Query
- type RegWithError
- type RegWithProgram
- type RemovedPrimussExam
- type Room
- type RoomAndExam
- type RoomConstraints
- type RoomInSlotUsage
- type RoomInput
- type RoomRequest
- type RoomRequestPreview
- type RoomRequestType
- type RoomWithFreeSeats
- type RoomWithInvigilator
- type RoomsForSlot
- type SaveSemesterConfigResult
- type Semester
- type SemesterConfig
- type SemesterConfigInput
- type SemesterConfigInputData
- type Slot
- type SlotInput
- type SoftCostItem
- type SoftCostReport
- type SpecialInterest
- type SpecialInterestInput
- type Starttime
- type Step
- type Student
- type StudentConflictDecision
- type StudentReg
- type StudentRegsForAncode
- type StudentRegsPerAncode
- type StudentRegsPerAncodeAndProgram
- type StudentRegsPerStudent
- type StudentRegsState
- type StudyProgram
- type StudyProgramInput
- type Subscription
- type SyncChangeEntry
- type SyncFieldChange
- type SyncLogEntry
- type Teacher
- type UnplacedExam
- type ValidationFinding
- type ValidationLevel
- type ValidationReport
- type ZPAAncodes
- type ZPAConflict
- type ZPAExam
- type ZPAExamPlan
- type ZPAExamPlanRoom
- type ZPAExamWithConstraints
- type ZPAExamsForType
- type ZPAInvigilator
- type ZPAPrimussAncodes
- type ZPAStudent
- type ZPAStudentReg
- type ZPAStudentRegError
Constants ¶
This section is empty.
Variables ¶
var AllConflictDecision = []ConflictDecision{ ConflictDecisionAccept, ConflictDecisionVeto, }
var AllLogLevel = []LogLevel{ LogLevelInfo, LogLevelWarn, LogLevelError, LogLevelProgress, LogLevelResult, LogLevelDone, }
var AllPlanningGate = []PlanningGate{ PlanningGateExams, PlanningGateRooms, PlanningGateInvigilations, }
var AllRoomRequestType = []RoomRequestType{ RoomRequestTypeNone, RoomRequestTypeAnny, RoomRequestTypeManagement, }
var AllValidationLevel = []ValidationLevel{ ValidationLevelInfo, ValidationLevelWarning, ValidationLevelError, }
Functions ¶
This section is empty.
Types ¶
type AddedPrimussAncode ¶
type AddedPrimussAncode struct {
Ancode int `json:"ancode"`
PrimussAncode ZPAPrimussAncodes `json:"primuss_ancodes"`
}
type AdditionalExam ¶
type AdditionalExam struct {
Ancode int `json:"ancode"`
// date in dd.mm.yyyy.
Date string `json:"date"`
// time in HH:MM.
Time string `json:"time"`
Rooms []*AdditionalExamRoom `json:"rooms"`
}
type AdditionalExamInput ¶
type AdditionalExamInput struct {
Ancode int `json:"ancode"`
Date string `json:"date"`
Time string `json:"time"`
Rooms []*AdditionalExamRoomInput `json:"rooms"`
}
type AdditionalExamRoom ¶ added in v1.173.0
type AdditionalExamRoomInput ¶ added in v1.173.0
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"`
// Mine is computed at query time (not stored): true when PersonalizationName
// matches one of the configured personalization names.
Mine bool `json:"mine" bson:"-"`
}
type AnnyConfig ¶ added in v1.181.0
type AnnyConfig struct {
// names whose bookings are flagged as ours (mine=true).
PersonalizationNames []string `json:"personalizationNames"`
}
type ArgFilterInput ¶ added in v1.168.0
type AssembledExam ¶ added in v1.204.0
type AssembledExam 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 AssembledExamsChange ¶ added in v1.204.0
type AssembledExamsState ¶ added in v1.204.0
type AssembledExamsState struct {
// true when the assembled exams are stale relative to their inputs.
Dirty bool `json:"dirty"`
// the operation that last marked them stale (mutation/subscription name).
Reason *string `json:"reason,omitempty"`
// when they were last marked stale or (re)generated.
ChangedAt *time.Time `json:"changedAt,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 ConflictDecision ¶ added in v1.207.0
type ConflictDecision string
ConflictDecision is an explicit per-student override of the automatic handling: ACCEPT drops that student's proximity penalty; VETO forces it to count at full weight (overriding an automatic repeat down-weighting).
const ( ConflictDecisionAccept ConflictDecision = "ACCEPT" ConflictDecisionVeto ConflictDecision = "VETO" )
func (ConflictDecision) IsValid ¶ added in v1.207.0
func (e ConflictDecision) IsValid() bool
func (ConflictDecision) MarshalGQL ¶ added in v1.207.0
func (e ConflictDecision) MarshalGQL(w io.Writer)
func (ConflictDecision) MarshalJSON ¶ added in v1.207.0
func (e ConflictDecision) MarshalJSON() ([]byte, error)
func (ConflictDecision) String ¶ added in v1.207.0
func (e ConflictDecision) String() string
func (*ConflictDecision) UnmarshalGQL ¶ added in v1.207.0
func (e *ConflictDecision) UnmarshalGQL(v any) error
func (*ConflictDecision) UnmarshalJSON ¶ added in v1.207.0
func (e *ConflictDecision) UnmarshalJSON(b []byte) error
type ConflictPerProgram ¶
type ConflictStudent ¶ added in v1.207.0
type ConflictStudent struct {
Mtknr string `json:"mtknr"`
Name string `json:"name"`
// the student's study program, e.g. "IF".
Program string `json:"program"`
// the student's cohort/group, e.g. "IF4B".
Group string `json:"group"`
// true if this is (heuristically) a repeat for this student (repeater exam or the student's semester is above the exam's) — auto down-weighted and accepted by default.
AutoAccepted bool `json:"autoAccepted"`
// explicit decision for this student, if any (overrides the automatic handling).
Decision *ConflictDecision `json:"decision,omitempty"`
// effective: penalty dropped for this student (explicit ACCEPT, or autoAccepted and not vetoed).
Accepted bool `json:"accepted"`
}
type ConnectedExam ¶
type ConnectedExam struct {
ZpaExam *ZPAExam `json:"zpaExam"`
PrimussExams []*PrimussExam `json:"primussExams"`
OtherPrimussExams []*PrimussExam `json:"otherPrimussExams"`
// Findings from connecting ZPA and Primuss data, graded by level.
Warnings []*ConnectedExamWarning `json:"warnings"`
}
type ConnectedExamWarning ¶ added in v1.166.0
type ConnectedExamWarning struct {
// info | warning | error
Level string `json:"level"`
Message string `json:"message"`
// The Primuss program this finding refers to (for an add/fix/remove action), if any.
Program *string `json:"program,omitempty"`
// The Primuss ancode this finding refers to, if any.
Ancode *int `json:"ancode,omitempty"`
// The module/exam name of the referenced Primuss exam, if known.
Module *string `json:"module,omitempty"`
// The examer of the referenced Primuss exam, if known.
Examer *string `json:"examer,omitempty"`
}
A finding from connecting a ZPA exam to its Primuss registrations.
type ConstraintCost ¶ added in v1.207.0
type Constraints ¶
type Constraints struct {
Ancode int `json:"ancode"`
NotPlannedByMe bool `json:"notPlannedByMe"`
// do not upload this exam to the ZPA when publishing the plan.
DoNotPublish bool `json:"doNotPublish"`
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"`
// fixed exam location/campus, e.g. "Campus Pasing"; empty = default campus (Lothstraße). Used for a minimum travel gap between exams at different campuses.
Location *string `json:"location,omitempty"`
// the faculty that plans this exam when notPlannedByMe (e.g. "FK10" for Pasing ZPA exams).
NotPlannedByMeInFk *string `json:"notPlannedByMeInFK,omitempty"`
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"`
DoNotPublish *bool `json:"doNotPublish,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"`
Location *string `json:"location,omitempty"`
// the faculty that plans this exam when notPlannedByMe (e.g. "FK10").
NotPlannedByMeInFk *string `json:"notPlannedByMeInFK,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"`
AdditionalSeats *int `json:"additionalSeats,omitempty"`
Comments *string `json:"comments,omitempty"`
}
type CoverageReport ¶ added in v1.98.0
CoverageReport: how many positions are filled.
type DistributionBucket ¶ added in v1.98.0
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 EmailTemplate ¶ added in v1.213.0
type EmailTemplate struct {
// the template's file name, e.g. "exahmEmail.md.tmpl".
Name string `json:"name"`
// a short human-readable purpose of this email (for the GUI list; not part of the mail).
Description string `json:"description"`
// the effective Markdown: the stored override if any, otherwise the built-in default.
Markdown string `json:"markdown"`
// true when no override is stored (the built-in default is in use).
IsDefault bool `json:"isDefault"`
// the built-in default Markdown (for preview and reset-to-default).
DefaultMarkdown string `json:"defaultMarkdown"`
// the variables (placeholders) this template may use, with a description and an example.
Variables []*EmailTemplateVariable `json:"variables"`
}
EmailTemplate is one editable email body template (a Markdown *.md.tmpl). The built-in embedded template is the default; a stored override replaces it. The layout templates (emailBaseHTML/jiraOnHTML) are not editable here.
type EmailTemplateFunction ¶ added in v1.214.0
type EmailTemplateFunction struct {
// the function name, e.g. "plural".
Name string `json:"name"`
// how to call it, e.g. "{{ plural .N \"Platz\" \"Plätze\" }}".
Usage string `json:"usage"`
// what it does, in plain language.
Description string `json:"description"`
}
EmailTemplateFunction documents a helper function callable in every email template, e.g. `jiraURL` or `plural`. The list is global (all functions are available in all templates).
type EmailTemplatePreview ¶ added in v1.214.0
type EmailTemplatePreview struct {
// the rendered HTML part (the shared layout is applied), for an in-GUI preview.
HTML string `json:"html"`
// the rendered plain-text part.
Text string `json:"text"`
// the error message if the template does not parse/execute; null on success.
Error *string `json:"error,omitempty"`
}
EmailTemplatePreview is the rendered result of a (possibly not-yet-saved) template against representative sample data. On a template error, `error` holds the message and html/text are empty — so the GUI can show parse/exec mistakes live while editing.
type EmailTemplateVariable ¶ added in v1.214.0
type EmailTemplateVariable struct {
// how to write it in the template, e.g. "{{ .Teacher.Fullname }}".
Name string `json:"name"`
// what the value is, in plain language.
Description string `json:"description"`
// the value used for this placeholder in the live preview.
Example string `json:"example"`
}
EmailTemplateVariable documents one placeholder available in a template, e.g. `.Teacher.Fullname`. Meant to be shown next to the editor so a non-technical user knows which values exist and how to write them.
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"`
// Recipient for the EXaHM/SEB room overview (KDP).
Kdp string `json:"kdp"`
// Recipient for the overview of LBAs' repeat exams (Lehrbeauftragten-Beauftragte:r).
Lbaba string `json:"lbaba"`
}
type EmailsInput ¶ added in v1.158.0
type EmailsInput 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"`
RoomManagement string `json:"roomManagement"`
Kdp string `json:"kdp"`
Lbaba string `json:"lbaba"`
}
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 ExamDurationOverride ¶ added in v1.173.0
type ExamPair ¶ added in v1.207.0
type ExamPair struct {
Ancode1 int `json:"ancode1"`
Module1 string `json:"module1"`
MainExamer1 string `json:"mainExamer1"`
Ancode2 int `json:"ancode2"`
Module2 string `json:"module2"`
MainExamer2 string `json:"mainExamer2"`
}
ExamPair is a pair of exams with display info (for canShareSlot lists/suggestions).
type ExamPlanningMailExam ¶ added in v1.194.0
type ExamPlanningMailExam struct {
Ancode int `json:"ancode"`
Module string `json:"module"`
// Human-readable exam type (ZPA full name).
ExamType string `json:"examType"`
Constraints *Constraints `json:"constraints,omitempty"`
}
One exam I plan for an examer, for the planning info email (no slot/date).
type ExamPlanningMailRecipient ¶ added in v1.194.0
type ExamPlanningMailRecipient struct {
Teacher *Teacher `json:"teacher"`
// withExams = I plan at least one of their exams; fk07NoExams = FK07 examer I plan nothing for.
Category string `json:"category"`
// The exams I plan for this examer (empty for fk07NoExams).
Exams []*ExamPlanningMailExam `json:"exams"`
}
type ExamScheduleConflict ¶ added in v1.207.0
type ExamScheduleConflict struct {
Ancode1 int `json:"ancode1"`
Module1 string `json:"module1"`
MainExamer1 string `json:"mainExamer1"`
// the study groups exam 1 is offered for (e.g. ["IF2A"]).
Groups1 []string `json:"groups1"`
// true if exam 1 is a repeater exam.
IsRepeaterExam1 bool `json:"isRepeaterExam1"`
// exam 1's campus/location (empty = default campus Lothstraße).
Location1 string `json:"location1"`
// the planned slot of exam 1.
Slot1 *Slot `json:"slot1"`
Ancode2 int `json:"ancode2"`
Module2 string `json:"module2"`
MainExamer2 string `json:"mainExamer2"`
Groups2 []string `json:"groups2"`
IsRepeaterExam2 bool `json:"isRepeaterExam2"`
Location2 string `json:"location2"`
Slot2 *Slot `json:"slot2"`
// number of students registered in both, in the plan.
StudentCount int `json:"studentCount"`
// worst proximity across affected students: SAME_SLOT | ADJACENT | SAME_DAY.
Proximity string `json:"proximity"`
CanShareSlot bool `json:"canShareSlot"`
// true if BOTH exams are external (planned by another faculty): information only.
InfoOnly bool `json:"infoOnly"`
// the affected students (registered in both); acceptance is set per student here.
AffectedStudents []*ConflictStudent `json:"affectedStudents"`
// status relative to the currently saved plan, only set in a generation report: "new"
// (not in the saved plan), "worse"/"better" (proximity changed), "unchanged", or
// "resolved" (was in the saved plan, gone now). Empty outside a diff context.
DiffStatus string `json:"diffStatus"`
}
ExamScheduleConflict is a conflict in the CURRENT plan: two exams a student is registered in that ended up close in time, aggregated over all affected students. A conflict is only meaningful per student — the per-student acceptance lives on affectedStudents.
type ExamScheduleDiagnostics ¶ added in v1.207.0
type ExamScheduleDiagnostics struct {
Students int `json:"students"`
Pairs int `json:"pairs"`
SameSlot int `json:"sameSlot"`
Adjacent int `json:"adjacent"`
SameDay int `json:"sameDay"`
NextDay int `json:"nextDay"`
Within3 int `json:"within3"`
Further int `json:"further"`
StudentsWithAdjacent int `json:"studentsWithAdjacent"`
StudentsWithSameDay int `json:"studentsWithSameDay"`
WorstStudentPenalty float64 `json:"worstStudentPenalty"`
MaxSlotSeats int `json:"maxSlotSeats"`
SlotsUsed int `json:"slotsUsed"`
SlotsOverThreshold int `json:"slotsOverThreshold"`
MaxExamsPerSlot int `json:"maxExamsPerSlot"`
}
Quality report of a generated (or current) exam schedule.
type ExamScheduleReport ¶ added in v1.207.0
type ExamScheduleReport struct {
Units int `json:"units"`
Fixed int `json:"fixed"`
Placed int `json:"placed"`
Unplaced int `json:"unplaced"`
UnplacedAncodes []int `json:"unplacedAncodes"`
HardViolations []string `json:"hardViolations"`
Cost float64 `json:"cost"`
CostByConstraint []*ConstraintCost `json:"costByConstraint"`
Iterations int `json:"iterations"`
// the seed used — pass it back to reproduce this exact plan.
Seed int `json:"seed"`
StoppedEarly bool `json:"stoppedEarly"`
Written bool `json:"written"`
Diagnostics *ExamScheduleDiagnostics `json:"diagnostics"`
// conflicts of the generated schedule (to review/rate, also on a dry run). Each carries a diffStatus relative to the saved plan (new/worse/better/unchanged).
Conflicts []*ExamScheduleConflict `json:"conflicts"`
// conflicts that were in the saved plan but are gone in the generated one (diffStatus "resolved").
ResolvedConflicts []*ExamScheduleConflict `json:"resolvedConflicts"`
}
type ExamTime ¶ added in v1.93.0
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 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 GenerateAssembledExamsResult ¶ added in v1.204.0
type GenerateAssembledExamsResult struct {
// the new state (dirty=false).
State *AssembledExamsState `json:"state"`
// what changed vs the previously cached assembled exams (empty = nothing changed).
Changes []*AssembledExamsChange `json:"changes"`
}
type GeneratePreparationResult ¶ added in v1.203.0
type GeneratePreparationResult struct {
AssembledExams *GenerateAssembledExamsResult `json:"assembledExams"`
StudentRegs *GenerateStudentRegsResult `json:"studentRegs"`
}
type GenerateStudentRegsResult ¶ added in v1.174.0
type GenerateStudentRegsResult struct {
State *StudentRegsState `json:"state"`
// number of students with planned registrations after the (re)generation.
StudentCount int `json:"studentCount"`
}
type GenerationConfig ¶ added in v1.173.0
type GenerationConfig struct {
// minutes buffer between two uses of a room / between invigilations.
TimelagMin int `json:"timelagMin"`
Iterations int `json:"iterations"`
StartTemp float64 `json:"startTemp"`
EndTemp float64 `json:"endTemp"`
// allowed deviation (minutes) from an invigilator's target workload.
ToleranceMin int `json:"toleranceMin"`
MaxSpanHours float64 `json:"maxSpanHours"`
WeightMinuteBalance float64 `json:"weightMinuteBalance"`
WeightBeyondTolerance float64 `json:"weightBeyondTolerance"`
WeightOverTargetFactor float64 `json:"weightOverTargetFactor"`
WeightCoverage float64 `json:"weightCoverage"`
WeightMaxDays float64 `json:"weightMaxDays"`
WeightPreferExamDays float64 `json:"weightPreferExamDays"`
WeightDistribution float64 `json:"weightDistribution"`
WeightDaySpan float64 `json:"weightDaySpan"`
}
type GenerationConfigInput ¶ added in v1.173.0
type GenerationConfigInput struct {
TimelagMin int `json:"timelagMin"`
Iterations int `json:"iterations"`
StartTemp float64 `json:"startTemp"`
EndTemp float64 `json:"endTemp"`
ToleranceMin int `json:"toleranceMin"`
MaxSpanHours float64 `json:"maxSpanHours"`
WeightMinuteBalance float64 `json:"weightMinuteBalance"`
WeightBeyondTolerance float64 `json:"weightBeyondTolerance"`
WeightOverTargetFactor float64 `json:"weightOverTargetFactor"`
WeightCoverage float64 `json:"weightCoverage"`
WeightMaxDays float64 `json:"weightMaxDays"`
WeightPreferExamDays float64 `json:"weightPreferExamDays"`
WeightDistribution float64 `json:"weightDistribution"`
WeightDaySpan float64 `json:"weightDaySpan"`
}
type ImportMucDaiResult ¶ added in v1.175.0
type ImportMucDaiResult struct {
// programs (Studiengruppen) found in the CSV.
Programs []string `json:"programs"`
// total exam rows imported into the mucdai_<program> collections.
ExamsImported int `json:"examsImported"`
// new non-ZPA exams created (non-FK07, not existing yet).
ExamsCreated int `json:"examsCreated"`
// non-FK07 exams that already existed (kept with their ancode).
ExamsExisting int `json:"examsExisting"`
// FK07 exams skipped (they exist as ZPA exams, only linked).
ExamsSkippedFk07 int `json:"examsSkippedFK07"`
// assembled exams of the imported programs removed because they are no longer in the CSV (or flipped to FK07).
ExamsRemoved int `json:"examsRemoved"`
}
type Invigilation ¶
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 assignInvigilations subscription (also for dryRun, where nothing is written to the database).
type InvigilationSlot ¶
type InvigilationSlot struct {
Reserve *Teacher `json:"reserve,omitempty"`
// true if the reserve invigilation in this slot is pre-planned (fixed).
ReservePrePlanned bool `json:"reservePrePlanned"`
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 InvigilationTimeWindowInput ¶ added in v1.139.0
type InvigilationTimeWindowInput struct {
Date time.Time `json:"date"`
From *time.Time `json:"from,omitempty"`
Until *time.Time `json:"until,omitempty"`
}
date is the calendar day; from/until are clock times on that day (at least one of from/until must be set).
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 InvigilatorConstraints ¶ added in v1.139.0
type InvigilatorConstraints struct {
TeacherID int `json:"teacherID"`
IsNotInvigilator bool `json:"isNotInvigilator"`
ExcludedDates []time.Time `json:"excludedDates"`
TimeWindows []*InvigilationTimeWindow `json:"timeWindows"`
}
InvigilatorConstraints are the per-invigilator constraints kept in the DB and edited via the GUI, separate from the ZPA-sourced invigilator_requirements (which is overwritten on every ZPA pull). They are merged on top of the ZPA requirements when building an invigilator.
type InvigilatorConstraintsInput ¶ added in v1.139.0
type InvigilatorConstraintsInput struct {
TeacherID int `json:"teacherID"`
IsNotInvigilator bool `json:"isNotInvigilator"`
ExcludedDates []*time.Time `json:"excludedDates"`
TimeWindows []*InvigilationTimeWindowInput `json:"timeWindows"`
}
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.
func (LogLevel) MarshalGQL ¶ added in v1.98.0
func (LogLevel) MarshalJSON ¶ added in v1.98.0
func (*LogLevel) UnmarshalGQL ¶ added in v1.98.0
func (*LogLevel) UnmarshalJSON ¶ added in v1.98.0
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"`
ExamReport *ExamScheduleReport `json:"examReport,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"`
// the responsible faculty (Prüfungsplanung), e.g. FK07 / FK03 / FK08 / FK12.
PlannedBy string `json:"plannedBy"`
// Ancode of the created/linked exam: our ZPA ancode for FK07-planned exams, the
// auto-assigned ancode for exams planned by other faculties. null if not yet
// created/linked.
Ancode *int `json:"ancode,omitempty"`
// Link status to our data: "external" (auto-created external exam, linked), "zpa"
// (linked to a ZPA exam), or "unresolved" (FK07 exam with no clear ZPA match — needs
// manual linking).
LinkStatus string `json:"linkStatus"`
// The plan entry, if planned: dayNumber/slotNumber = my time, externalTime = the other faculty's time.
PlanEntry *PlanEntry `json:"planEntry,omitempty"`
}
type MutationLogArg ¶ added in v1.168.0
type MutationLogEntry ¶ added in v1.168.0
type MutationLogEntry struct {
Time time.Time `json:"time"`
// GraphQL operation/field name, e.g. addPreplanExam.
Name string `json:"name"`
// mutation | subscription
Type string `json:"type"`
// The call arguments, flattened to key/value pairs (nested input objects included).
Args []*MutationLogArg `json:"args"`
// Ancodes referenced by the arguments (ancode / zpaAncode / primussAncode / …).
Ancodes []int `json:"ancodes"`
// Set when the operation returned an error (for subscriptions only the start error, if any).
Error *string `json:"error,omitempty"`
DurationMs int `json:"durationMs"`
}
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 ¶
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 NtaRoomAloneWaiver ¶ added in v1.131.0
type OptimizerConstraint ¶ added in v1.207.0
type OptimizerConstraint struct {
Name string `json:"name"`
Title string `json:"title"`
Description string `json:"description"`
// hard | soft
Kind string `json:"kind"`
// soft-constraint weight (0 for hard).
Weight float64 `json:"weight"`
// display priority (lower = more important).
Tier int `json:"tier"`
}
OptimizerConstraint describes one applied constraint (for the read-only view).
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 PermanentNonInvigilator ¶ added in v1.140.0
type PermanentNonInvigilator struct {
TeacherID int `json:"teacherID"`
// Name is a denormalized display name, so the entry stays readable even when
// the teacher has left the FK07 invigilator pool (then they are no longer in
// invigilatorCandidates and the GUI could not resolve a name).
Name string `json:"name"`
Reason string `json:"reason"`
}
PermanentNonInvigilator is a teacher who never does invigilation duty again (e.g. retired). Unlike the per-semester invigilator constraints, this lives in the global "plexams" database and therefore carries over from semester to semester. It always implies isNotInvigilator.
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"`
// PhaseFixed marks an entry fixed by the EXaHM/SEB room phase (phase A) — distinct
// from Locked (the user's explicit manual lock). Phase B treats it as immovable.
PhaseFixed bool `json:"phaseFixed"`
}
func (*PlanEntry) InSlot ¶ added in v1.208.0
InSlot reports whether this entry is placed in one of our real exam slots. It is false for an external exam whose time lies outside our exam period: such an entry has no slot (DayNumber/SlotNumber 0) and carries only ExternalTime. Use this instead of comparing DayNumber/SlotNumber to the 0/0 sentinel by hand.
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 PlanningCondition ¶ added in v1.121.0
type PlanningCondition struct {
Key string `json:"key"`
Title string `json:"title"`
Phase string `json:"phase"`
// true when the condition (milestone) is reached.
Done bool `json:"done"`
// If set, the area this condition gates while done (e.g. ROOMS, INVIGILATIONS); null if it is not a gate.
Gate *PlanningGate `json:"gate,omitempty"`
}
type PlanningGate ¶ added in v1.121.0
type PlanningGate string
Areas that can be locked by a published gate.
const ( PlanningGateExams PlanningGate = "EXAMS" PlanningGateRooms PlanningGate = "ROOMS" PlanningGateInvigilations PlanningGate = "INVIGILATIONS" )
func (PlanningGate) IsValid ¶ added in v1.121.0
func (e PlanningGate) IsValid() bool
func (PlanningGate) MarshalGQL ¶ added in v1.121.0
func (e PlanningGate) MarshalGQL(w io.Writer)
func (PlanningGate) MarshalJSON ¶ added in v1.121.0
func (e PlanningGate) MarshalJSON() ([]byte, error)
func (PlanningGate) String ¶ added in v1.121.0
func (e PlanningGate) String() string
func (*PlanningGate) UnmarshalGQL ¶ added in v1.121.0
func (e *PlanningGate) UnmarshalGQL(v any) error
func (*PlanningGate) UnmarshalJSON ¶ added in v1.121.0
func (e *PlanningGate) UnmarshalJSON(b []byte) error
type PlanningPhase ¶ added in v1.121.0
type PlanningPhase struct {
Key string `json:"key"`
Title string `json:"title"`
Conditions []*PlanningCondition `json:"conditions"`
}
type PlanningState ¶ added in v1.121.0
type PlanningState struct {
Phases []*PlanningPhase `json:"phases"`
// Areas whose generation is currently locked because a gate condition is set.
BlockedAreas []PlanningGate `json:"blockedAreas"`
}
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 PreplanExam ¶ added in v1.160.0
type PreplanExam struct {
// ID is a synthetic per-semester key (assigned on creation).
ID int `json:"id" bson:"id"`
ExamKind string `json:"examKind" bson:"examkind"` // "EXaHM" | "SEB"
// ExamerID links to a Teacher; ExamerName is a snapshot for display.
ExamerID int `json:"examerID" bson:"examerid"`
ExamerName string `json:"examerName" bson:"examername"`
Module string `json:"module" bson:"module"`
Programs []string `json:"programs" bson:"programs"` // StudyProgram shortnames
ExpectedStudents int `json:"expectedStudents" bson:"expectedstudents"`
Duration *int `json:"duration,omitempty" bson:"duration,omitempty"`
// PlannedDayNumber / PlannedSlotNumber assign the pre-exam to a slot (both nil
// = not yet slotted).
PlannedDayNumber *int `json:"plannedDayNumber,omitempty" bson:"planneddaynumber,omitempty"`
PlannedSlotNumber *int `json:"plannedSlotNumber,omitempty" bson:"plannedslotnumber,omitempty"`
// IsFixed pins the current slot: it survives a re-run of the automatic
// assignment (which otherwise re-plans all non-fixed pre-exams).
IsFixed bool `json:"isFixed" bson:"isfixed"`
// NotSameSlot holds PRE-EXAM ids that should NOT run at the same time as this one
// (same students, even when the study program does not show it). Kept symmetric.
// Soft: the solver spreads them apart (different days, else max slot distance).
NotSameSlot []int `json:"notSameSlot,omitempty" bson:"notsameslot,omitempty"`
// one despite sharing a study program (no common students). Kept symmetric. It
// cancels the program-based spreading penalty for that pair.
CanShareSlot []int `json:"canShareSlot,omitempty" bson:"canshareslot,omitempty"`
// Ancode is set once the pre-exam is linked to a real ZPA exam (phase 4).
Ancode *int `json:"ancode,omitempty" bson:"ancode,omitempty"`
Notes string `json:"notes,omitempty" bson:"notes,omitempty"`
// Constraints captured during pre-planning (carried over to the ZPA exam on
// linking). In Constraints.SameSlot the ints are PRE-EXAM ids, not ancodes.
Constraints *Constraints `json:"constraints,omitempty" bson:"constraints,omitempty"`
}
PreplanExam is a manually entered pseudo-exam for the SEB/EXaHM pre-planning of the (next) semester, captured before the ZPA exam list and Primuss data exist. It lives in the semester's own database (collection preplan_exams). Once the real ZPA exams are imported, a PreplanExam is linked to its ancode (phase 4).
type PreplanExamInput ¶ added in v1.160.0
type PreplanKindNeed ¶ added in v1.160.0
type PreplanKindNeed struct {
ExamCount int `json:"examCount"`
SeatsNeeded int `json:"seatsNeeded"`
// Greedily suggested number of rooms of this kind to cover the seats.
RoomsSuggested int `json:"roomsSuggested"`
// Names of the suggested rooms (largest first).
Rooms []string `json:"rooms"`
// Total seats available across all rooms of this kind (per slot ceiling).
SeatsAvailable int `json:"seatsAvailable"`
// Seats already booked in Anny for this slot (0 for the unslotted bucket).
SeatsBooked int `json:"seatsBooked"`
// Rooms still to book in Anny to cover the demand (largest first); empty when enough is booked.
RoomsToBook []string `json:"roomsToBook"`
}
type PreplanOverview ¶ added in v1.160.0
type PreplanOverview struct {
Slots []*PreplanSlotNeed `json:"slots"`
}
type PreplanProgramConflict ¶ added in v1.160.0
type PreplanSameSlotGroup ¶ added in v1.191.0
type PreplanSameSlotGroup struct {
Members []*PreplanSameSlotMember `json:"members"`
// true when every member is connected (the same-slot is fully carried over to the ZPA exams).
Complete bool `json:"complete"`
}
type PreplanSameSlotMember ¶ added in v1.191.0
type PreplanSlotNeed ¶ added in v1.160.0
type PreplanSlotNeed struct {
// null day/slot = the bucket of pre-exams without a slot yet.
DayNumber *int `json:"dayNumber,omitempty"`
SlotNumber *int `json:"slotNumber,omitempty"`
Starttime *time.Time `json:"starttime,omitempty"`
Exahm *PreplanKindNeed `json:"exahm"`
Seb *PreplanKindNeed `json:"seb"`
// Programs that appear in more than one pre-exam of this slot (possible clash).
Conflicts []*PreplanProgramConflict `json:"conflicts"`
}
type PreplanValidation ¶ added in v1.162.0
type PreplanValidation struct {
// True when there are no findings (everything assigned, within capacity, no overlaps).
Ok bool `json:"ok"`
AssignedCount int `json:"assignedCount"`
// ids of pre-exams without a slot.
UnassignedIDs []int `json:"unassignedIDs"`
// Human-readable findings (German).
Messages []string `json:"messages"`
}
type PrimussExam ¶
type PrimussExamAncode ¶
type PrimussExamByProgram ¶
type PrimussExamByProgram struct {
Program string `json:"program"`
Exams []*PrimussExamWithCount `json:"exams"`
}
type PrimussExamInput ¶
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"`
// true if this Primuss exam is connected to a ZPA or external (MUC.DAI) exam.
Connected bool `json:"connected"`
// true if connected to a ZPA exam selected to be planned by us (a subset of connected; false for external/MUC.DAI links or not-to-plan ZPA exams).
PlannedZpa bool `json:"plannedZPA"`
}
type RegWithError ¶
type RegWithError struct {
Registration *ZPAStudentReg `json:"registration"`
Error *ZPAStudentRegError `json:"error"`
}
type RegWithProgram ¶ added in v1.57.0
type RemovedPrimussExam ¶
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"`
// extra seats to reserve on top of the registered students (capacity buffer).
AdditionalSeats *int `json:"additionalSeats,omitempty"`
Comments *string `json:"comments,omitempty"`
}
type RoomInSlotUsage ¶ added in v1.130.0
type RoomInSlotUsage struct {
Ancode int `json:"ancode"`
Module string `json:"module"`
Examer string `json:"examer"`
StudentCount int `json:"studentCount"`
}
One exam's use of a room in a slot.
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"`
// Lower number = preferred when generating room requests. Optional; defaults to 0 (irrelevant when requestWith is NONE).
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 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 RoomWithFreeSeats ¶ added in v1.130.0
type RoomWithFreeSeats struct {
RoomName string `json:"roomName"`
Seats int `json:"seats"`
UsedSeats int `json:"usedSeats"`
FreeSeats int `json:"freeSeats"`
// handicap = true: NTA room, only for NTAs (not for normal students / non-NTA reserve).
Handicap bool `json:"handicap"`
Exahm bool `json:"exahm"`
Lab bool `json:"lab"`
Seb bool `json:"seb"`
// The exams already using this room in the slot (empty if the room is still free).
UsedBy []*RoomInSlotUsage `json:"usedBy"`
}
A room allowed in a slot, with its free seats and the exams already using it.
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"`
// true if the invigilation for this room in this slot is pre-planned (fixed).
PrePlanned bool `json:"prePlanned"`
}
type RoomsForSlot ¶ added in v1.31.0
type SaveSemesterConfigResult ¶ added in v1.158.0
type Semester ¶
type Semester struct {
// the database label (e.g. '2026 SS' or a clone '2026 SS-Test'); selects the database.
ID string `json:"id"`
// the logical semester used against external systems (ZPA), e.g. '2026 SS' — for a clone this stays the real semester, not the database name.
Semester *string `json:"semester,omitempty"`
// false for databases that cannot be used with this code (no semester config).
Compatible bool `json:"compatible"`
// true when the database is protected: it can be selected, but all mutations fail.
ReadOnly bool `json:"readOnly"`
// data schema version of the database (null when unknown/never stamped).
SchemaVersion *int `json:"schemaVersion,omitempty"`
}
type SemesterConfig ¶
type SemesterConfig struct {
Days []*ExamDay `json:"days"`
Starttimes []*Starttime `json:"starttimes"`
Slots []*Slot `json:"slots"`
MucDaiSlotsRaw [][]int `json:"mucDaiSlotsRaw,omitempty"`
MucDaiSlots []*Slot `json:"mucDaiSlots"`
ForbiddenSlots []*Slot `json:"forbiddenSlots,omitempty"`
From time.Time `json:"from"`
Until time.Time `json:"until"`
Emails *Emails `json:"emails"`
// Effective travel/break buffer (minutes) between a student's consecutive exams.
ExamGapMinutes int `json:"examGapMinutes"`
}
type SemesterConfigInput ¶ added in v1.158.0
type SemesterConfigInput struct {
// From is the start of the planning period; day 1 = from. Exams of other
// faculties may have earlier dates (or a negative day number); there is no
// pre-period and no check for that.
From time.Time `json:"from" bson:"from"`
Until time.Time `json:"until" bson:"until"`
// Slots are the daily slot start times as "HH:MM".
Slots []string `json:"slots" bson:"slots"`
// ForbiddenDays are full days inside the planning window on which no exams may
// be scheduled.
ForbiddenDays []time.Time `json:"forbiddenDays,omitempty" bson:"forbiddenDays,omitempty"`
// MucDaiSlots are the slots reserved for MUC.DAI exams, as absolute
// [dayNumber, slotNumber] pairs (day 1 = from).
MucDaiSlots [][]int `json:"mucDaiSlots,omitempty" bson:"mucDaiSlots,omitempty"`
Emails *Emails `json:"emails" bson:"emails"`
// ExamGapMinutes is the travel/break buffer a student needs between two of their
// consecutive exams (nil = use the built-in default). See defaultExamGapMinutes.
ExamGapMinutes *int `json:"examGapMinutes,omitempty" bson:"examGapMinutes,omitempty"`
}
SemesterConfigInput holds the raw, editable per-semester configuration — the values that used to live in <semester>.yaml. It is the source of truth from which the derived SemesterConfig (days, slots, MUC.DAI slots, forbidden slots) is computed in deriveSemesterConfig. It is persisted in the per-semester DB (collection semester_config_input).
type SemesterConfigInputData ¶ added in v1.158.0
type SemesterConfigInputData struct {
From time.Time `json:"from"`
Until time.Time `json:"until"`
Slots []string `json:"slots"`
ForbiddenDays []*time.Time `json:"forbiddenDays,omitempty"`
// MUC.DAI slots as absolute [dayNumber, slotNumber] pairs (day 1 = from).
MucDaiSlots [][]int `json:"mucDaiSlots,omitempty"`
Emails *EmailsInput `json:"emails"`
// Travel/break buffer (minutes) a student needs between two consecutive exams (null = default).
ExamGapMinutes *int `json:"examGapMinutes,omitempty"`
}
type SoftCostItem ¶ added in v1.98.0
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 SpecialInterest ¶ added in v1.173.0
type SpecialInterestInput ¶ added in v1.173.0
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 StudentConflictDecision ¶ added in v1.207.0
type StudentConflictDecision struct {
Ancode1 int `json:"ancode1"`
Ancode2 int `json:"ancode2"`
Mtknr string `json:"mtknr"`
Decision ConflictDecision `json:"decision"`
}
StudentConflictDecision is a stored explicit decision for one student's conflict pair.
type StudentReg ¶
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 StudentRegsState ¶ added in v1.174.0
type StudyProgram ¶ added in v1.159.0
type StudyProgram struct {
// Shortname (Kürzel, e.g. "IF") is the unique key.
Shortname string `json:"shortname" bson:"shortname"`
Name string `json:"name" bson:"name"`
// Degree, e.g. "Bachelor" / "Master" (optional).
Degree *string `json:"degree,omitempty" bson:"degree,omitempty"`
// Category groups the program by origin: "fk07" | "mucdai" | "misc".
Category string `json:"category" bson:"category"`
Active bool `json:"active" bson:"active"`
// Retired marks a discontinued program. A retired fk07 program is treated as
// an "old program" (no longer planned, but still relevant for old exams).
Retired bool `json:"retired" bson:"retired"`
// ExternalExamsBase is the base ancode for external (e.g. MUC.DAI) exams of this
// program: the local ZPA ancode is base + primussAncode. Only relevant for
// programs whose exams are imported externally (mucdai/misc).
ExternalExamsBase *int `json:"externalExamsBase,omitempty" bson:"externalExamsBase,omitempty"`
}
StudyProgram (Studiengang) is a first-class, semester-independent entity. It lives in the global "plexams" database and is used e.g. by the SEB/EXaHM pre-planning to foresee program overlaps before Primuss data exists. Until now programs were only strings derived from primuss collections / config.
type StudyProgramInput ¶ added in v1.159.0
type Subscription ¶ added in v1.98.0
type Subscription struct {
}
type SyncChangeEntry ¶ added in v1.156.0
type SyncChangeEntry struct {
Type string `json:"type"` // "added" | "removed" | "changed"
Name string `json:"name"`
Fields []*SyncFieldChange `json:"fields,omitempty"`
}
SyncChangeEntry is one added / removed / changed entry of an import. Fields is only set for changed entries.
type SyncFieldChange ¶ added in v1.156.0
type SyncFieldChange struct {
Field string `json:"field"`
Old string `json:"old"`
New string `json:"new"`
}
SyncFieldChange is a single field that changed (old → new).
type SyncLogEntry ¶ added in v1.156.0
type SyncLogEntry struct {
Time time.Time `json:"time"`
Operation string `json:"operation"` // stable key, e.g. "zpa-import-exams", "zpa-upload-rooms", "anny-import"
Label string `json:"label"` // human-readable label
Direction string `json:"direction"` // "import" | "upload"
System string `json:"system"` // "ZPA" | "Anny" | …
OK bool `json:"ok"`
Summary string `json:"summary"`
// For imports: how many entries were added / changed / removed, and the
// per-entry detail. Empty / nil for uploads.
Added int `json:"added"`
Changed int `json:"changed"`
Removed int `json:"removed"`
Entries []*SyncChangeEntry `json:"entries,omitempty"`
}
SyncLogEntry records one external transfer (import from / upload to ZPA, Anny, …). The collection keeps the full history since the start of the semester, so the GUI can show the last sync per operation and a timeline.
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 UnplacedExam ¶ added in v1.137.1
type UnplacedExam struct {
Ancode int `json:"ancode"`
Day int `json:"day"`
Slot int `json:"slot"`
Mtknrs []string `json:"mtknrs"`
NtaMtknr *string `json:"ntaMtknr,omitempty"`
}
UnplacedExam records students of an exam that could not be assigned a real room in their slot during room generation. They are deliberately kept out of planned_rooms — which therefore only ever holds real rooms — and surfaced by the rooms validation (and the unplacedExams query) instead of a "No Room" placeholder room.
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"`
InfoCount int `json:"infoCount"`
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 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"`
// Faculty is the responsible faculty (Prüfungsplanung), e.g. FK03/FK08/FK12 for
// external MUC.DAI exams. Empty for our own FK07 exams (ZPA does not send it); it
// is stamped onto generated external exams from the StudyProgram master data.
Faculty string `json:"faculty,omitempty"`
}
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 ZPAExamWithConstraints ¶
type ZPAExamWithConstraints struct {
ZpaExam *ZPAExam `json:"zpaExam"`
Constraints *Constraints `json:"constraints,omitempty"`
PlanEntry *PlanEntry `json:"planEntry,omitempty"`
}