Documentation
¶
Index ¶
- Variables
- type AddedPrimussAncode
- type AnCode
- type AnnyBooking
- type BalanceReport
- type BlockedRoom
- type Conflict
- type ConflictPerProgram
- type Conflicts
- type ConflictsPerProgramAncode
- type ConnectedExam
- type Constraints
- type ConstraintsInput
- type CoverageReport
- type DistributionBucket
- type EmailAttachmentInfo
- type Emails
- type EnhancedPrimussExam
- type EnhancedStudentReg
- type ExamDay
- type ExamTime
- type ExamWithRegsAndRooms
- type ExamerInPlan
- type FK07Program
- type FairnessDistribution
- type GeneratedExam
- type Invigilation
- type InvigilationReport
- type InvigilationSlot
- type InvigilationTimeWindow
- type InvigilationTodos
- type Invigilator
- type InvigilatorOutlier
- type InvigilatorRequirements
- type InvigilatorTodos
- type InvigilatorsForDay
- type LogLevel
- type LogLine
- type MinutesReport
- type MucDaiExam
- type Mutation
- type NTA
- type NTAInput
- type NTAWithRegs
- type NTAWithRegsByExam
- type NTAWithRegsByExamAndTeacher
- type NtaRoomAloneWaiver
- type OptimizerProgress
- type PlanEntry
- type PlannedExam
- type PlannedRoom
- type PlanningCondition
- type PlanningGate
- type PlanningPhase
- type PlanningState
- type PreExam
- type PrePlannedInvigilation
- type PrePlannedRoom
- 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 Semester
- type SemesterConfig
- type Slot
- type SlotInput
- type SoftCostItem
- type SoftCostReport
- type Starttime
- type Step
- type Student
- type StudentReg
- type StudentRegsForAncode
- type StudentRegsPerAncode
- type StudentRegsPerAncodeAndProgram
- type StudentRegsPerStudent
- type Subscription
- type Teacher
- 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 AllLogLevel = []LogLevel{ LogLevelInfo, LogLevelWarn, LogLevelError, LogLevelProgress, LogLevelResult, LogLevelDone, }
var AllPlanningGate = []PlanningGate{ 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 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 ConflictPerProgram ¶
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
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 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 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 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 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"`
// 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 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.
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"`
}
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 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 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 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 ( 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 PrimussExam ¶
type PrimussExamAncode ¶
type PrimussExamByProgram ¶
type PrimussExamByProgram struct {
Program string `json:"program"`
Exams []*PrimussExamWithCount `json:"exams"`
}
type PrimussExamInput ¶
type PrimussExamWithCount ¶
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"`
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 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 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 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 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 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 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 ZPAExamWithConstraints ¶
type ZPAExamWithConstraints struct {
ZpaExam *ZPAExam `json:"zpaExam"`
Constraints *Constraints `json:"constraints,omitempty"`
PlanEntry *PlanEntry `json:"planEntry,omitempty"`
}