Documentation
¶
Index ¶
- Constants
- Variables
- func CSVDatasetNames() []string
- func DatasetNames() []string
- type AssembledExamMailData
- type CSVImportResult
- type ConsoleReporter
- func (r *ConsoleReporter) Printf(format string, a ...any)
- func (r *ConsoleReporter) Println(a ...any)
- func (r *ConsoleReporter) Progress(p invigplan.Progress)
- func (r *ConsoleReporter) Step(msg string)
- func (r *ConsoleReporter) StopProgress(finalMsg string)
- func (r *ConsoleReporter) StopProgressFail(finalMsg string)
- func (r *ConsoleReporter) Warnf(format string, a ...any)
- type ConstraintsEmail
- type CoverMailData
- type CsvLBARepeater
- type Email
- type ExahmEmail
- type ExamScheduleResult
- type ExportNtas
- type ExportPlannedRooms
- type InvigilationMissingMailData
- type InvigilationsEmail
- type NTAEmail
- type NTAEmailExamAndRoom
- type NTAEmailWithRooms
- type NewNTA
- type Planer
- type Plexams
- func (p *Plexams) AddAncode(ctx context.Context, zpaAncode int, program string, primussAncode int) error
- func (p *Plexams) AddConstraints(ctx context.Context, ancode int, constraintsInput model.ConstraintsInput) (*model.Constraints, error)
- func (p *Plexams) AddExamToSlottime(ctx context.Context, ancode int, slottime time.Time) (bool, error)
- func (p *Plexams) AddInvigilation(ctx context.Context, room string, starttime time.Time, invigilatorID int) error
- func (p *Plexams) AddInvigilatorsToInvigilationTodos(ctx context.Context, todos *model.InvigilationTodos) error
- func (p *Plexams) AddMucDaiExam(ctx context.Context, zpaAncode int, mucdaiExam *model.MucDaiExam) (*model.ZPAExam, error)
- func (p *Plexams) AddMucDaiExamByProgram(ctx context.Context, mucdaiExam *model.MucDaiExam) (*model.ZPAExam, error)
- func (p *Plexams) AddNta(ctx context.Context, input model.NTAInput) (*model.NTA, error)
- func (p *Plexams) AddNtaRoomAloneWaiver(ctx context.Context, mtknr string, ancode int, reason string) (*model.NtaRoomAloneWaiver, error)
- func (p *Plexams) AddPreplanExam(ctx context.Context, input *model.PreplanExamInput) (*model.PreplanExam, error)
- func (p *Plexams) AddPrimussAncode(ctx context.Context, zpaAncode int, program string, primussAncode int) (*model.ConnectedExam, error)
- func (p *Plexams) AddRoom(ctx context.Context, input model.RoomInput) (*model.Room, error)
- func (p *Plexams) AddRoomRequest(ctx context.Context, room string, starttime time.Time, from, until time.Time) (*model.RoomRequest, error)
- func (p *Plexams) AddStudentReg(ctx context.Context, program string, ancode int, mtknr string) error
- func (p *Plexams) AddZpaExamToPlan(ctx context.Context, ancode int) (bool, error)
- func (p *Plexams) AdditionalExams(ctx context.Context) ([]*model.AdditionalExam, error)
- func (p *Plexams) AllAnnyBookings(ctx context.Context) ([]*model.AnnyBooking, error)
- func (p *Plexams) AllProgramsInPlan(ctx context.Context) ([]string, error)
- func (p *Plexams) AllowedSlots(ctx context.Context, ancode int) ([]*model.Slot, error)
- func (p *Plexams) AncodesInPlan(ctx context.Context) ([]int, error)
- func (p *Plexams) AnnyBookings(ctx context.Context, room *string) ([]*model.AnnyBooking, error)
- func (p *Plexams) AnnyConfig(ctx context.Context) (*model.AnnyConfig, error)
- func (p *Plexams) ApplyRoomRequestsPreview(ctx context.Context, force bool) (int, error)
- func (p *Plexams) AssembledExam(ctx context.Context, ancode int) (*model.AssembledExam, error)
- func (p *Plexams) AssembledExams(ctx context.Context) ([]*model.AssembledExam, error)
- func (p *Plexams) AssembledExamsForExamer(ctx context.Context, examerID int) ([]*model.AssembledExam, error)
- func (p *Plexams) AssembledExamsState(ctx context.Context) (*model.AssembledExamsState, error)
- func (p *Plexams) AssignInvigilations(ctx context.Context, dryRun bool, opts invigplan.Options, reporter Reporter) (*model.InvigilationReport, error)
- func (p *Plexams) AwkwardSlots(ctx context.Context, ancode int) ([]*model.Slot, error)
- func (p *Plexams) BeginMailCollection()
- func (p *Plexams) BlockRoomForSlot(ctx context.Context, room string, starttime time.Time, reason *string) (*model.BlockedRoom, error)
- func (p *Plexams) BlockedRooms(ctx context.Context) ([]*model.BlockedRoom, error)
- func (p *Plexams) CanShareSlotSuggestions(ctx context.Context) ([]*model.ExamPair, error)
- func (p *Plexams) ChangeAncode(ctx context.Context, program string, ancode, newAncode int) (*model.PrimussExam, error)
- func (p *Plexams) ChangeAncodeInConflicts(ctx context.Context, program string, ancode, newAncode int) (*model.Conflicts, error)
- func (p *Plexams) ChangeAncodeInStudentRegs(ctx context.Context, program string, ancode, newAncode int) ([]*model.StudentReg, error)
- func (p *Plexams) ClearEmailAttachments(ctx context.Context, kind string) (int, error)
- func (p *Plexams) ConflictingAncodes(ctx context.Context, ancode int) ([]*model.Conflict, error)
- func (p *Plexams) ConnectExam(ancode int, program string) error
- func (p *Plexams) ConnectPreplanExamToAncode(ctx context.Context, id, ancode int) (*model.PreplanExam, error)
- func (p *Plexams) ConstraintForAncode(ctx context.Context, ancode int) (*model.Constraints, error)
- func (p *Plexams) Constraints(ctx context.Context) ([]*model.Constraints, error)
- func (p *Plexams) ConstraintsMap(ctx context.Context) (map[int]*model.Constraints, error)
- func (p *Plexams) ConstraintsPDFBytes(ctx context.Context) ([]byte, error)
- func (p *Plexams) CreateSemester(ctx context.Context, semester string, data *model.SemesterConfigInputData) (*model.SaveSemesterConfigResult, error)
- func (p *Plexams) CreateSemesterFromInput(ctx context.Context, semester string, input *model.SemesterConfigInput) (*model.SaveSemesterConfigResult, error)
- func (p *Plexams) CreateWorkspace(ctx context.Context, database, fromSemester string) (*model.Semester, error)
- func (p *Plexams) CsvForEXaHMBytes(ctx context.Context) ([]byte, error)
- func (p *Plexams) CsvForLBARepeaterBytes(ctx context.Context) ([]byte, error)
- func (p *Plexams) CsvForProgramBytes(ctx context.Context, program string) ([]byte, error)
- func (p *Plexams) DatasetCSV(ctx context.Context, name string) ([]byte, string, error)
- func (p *Plexams) DatasetDumpJSON(ctx context.Context, name string) ([]byte, string, error)
- func (p *Plexams) DeleteAdditionalExam(ctx context.Context, ancode int) (bool, error)
- func (p *Plexams) DeleteInvigilatorConstraints(ctx context.Context, teacherID int) (bool, error)
- func (p *Plexams) DeletePreplanExam(ctx context.Context, id int) (bool, error)
- func (p *Plexams) DeleteSpecialInterest(ctx context.Context, name string) (bool, error)
- func (p *Plexams) DeleteStudyProgram(ctx context.Context, shortname string) (bool, error)
- func (p *Plexams) DisconnectPreplanExam(ctx context.Context, id int) (*model.PreplanExam, error)
- func (p *Plexams) DraftFSBytes(ctx context.Context) ([]byte, error)
- func (p *Plexams) DraftLbaRepBytes(ctx context.Context) ([]byte, error)
- func (p *Plexams) DraftSIZipBytes(ctx context.Context) ([]byte, error)
- func (p *Plexams) EmailAttachmentInfos(ctx context.Context, kind string) ([]*model.EmailAttachmentInfo, error)
- func (p *Plexams) EmailTemplateFunctions(_ context.Context) ([]*model.EmailTemplateFunction, error)
- func (p *Plexams) EmailTemplates(ctx context.Context) ([]*model.EmailTemplate, error)
- func (p *Plexams) EndExclusiveOp()
- func (p *Plexams) EndValidation()
- func (p *Plexams) Exahm(ctx context.Context, ancode int) (bool, error)
- func (p *Plexams) ExahmRoomsFromAnnyBookings(ctx context.Context) ([]anny.RoomBooking, error)
- func (p *Plexams) ExamDurationOverrides(ctx context.Context) ([]*model.ExamDurationOverride, error)
- func (p *Plexams) ExamInfo(ancode int) (string, error)
- func (p *Plexams) ExamPlanningMailRecipients(ctx context.Context) ([]*model.ExamPlanningMailRecipient, error)
- func (p *Plexams) ExamScheduleConflicts(ctx context.Context) ([]*model.ExamScheduleConflict, error)
- func (p *Plexams) ExamScheduleConstraints() []optimize.Info
- func (p *Plexams) ExamerInPlan(ctx context.Context) ([]*model.ExamerInPlan, error)
- func (p *Plexams) ExamersWithExamsPlannedByMe(ctx context.Context) ([]*model.Teacher, error)
- func (p *Plexams) ExamsAt(ctx context.Context, starttime time.Time) ([]*model.PlannedExam, error)
- func (p *Plexams) ExamsCanShareSlot(ctx context.Context) ([]*model.ExamPair, error)
- func (p *Plexams) ExamsWithNtas(ctx context.Context) ([]*model.PlannedExam, error)
- func (p *Plexams) ExamsWithoutDuration() (string, error)
- func (p *Plexams) ExamsWithoutSlot(ctx context.Context) ([]*model.PlannedExam, error)
- func (p *Plexams) ExportICSString(ctx context.Context, program string) (string, error)
- func (p *Plexams) FetchFromAnny(ctx context.Context, reporter Reporter) error
- func (p *Plexams) FixExamRoomsPhase(ctx context.Context) (int, error)
- func (p *Plexams) FixPrimussAncode(ctx context.Context, zpaAncode int, program string, fromAncode, toAncode int) (*model.ConnectedExam, error)
- func (p *Plexams) FlushMailCollection(reporter Reporter) error
- func (p *Plexams) GenerateAssembledExams(ctx context.Context) (*model.GenerateAssembledExamsResult, error)
- func (p *Plexams) GenerateExamRoomsPhase(ctx context.Context, dryRun bool, seed int64, iterations int, ...) (*ExamScheduleResult, error)
- func (p *Plexams) GenerateExamSchedule(ctx context.Context, dryRun bool, seed int64, iterations int, ...) (*ExamScheduleResult, error)
- func (p *Plexams) GenerateExamsToPlanPDFBytes(ctx context.Context) ([]byte, error)
- func (p *Plexams) GeneratePreparation(ctx context.Context) (*model.GeneratePreparationResult, error)
- func (p *Plexams) GeneratePreplanAssignment(ctx context.Context, keepAssigned bool) (*model.PreplanValidation, error)
- func (p *Plexams) GenerateRoomRequestsPreview(ctx context.Context) ([]*model.RoomRequestPreview, error)
- func (p *Plexams) GenerateStudentRegs(ctx context.Context) (*model.GenerateStudentRegsResult, error)
- func (p *Plexams) GenerationConfig(ctx context.Context) (*model.GenerationConfig, error)
- func (p *Plexams) GetAllSemesterNames(ctx context.Context) ([]*model.Semester, error)
- func (p *Plexams) GetConflicts(ctx context.Context, exam *model.PrimussExam) (*model.Conflicts, error)
- func (p *Plexams) GetConnectedExam(ctx context.Context, ancode int) (*model.ConnectedExam, error)
- func (p *Plexams) GetConnectedExams(ctx context.Context) ([]*model.ConnectedExam, error)
- func (p *Plexams) GetEmailAttachment(ctx context.Context, kind, key string) (*db.EmailAttachment, error)
- func (p *Plexams) GetEnhancedStudentRegs(ctx context.Context, program string, ancode int) ([]*model.EnhancedStudentReg, error)
- func (p *Plexams) GetFk07programs(ctx context.Context) ([]*model.FK07Program, error)
- func (p *Plexams) GetInvigilationTodos(ctx context.Context) (*model.InvigilationTodos, error)
- func (p *Plexams) GetInvigilator(ctx context.Context, invigilatorID int) (*model.Invigilator, error)
- func (p *Plexams) GetInvigilatorAt(ctx context.Context, roomname string, starttime time.Time) (*model.Teacher, error)
- func (p *Plexams) GetInvigilatorForRoom(ctx context.Context, name string, start time.Time) (*model.Teacher, error)
- func (p *Plexams) GetInvigilators(ctx context.Context) ([]*model.ZPAInvigilator, error)
- func (p *Plexams) GetPlaner(ctx context.Context) (*model.Planer, error)
- func (p *Plexams) GetPrimussExam(ctx context.Context, program string, ancode int) (*model.PrimussExam, error)
- func (p *Plexams) GetPrimussExamsForAncode(ctx context.Context, ancode int) ([]*model.PrimussExam, error)
- func (p *Plexams) GetReservations() (map[string][]TimeRange, error)
- func (p *Plexams) GetRoomInfo(roomName string) *model.Room
- func (p *Plexams) GetSemester(ctx context.Context) *model.Semester
- func (p *Plexams) GetSemesterConfig() *model.SemesterConfig
- func (p *Plexams) GetStudentRegs(ctx context.Context, exam *model.PrimussExam) ([]*model.StudentReg, error)
- func (p *Plexams) GetStudentRegsForAncode(ancode int) (*model.StudentRegsForAncode, error)
- func (p *Plexams) GetStudents(ctx context.Context, mtknr string) ([]*model.ZPAStudent, error)
- func (p *Plexams) GetStudentsFromZPA(ctx context.Context, reporter Reporter) (studentsFound int, studentsNotFound int, err error)
- func (p *Plexams) GetSupervisorRequirements(ctx context.Context) ([]*zpa.SupervisorRequirements, error)
- func (p *Plexams) GetTeacher(ctx context.Context, id int) (*model.Teacher, error)
- func (p *Plexams) GetTeacherIdByRegex(ctx context.Context, name string) (int, error)
- func (p *Plexams) GetTeachers(ctx context.Context, fromZpa *bool) ([]*model.Teacher, error)
- func (p *Plexams) GetZPAExam(ctx context.Context, ancode int) (*model.ZPAExam, error)
- func (p *Plexams) GetZPAExams(ctx context.Context, fromZpa *bool) ([]*model.ZPAExam, error)
- func (p *Plexams) GetZPAExamsGroupedByType(ctx context.Context) ([]*model.ZPAExamsForType, error)
- func (p *Plexams) GetZPAStudents(ctx context.Context) ([]*model.ZPAStudent, error)
- func (p *Plexams) GetZpaAnCodes(ctx context.Context) ([]*model.AnCode, error)
- func (p *Plexams) GetZpaAnCodesToPlan(ctx context.Context) ([]*model.AnCode, error)
- func (p *Plexams) GetZpaExamByAncode(ctx context.Context, ancode int) (*model.ZPAExam, error)
- func (p *Plexams) GetZpaExamsNotToPlan(ctx context.Context) ([]*model.ZPAExam, error)
- func (p *Plexams) GetZpaExamsToPlan(ctx context.Context) ([]*model.ZPAExam, error)
- func (p *Plexams) HTTPDownloadCSVDraft(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPDownloadDataset(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPDownloadDatasetCSV(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPDownloadICS(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPDownloadMyInputsCSV(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPDownloadPDF(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPDownloadPlannedRooms(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPDownloadSemesterDump(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPUploadDataset(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPUploadDatasetCSV(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPUploadEmailAttachment(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPUploadEmailAttachmentsZip(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPUploadPrimussZip(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPUploadSemesterDump(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) ImportDatasetCSV(ctx context.Context, name string, data []byte) (*CSVImportResult, error)
- func (p *Plexams) ImportExamsFromZPA(ctx context.Context, reporter Reporter) (int, error)
- func (p *Plexams) ImportInvigilatorRequirementsFromZPA(ctx context.Context, reporter Reporter) (int, error)
- func (p *Plexams) ImportMucDaiExams(ctx context.Context, csvText string) (*model.ImportMucDaiResult, error)
- func (p *Plexams) ImportPrimussDir(ctx context.Context, dir string) (*primuss.ImportResult, error)
- func (p *Plexams) ImportPrimussZip(ctx context.Context, zipData []byte) (*primuss.ImportResult, error)
- func (p *Plexams) ImportTeachersFromZPA(ctx context.Context, reporter Reporter) (int, error)
- func (p *Plexams) Invigilator(ctx context.Context, room string, starttime time.Time) (*model.Teacher, error)
- func (p *Plexams) InvigilatorCandidates(ctx context.Context) ([]*model.Teacher, error)
- func (p *Plexams) InvigilatorConstraints(ctx context.Context) ([]*model.InvigilatorConstraints, error)
- func (p *Plexams) InvigilatorICS(ctx context.Context, invigilatorID int) ([]byte, error)
- func (p *Plexams) InvigilatorsExcludedByConfig(ctx context.Context) ([]*model.Invigilator, error)
- func (p *Plexams) InvigilatorsForDay(ctx context.Context, date time.Time) (*model.InvigilatorsForDay, error)
- func (p *Plexams) InvigilatorsWithReq(ctx context.Context) ([]*model.Invigilator, error)
- func (p *Plexams) IsReadOnly() bool
- func (p *Plexams) Lab(ctx context.Context, ancode int) (bool, error)
- func (p *Plexams) LockExam(ctx context.Context, ancode int) (*model.PlanEntry, *model.AssembledExam, error)
- func (p *Plexams) LockPlan(ctx context.Context) error
- func (p *Plexams) LogMutation(ctx context.Context, entry *model.MutationLogEntry)
- func (p *Plexams) MakeSelfInvigilations(ctx context.Context) ([]*model.Invigilation, error)
- func (p *Plexams) MarkAssembledExamsDirty(ctx context.Context, reason string)
- func (p *Plexams) MarkStudentRegsDirty(ctx context.Context, reason string)
- func (p *Plexams) MucDaiExam(ctx context.Context, program string, ancode int) (*model.MucDaiExam, error)
- func (p *Plexams) MucDaiExamsForProgram(ctx context.Context, program string) ([]*model.MucDaiExam, error)
- func (p *Plexams) MucDaiZpaCandidates(ctx context.Context, program string, primussAncode int) ([]*model.ZPAExam, error)
- func (p *Plexams) MucdaiExams(ctx context.Context) ([]*model.MucDaiExam, error)
- func (p *Plexams) MutationLog(ctx context.Context, opType, name *string, ancode *int, ...) ([]*model.MutationLogEntry, error)
- func (p *Plexams) MutationLogNames(ctx context.Context) ([]string, error)
- func (p *Plexams) MyInputsCSVZip(ctx context.Context) ([]byte, error)
- func (p *Plexams) NewSemesterConfigDefaults(ctx context.Context) (*model.SemesterConfigInput, error)
- func (p *Plexams) NotPlannedByMe(ctx context.Context, ancode int, inFK *string) (bool, error)
- func (p *Plexams) Nta(ctx context.Context, mtknr string) (*model.NTAWithRegs, error)deprecated
- func (p *Plexams) NtaByMtknr(ctx context.Context, mtknr string) (*model.NTA, error)
- func (p *Plexams) NtaRoomAloneWaivers(ctx context.Context) ([]*model.NtaRoomAloneWaiver, error)
- func (p *Plexams) Ntas(ctx context.Context) ([]*model.NTA, error)
- func (p *Plexams) NtasWithRegs(ctx context.Context) ([]*model.Student, error)
- func (p *Plexams) Online(ctx context.Context, ancode int) (bool, error)
- func (p *Plexams) OptimizerOptionsFromConfig(ctx context.Context, seed int64, iterations int) invigplan.Options
- func (p *Plexams) PDFExportKinds() []string
- func (p *Plexams) PermanentNonInvigilators(ctx context.Context) ([]*model.PermanentNonInvigilator, error)
- func (p *Plexams) PersistSemester(ctx context.Context)
- func (p *Plexams) PlanEntries(ctx context.Context) ([]*model.PlanEntry, error)
- func (p *Plexams) PlannedAncodes() error
- func (p *Plexams) PlannedExam(ctx context.Context, ancode int) (*model.PlannedExam, error)
- func (p *Plexams) PlannedExams(ctx context.Context) ([]*model.PlannedExam, error)
- func (p *Plexams) PlannedExamsByExamer(ctx context.Context, examerID int) ([]*model.PlannedExam, error)
- func (p *Plexams) PlannedExamsForProgram(ctx context.Context, program string, onlyPlannedByMe bool) ([]*model.PlannedExam, error)
- func (p *Plexams) PlannedRoomForStudent(ctx context.Context, ancode int, mtknr string) (*model.PlannedRoom, error)
- func (p *Plexams) PlannedRoomInfo(roomName string) error
- func (p *Plexams) PlannedRoomNames(ctx context.Context) ([]string, error)
- func (p *Plexams) PlannedRoomNamesAt(ctx context.Context, starttime time.Time) ([]string, error)
- func (p *Plexams) PlannedRoomNamesInSlot(ctx context.Context, starttime time.Time) ([]string, error)
- func (p *Plexams) PlannedRooms(ctx context.Context) ([]*model.PlannedRoom, error)
- func (p *Plexams) PlannedRoomsAt(ctx context.Context, starttime time.Time) ([]*model.PlannedRoom, error)
- func (p *Plexams) PlannedRoomsForExport(ctx context.Context) ([]*ExportPlannedRooms, error)
- func (p *Plexams) PlannedRoomsInSlot(ctx context.Context, starttime time.Time) ([]*model.PlannedRoom, error)
- func (p *Plexams) PlannedRoomsJSON(ctx context.Context) ([]byte, error)
- func (p *Plexams) PlanningState(ctx context.Context) (*model.PlanningState, error)
- func (p *Plexams) PostStudentRegsToZPA(ctx context.Context, jsonOutputFile string, reporter Reporter) ([]*model.ZPAStudentReg, []*model.RegWithError, error)
- func (p *Plexams) PreAddInvigilation(ctx context.Context, invigilatorID int, starttime time.Time, roomName *string) (bool, error)
- func (p *Plexams) PreAddRoomToExam(ctx context.Context, ancode int, roomName string, mtknr *string, reserve bool, ...) (bool, error)
- func (p *Plexams) PreExamsAt(ctx context.Context, starttime time.Time) ([]*model.PreExam, error)
- func (p *Plexams) PrePlanInvigilationInSlot(ctx context.Context, starttime time.Time, roomName *string) (bool, error)
- func (p *Plexams) PrePlannedInvigilations(ctx context.Context) ([]*model.PrePlannedInvigilation, error)
- func (p *Plexams) PrePlannedInvigilationsForInvigilator(ctx context.Context, invigilatorID int) ([]*model.PrePlannedInvigilation, error)
- func (p *Plexams) PrePlannedRooms(ctx context.Context) ([]*model.PrePlannedRoom, error)
- func (p *Plexams) PrePlannedRoomsForExam(ctx context.Context, ancode int) ([]*model.PrePlannedRoom, error)
- func (p *Plexams) PrepareAssembledExams() error
- func (p *Plexams) PrepareInvigilationTodos(ctx context.Context) (*model.InvigilationTodos, error)
- func (p *Plexams) PrepareRoomForExams(ctx context.Context, reporter Reporter) error
- func (p *Plexams) PrepareSelfInvigilation() error
- func (p *Plexams) PrepareStudentRegs() error
- func (p *Plexams) PreplanExam(ctx context.Context, id int) (*model.PreplanExam, error)
- func (p *Plexams) PreplanExamAncodeSuggestions(ctx context.Context, id int) ([]*model.ZPAExam, error)
- func (p *Plexams) PreplanExams(ctx context.Context) ([]*model.PreplanExam, error)
- func (p *Plexams) PreplanOverview(ctx context.Context) (*model.PreplanOverview, error)
- func (p *Plexams) PreplanSameSlotGroups(ctx context.Context) ([]*model.PreplanSameSlotGroup, error)
- func (p *Plexams) PrimussExamExists(ctx context.Context, program string, ancode int) (bool, error)
- func (p *Plexams) PrimussExams(ctx context.Context) ([]*model.PrimussExamByProgram, error)
- func (p *Plexams) PrintInfo()
- func (p *Plexams) PrintSameName()
- func (p *Plexams) PrintSemesterConfig()
- func (p *Plexams) PrintStatistics() error
- func (p *Plexams) PrintStudentInfo(name string, long, zpa bool) error
- func (p *Plexams) RememberActiveSemester(ctx context.Context)
- func (p *Plexams) RemoveExamDuration(ctx context.Context, ancode int) (bool, error)
- func (p *Plexams) RemoveExamsCanShareSlot(ctx context.Context, ancode1, ancode2 int) (bool, error)
- func (p *Plexams) RemoveMucDaiLink(ctx context.Context, program string, primussAncode int) (*model.MucDaiExam, error)
- func (p *Plexams) RemoveNtaRoomAloneWaiver(ctx context.Context, mtknr string, ancode int) (bool, error)
- func (p *Plexams) RemovePermanentNonInvigilator(ctx context.Context, teacherID int) (bool, error)
- func (p *Plexams) RemovePrePlannedInvigilation(ctx context.Context, starttime time.Time, roomName *string) (bool, error)
- func (p *Plexams) RemovePrePlannedRoom(ctx context.Context, ancode int, roomName string, mtknr *string) (bool, error)
- func (p *Plexams) RemovePrimussAncode(ctx context.Context, zpaAncode int, program string) (*model.ConnectedExam, error)
- func (p *Plexams) RemoveStudentConflictDecision(ctx context.Context, ancode1, ancode2 int, mtknr string) (bool, error)
- func (p *Plexams) RemoveStudentReg(ctx context.Context, program string, ancode int, mtknr string) (int, error)
- func (p *Plexams) RenderEmailTemplatePreview(_ context.Context, name, markdown string) (*model.EmailTemplatePreview, error)
- func (p *Plexams) RequestRoomsInfo() error
- func (p *Plexams) ResetAssembledExams(ctx context.Context) (int, error)
- func (p *Plexams) ResetEmailTemplate(ctx context.Context, name string) (bool, error)
- func (p *Plexams) ResetExamSchedule(ctx context.Context) (int, error)
- func (p *Plexams) ResetInvigilations(ctx context.Context) error
- func (p *Plexams) ResetPrimussData(ctx context.Context) ([]string, error)
- func (p *Plexams) ResetRoomsForExams(ctx context.Context) error
- func (p *Plexams) RestoreDataset(ctx context.Context, name string, data []byte) (*RestoreResult, error)
- func (p *Plexams) RestoreSemesterDump(ctx context.Context, zipData []byte) (*RestoreResult, error)
- func (p *Plexams) RmConstraints(ctx context.Context, ancode int) (bool, error)
- func (p *Plexams) RmZpaExamFromPlan(ctx context.Context, ancode int) (bool, error)
- func (p *Plexams) RoomByName(ctx context.Context, roomName string) (*model.Room, error)
- func (p *Plexams) RoomRequests(ctx context.Context) ([]*model.RoomRequest, error)
- func (p *Plexams) Rooms(ctx context.Context) ([]*model.Room, error)
- func (p *Plexams) RoomsForSlot(ctx context.Context, starttime time.Time) (*model.RoomsForSlot, error)
- func (p *Plexams) RoomsForSlots(ctx context.Context) ([]*model.RoomsForSlot, error)
- func (p *Plexams) RoomsFromRoomNames(ctx context.Context, roomNames []string) ([]*model.Room, error)
- func (p *Plexams) RoomsWithFreeSeatsForSlot(ctx context.Context, starttime time.Time) ([]*model.RoomWithFreeSeats, error)
- func (p *Plexams) RoomsWithInvigilationsForSlot(ctx context.Context, starttime time.Time) (*model.InvigilationSlot, error)
- func (p *Plexams) SafeExamBrowser(ctx context.Context, ancode int) (bool, error)
- func (p *Plexams) SameModulNamesBytes(ctx context.Context) ([]byte, error)
- func (p *Plexams) SaveEmailAttachment(ctx context.Context, kind, key, filename, contentType string, data []byte) error
- func (p *Plexams) SeedStudyProgramsFromConfig(ctx context.Context) (int, error)
- func (p *Plexams) SemesterConfigInput(ctx context.Context) (*model.SemesterConfigInput, error)
- func (p *Plexams) SemesterDumpZip(ctx context.Context) ([]byte, error)
- func (p *Plexams) SendAssembledExamMail(ctx context.Context, ancode int, updated, run bool, reporter Reporter) error
- func (p *Plexams) SendAssembledExamMails(ctx context.Context, emailAddresses, run bool, reporter Reporter) error
- func (p *Plexams) SendCoverPageMail(ctx context.Context, examerID int, run bool, reporter Reporter) error
- func (p *Plexams) SendCoverPagesMails(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailDraft(run bool, reporter Reporter) error
- func (p *Plexams) SendEmailExaHM(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailInvigilationReqMissing(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailInvigilations(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailInvigilationsSecretariat(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailKdpExahm(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailLbaRepeaters(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailPublishedExams(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailPublishedInvigilations(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailPublishedRooms(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailRoomRequests(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailRoomsSecretariat(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendExamPlanningInfoMails(ctx context.Context, teacherIDs []int, run bool, reporter Reporter) error
- func (p *Plexams) SendHandicapsMailToStudentPlanned(ctx context.Context, run bool, to []string, cc []string, ...) error
- func (p *Plexams) SendHandicapsMailToStudentRoomAlone(ctx context.Context, run bool, to []string, cc []string, ...) error
- func (p *Plexams) SendHandicapsMailsNTAPlanned(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendHandicapsMailsNTARoomAlone(ctx context.Context, mtknr string, run bool, reporter Reporter) error
- func (p *Plexams) SendMailNewNTA(ctx context.Context, mtknr string, run bool, reporter Reporter) error
- func (p *Plexams) SendTestMail() error
- func (p *Plexams) SendUnplannedExamMail(ctx context.Context, program string, ancode int, emailAddress string, run bool, ...) error
- func (p *Plexams) ServerInfo(ctx context.Context) (*model.ServerInfo, error)
- func (p *Plexams) SetAnnyPersonalizationNames(ctx context.Context, names []string) (*model.AnnyConfig, error)
- func (p *Plexams) SetEmailTemplate(ctx context.Context, name, markdown string) (*model.EmailTemplate, error)
- func (p *Plexams) SetExamDuration(ctx context.Context, ancode, duration int) (*model.ExamDurationOverride, error)
- func (p *Plexams) SetExamTime(ctx context.Context, ancode int, starttime time.Time) (bool, error)
- func (p *Plexams) SetExamsCanShareSlot(ctx context.Context, ancode1, ancode2 int) (bool, error)
- func (p *Plexams) SetExternalExamTime(ctx context.Context, ancode int, date, t string) (bool, error)
- func (p *Plexams) SetGenerationConfig(ctx context.Context, cfg *model.GenerationConfig) (*model.GenerationConfig, error)
- func (p *Plexams) SetInvigilatorConstraints(ctx context.Context, input model.InvigilatorConstraintsInput) (*model.InvigilatorConstraints, error)
- func (p *Plexams) SetMucDaiZpaLink(ctx context.Context, program string, primussAncode, zpaAncode int) (*model.MucDaiExam, error)
- func (p *Plexams) SetNTAActive(ctx context.Context, mtknr string, active bool) (*model.NTA, error)
- func (p *Plexams) SetPermanentNonInvigilator(ctx context.Context, teacherID int, name, reason string) (*model.PermanentNonInvigilator, error)
- func (p *Plexams) SetPlaner(ctx context.Context, name, email string) (*model.Planer, error)
- func (p *Plexams) SetPlanningCondition(ctx context.Context, key string, done bool) (*model.PlanningState, error)
- func (p *Plexams) SetPreplanExamCanShareSlot(ctx context.Context, id, otherID int, canShare bool) (*model.PreplanExam, error)
- func (p *Plexams) SetPreplanExamConstraints(ctx context.Context, id int, input *model.ConstraintsInput) (*model.PreplanExam, error)
- func (p *Plexams) SetPreplanExamFixed(ctx context.Context, id int, fixed bool) (*model.PreplanExam, error)
- func (p *Plexams) SetPreplanExamNotSameSlot(ctx context.Context, id, otherID int, conflict bool) (*model.PreplanExam, error)
- func (p *Plexams) SetPreplanExamTime(ctx context.Context, id int, starttime *time.Time) (*model.PreplanExam, error)
- func (p *Plexams) SetRoomActive(ctx context.Context, name string, active bool) (*model.Room, error)
- func (p *Plexams) SetRoomRequestActive(ctx context.Context, room string, starttime time.Time, active bool) (*model.RoomRequest, error)
- func (p *Plexams) SetRoomRequestApproved(ctx context.Context, room string, starttime time.Time, approved bool) (*model.RoomRequest, error)
- func (p *Plexams) SetSemesterConfigInput(ctx context.Context, data *model.SemesterConfigInputData) (*model.SaveSemesterConfigResult, error)
- func (p *Plexams) SetSemesterReadOnly(ctx context.Context, readOnly bool) (*model.Semester, error)
- func (p *Plexams) SetStudentConflictDecision(ctx context.Context, ancode1, ancode2 int, mtknr string, ...) (bool, error)
- func (p *Plexams) SetZPA() error
- func (p *Plexams) ShowInvigilationProblem(ctx context.Context) error
- func (p *Plexams) SlotForAncode(ctx context.Context, ancode int) (*model.Slot, error)
- func (p *Plexams) SpecialInterests(ctx context.Context) ([]*model.SpecialInterest, error)
- func (p *Plexams) StudentByMtknr(ctx context.Context, mtknr string) (*model.Student, error)
- func (p *Plexams) StudentConflictDecisions(ctx context.Context) ([]*model.StudentConflictDecision, error)
- func (p *Plexams) StudentRegsForProgram(ctx context.Context, program string) ([]*model.StudentReg, error)
- func (p *Plexams) StudentRegsImportErrors(ctx context.Context) ([]*model.RegWithError, error)
- func (p *Plexams) StudentRegsPerStudentPlanned(ctx context.Context) ([]*model.Student, error)
- func (p *Plexams) StudentRegsState(ctx context.Context) (*model.StudentRegsState, error)
- func (p *Plexams) Students(ctx context.Context) ([]*model.Student, error)
- func (p *Plexams) StudentsByName(ctx context.Context, regex string) ([]*model.Student, error)
- func (p *Plexams) StudyPrograms(ctx context.Context) ([]*model.StudyProgram, error)
- func (p *Plexams) SwitchSemester(ctx context.Context, name, semesterOverride string) (*model.Semester, error)
- func (p *Plexams) SyncLog(ctx context.Context, limit int) ([]*model.SyncLogEntry, error)
- func (p *Plexams) TryBeginExclusiveOp() bool
- func (p *Plexams) TryBeginValidation() bool
- func (p *Plexams) UnblockRoomForSlot(ctx context.Context, room string, starttime time.Time) (bool, error)
- func (p *Plexams) UnfixExamRoomsPhase(ctx context.Context) error
- func (p *Plexams) UnlockExam(ctx context.Context, ancode int) (*model.PlanEntry, *model.AssembledExam, error)
- func (p *Plexams) UnplacedExams(ctx context.Context) ([]*model.UnplacedExam, error)
- func (p *Plexams) UpdateNta(ctx context.Context, input model.NTAInput) (*model.NTA, error)
- func (p *Plexams) UpdatePreplanExam(ctx context.Context, id int, input *model.PreplanExamInput) (*model.PreplanExam, error)
- func (p *Plexams) UpdateRoom(ctx context.Context, input model.RoomInput) (*model.Room, error)
- func (p *Plexams) UpdateRoomRequestTime(ctx context.Context, room string, starttime time.Time, from, until time.Time) (*model.RoomRequest, error)
- func (p *Plexams) UploadPlan(ctx context.Context, withRooms, withInvigilators, upload bool, ...) ([]*model.ZPAExamPlan, error)
- func (p *Plexams) UpsertAdditionalExam(ctx context.Context, exam *model.AdditionalExam) (*model.AdditionalExam, error)
- func (p *Plexams) UpsertSpecialInterest(ctx context.Context, si *model.SpecialInterest) (*model.SpecialInterest, error)
- func (p *Plexams) UpsertStudyProgram(ctx context.Context, program *model.StudyProgram) (*model.StudyProgram, error)
- func (p *Plexams) ValidateConflicts(onlyPlannedByMe bool, ancode int, reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateConstraints(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateDBConstraints(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateDBNtas(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateDBPlanEntries(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateDBReferences(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateDBRooms(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateInvigilationConstraints(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateInvigilationDups(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateInvigilationsTimeDistance(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateInvigilatorRequirements(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateInvigilatorSlots(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidatePreplanAssignment(ctx context.Context) (*model.PreplanValidation, error)
- func (p *Plexams) ValidateRoomsBlocked(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateRoomsEnoughSeats(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateRoomsNeedRequest(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateRoomsPerExam(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateRoomsPerSlot(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateRoomsTimeDistance(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateStudentRegs(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateZPADateTimes(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateZPAInvigilators(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateZPARooms(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) WritesAllowed() bool
- func (p *Plexams) ZpaExamsPlaningStatusUnknown(ctx context.Context) ([]*model.ZPAExam, error)
- func (p *Plexams) ZpaExamsToPlanWithConstraints(ctx context.Context) ([]*model.ZPAExamWithConstraints, error)
- type PrimussAncode
- type Reporter
- type RestoreResult
- type TimeRange
- type UnpplannedExamMailData
- type ZPA
Constants ¶
const ( // AttachmentKindCoverPage holds per-teacher cover-page PDFs (key = teacher ID). AttachmentKindCoverPage = "cover-page" // AttachmentKindInvigilationImage holds per-invigilator PNGs (key = invigilator ID). AttachmentKindInvigilationImage = "invigilation-image" )
Variables ¶
var ErrDatabaseNotEmpty = errors.New("database is not empty")
ErrDatabaseNotEmpty is returned by RestoreSemesterDump when the target database already holds planning data (a full-semester dump may only be restored into a fresh/empty workspace, never on top of an existing semester).
Functions ¶
func CSVDatasetNames ¶ added in v1.220.0
func CSVDatasetNames() []string
CSVDatasetNames returns the known CSV dataset keys in a stable order.
func DatasetNames ¶ added in v1.219.0
func DatasetNames() []string
DatasetNames returns the sorted list of known dataset keys.
Types ¶
type AssembledExamMailData ¶ added in v1.204.0
type CSVImportResult ¶ added in v1.220.0
type CSVImportResult struct {
Dataset string `json:"dataset"`
Applied int `json:"applied"`
Skipped []string `json:"skipped,omitempty"`
}
CSVImportResult reports the outcome of a dataset CSV import.
type ConsoleReporter ¶ added in v1.98.0
type ConsoleReporter struct {
// contains filtered or unexported fields
}
ConsoleReporter writes to stdout exactly like the CLI did before the Reporter abstraction was introduced: colored output via aurora and a yacspin spinner for progress.
func NewConsoleReporter ¶ added in v1.98.0
func NewConsoleReporter() *ConsoleReporter
NewConsoleReporter returns a Reporter that prints to the terminal.
func (*ConsoleReporter) Printf ¶ added in v1.98.0
func (r *ConsoleReporter) Printf(format string, a ...any)
func (*ConsoleReporter) Println ¶ added in v1.98.0
func (r *ConsoleReporter) Println(a ...any)
func (*ConsoleReporter) Progress ¶ added in v1.98.0
func (r *ConsoleReporter) Progress(p invigplan.Progress)
func (*ConsoleReporter) Step ¶ added in v1.99.0
func (r *ConsoleReporter) Step(msg string)
func (*ConsoleReporter) StopProgress ¶ added in v1.98.0
func (r *ConsoleReporter) StopProgress(finalMsg string)
func (*ConsoleReporter) StopProgressFail ¶ added in v1.99.0
func (r *ConsoleReporter) StopProgressFail(finalMsg string)
func (*ConsoleReporter) Warnf ¶ added in v1.98.0
func (r *ConsoleReporter) Warnf(format string, a ...any)
type ConstraintsEmail ¶ added in v1.17.0
type ConstraintsEmail struct {
FromDate string
UntilDate string
FeedbackDate string
PlanerName string
}
ConstraintsEmail is the shared template data for the period/feedback emails (draft, invigilations, published). The standalone constraints-request email was replaced by the consolidated exam-planning info email (see email_exam_planning.go).
type CoverMailData ¶ added in v1.40.0
type CsvLBARepeater ¶ added in v1.41.0
type ExahmEmail ¶ added in v1.66.0
type ExahmEmail struct {
PlanerName string
}
type ExamScheduleResult ¶ added in v1.207.0
type ExamScheduleResult struct {
Units int
Fixed int
Placed int
Unplaced int
UnplacedAncodes []int
HardViolations []string
Cost float64
CostByConstraint map[string]float64
Iterations int
StoppedEarly bool
Written bool
Seed int
Diagnostics examplan.Diagnostics
Conflicts []*model.ExamScheduleConflict
ResolvedConflicts []*model.ExamScheduleConflict
}
ExamScheduleResult summarizes a Terminplan generation run.
type ExportNtas ¶ added in v1.15.0
type ExportPlannedRooms ¶ added in v1.15.0
type ExportPlannedRooms struct {
MainExamer string `json:"mainExamer"`
MainExamerID int `json:"mainExamerID"`
Module string `json:"module"`
Room string `json:"room"`
Date string `json:"date"`
Starttime string `json:"starttime"`
NumberOfStudents int `json:"numberOfStudents"`
Duration int `json:"duration"`
MaxDuration int `json:"maxDuration"`
Invigilator string `json:"invigilator"`
Ntas []ExportNtas `json:"ntas"`
}
type InvigilationMissingMailData ¶ added in v1.82.0
type InvigilationsEmail ¶ added in v1.39.0
type NTAEmail ¶
type NTAEmail struct {
NTA *model.Student
Exams []*model.PlannedExam
PlanerName string
}
type NTAEmailExamAndRoom ¶ added in v1.11.0
type NTAEmailExamAndRoom struct {
Exam *model.PlannedExam
Room *model.PlannedRoom
Invigilator *model.Teacher
Date string // e.g. "Mo, 13.07.2026"
Time string // e.g. "08:30"
// Waiver is set when the student deliberately gave up their room-alone right
// for this exam (the stored reason); empty otherwise.
Waiver string
}
type NTAEmailWithRooms ¶ added in v1.11.0
type NTAEmailWithRooms struct {
NTA *model.Student
ExamsWithRoom []NTAEmailExamAndRoom
PlanerName string
}
type NewNTA ¶ added in v1.65.0
type NewNTA struct {
Student *model.Student
Exams []*model.PlannedExam
PlanerName string
}
type Plexams ¶
type Plexams struct {
// contains filtered or unexported fields
}
func NewPlexams ¶
func (*Plexams) AddConstraints ¶ added in v1.20.0
func (p *Plexams) AddConstraints(ctx context.Context, ancode int, constraintsInput model.ConstraintsInput) (*model.Constraints, error)
func (*Plexams) AddExamToSlottime ¶ added in v1.74.0
func (*Plexams) AddInvigilation ¶
func (*Plexams) AddInvigilatorsToInvigilationTodos ¶
func (*Plexams) AddMucDaiExam ¶ added in v1.3.0
func (*Plexams) AddMucDaiExamByProgram ¶ added in v1.173.0
func (p *Plexams) AddMucDaiExamByProgram(ctx context.Context, mucdaiExam *model.MucDaiExam) (*model.ZPAExam, error)
AddMucDaiExamByProgram adds a MUC.DAI exam, deriving the local ZPA ancode from the program's externalExamsBase (base + primussAncode) in the StudyProgram master data.
func (*Plexams) AddNtaRoomAloneWaiver ¶ added in v1.131.0
func (p *Plexams) AddNtaRoomAloneWaiver(ctx context.Context, mtknr string, ancode int, reason string) (*model.NtaRoomAloneWaiver, error)
AddNtaRoomAloneWaiver accepts that an NTA gives up the room-alone right for one exam (key: mtknr/ancode), stored with a reason. Errors on an empty reason or an unknown student.
func (*Plexams) AddPreplanExam ¶ added in v1.160.0
func (p *Plexams) AddPreplanExam(ctx context.Context, input *model.PreplanExamInput) (*model.PreplanExam, error)
AddPreplanExam validates and creates a new pre-exam (the examer's name is snapshotted from the linked teacher).
func (*Plexams) AddPrimussAncode ¶ added in v1.167.0
func (p *Plexams) AddPrimussAncode(ctx context.Context, zpaAncode int, program string, primussAncode int) (*model.ConnectedExam, error)
AddPrimussAncode adds a Primuss ancode mapping to a ZPA exam and returns the freshly computed connected exam.
func (*Plexams) AddRoom ¶ added in v1.113.0
AddRoom creates a new room (key: name). Errors if a room with that name already exists.
func (*Plexams) AddRoomRequest ¶ added in v1.117.0
func (p *Plexams) AddRoomRequest(ctx context.Context, room string, starttime time.Time, from, until time.Time) (*model.RoomRequest, error)
AddRoomRequest manually adds a single room request (key: room/starttime). It starts active and not approved. Errors if one already exists.
func (*Plexams) AddStudentReg ¶ added in v1.36.0
func (*Plexams) AddZpaExamToPlan ¶
func (*Plexams) AdditionalExams ¶
AdditionalExams returns all additional (publish-only) exams.
func (*Plexams) AllAnnyBookings ¶ added in v1.77.0
func (*Plexams) AllProgramsInPlan ¶
func (*Plexams) AllowedSlots ¶
func (*Plexams) AnnyBookings ¶ added in v1.77.0
func (*Plexams) AnnyConfig ¶ added in v1.181.0
func (*Plexams) ApplyRoomRequestsPreview ¶ added in v1.117.0
ApplyRoomRequestsPreview generates room requests from the current plan and replaces all existing ones (one-shot, no merge). Generated requests start active and not approved. To avoid clobbering requests that have already been approved (e.g. this semester's migrated data), it refuses to overwrite existing requests unless force is true. Returns the number written.
func (*Plexams) AssembledExam ¶ added in v1.204.0
func (*Plexams) AssembledExams ¶ added in v1.204.0
func (*Plexams) AssembledExamsForExamer ¶ added in v1.204.0
func (*Plexams) AssembledExamsState ¶ added in v1.204.0
AssembledExamsState returns whether the cached assembled exams are stale. They can only be stale once they have been generated at least once; before that (e.g. right after the first ZPA import) the state is reported as not dirty.
func (*Plexams) AssignInvigilations ¶ added in v1.204.0
func (*Plexams) AwkwardSlots ¶
func (*Plexams) BeginMailCollection ¶ added in v1.157.0
func (p *Plexams) BeginMailCollection()
BeginMailCollection starts capturing dry-run mails; pair with FlushMailCollection.
func (*Plexams) BlockRoomForSlot ¶ added in v1.119.0
func (p *Plexams) BlockRoomForSlot(ctx context.Context, room string, starttime time.Time, reason *string) (*model.BlockedRoom, error)
BlockRoomForSlot marks a room as not usable in one slot (e.g. otherwise occupied). It is honored by the rooms-for-slots / rooms-for-exams generation. The block always succeeds; a conflict with an already-planned room only surfaces as a warning on the next generation.
func (*Plexams) BlockedRooms ¶ added in v1.119.0
BlockedRooms returns all room-slot blocks of the semester.
func (*Plexams) CanShareSlotSuggestions ¶ added in v1.207.0
CanShareSlotSuggestions returns auto-detected canShareSlot candidates (same module+program, different examer) that are not yet declared.
func (*Plexams) ChangeAncode ¶
func (*Plexams) ChangeAncodeInConflicts ¶
func (*Plexams) ChangeAncodeInStudentRegs ¶
func (*Plexams) ClearEmailAttachments ¶ added in v1.102.0
ClearEmailAttachments removes all uploaded attachments of a kind.
func (*Plexams) ConflictingAncodes ¶
func (*Plexams) ConnectExam ¶
ConnectExam connects a Primuss exam (same ancode, given program) to a ZPA exam by adding the Primuss ancode mapping; the connected exam is computed live afterwards.
func (*Plexams) ConnectPreplanExamToAncode ¶ added in v1.161.0
func (p *Plexams) ConnectPreplanExamToAncode(ctx context.Context, id, ancode int) (*model.PreplanExam, error)
ConnectPreplanExamToAncode links a pre-exam to a real ZPA exam by its ancode. The ancode must exist and must not already be linked by another pre-exam.
func (*Plexams) ConstraintForAncode ¶
func (*Plexams) Constraints ¶
func (*Plexams) ConstraintsMap ¶
func (*Plexams) ConstraintsPDFBytes ¶ added in v1.235.0
ConstraintsPDFBytes builds the constraints PDF as bytes.
func (*Plexams) CreateSemester ¶ added in v1.158.0
func (p *Plexams) CreateSemester(ctx context.Context, semester string, data *model.SemesterConfigInputData) (*model.SaveSemesterConfigResult, error)
CreateSemester stores the config for a new semester in its own database. It refuses an invalid semester name or a semester that already has a config.
func (*Plexams) CreateSemesterFromInput ¶ added in v1.158.0
func (p *Plexams) CreateSemesterFromInput(ctx context.Context, semester string, input *model.SemesterConfigInput) (*model.SaveSemesterConfigResult, error)
CreateSemesterFromInput creates a new semester from an already-built raw config (the CLI init entry point).
func (*Plexams) CreateWorkspace ¶ added in v1.180.0
func (p *Plexams) CreateWorkspace(ctx context.Context, database, fromSemester string) (*model.Semester, error)
CreateWorkspace creates a new, independent database (a workspace) for the logical semester of fromSemester, copying that semester's config so dates/slots match. The data stays empty — import it (e.g. from ZPA, which uses the logical semester).
func (*Plexams) CsvForEXaHMBytes ¶ added in v1.235.0
func (*Plexams) CsvForLBARepeaterBytes ¶ added in v1.235.0
func (*Plexams) CsvForProgramBytes ¶ added in v1.235.0
func (*Plexams) DatasetCSV ¶ added in v1.220.0
DatasetCSV builds the CSV of one dataset and a suggested download filename.
func (*Plexams) DatasetDumpJSON ¶ added in v1.219.0
DatasetDumpJSON builds the extended-JSON export of a single dataset and a suggested download filename.
func (*Plexams) DeleteAdditionalExam ¶ added in v1.173.0
DeleteAdditionalExam removes one additional exam by ancode.
func (*Plexams) DeleteInvigilatorConstraints ¶ added in v1.139.0
DeleteInvigilatorConstraints removes the constraints record of one invigilator.
func (*Plexams) DeletePreplanExam ¶ added in v1.160.0
DeletePreplanExam removes a pre-exam by id.
func (*Plexams) DeleteSpecialInterest ¶ added in v1.173.0
DeleteSpecialInterest removes one special-interest group by name.
func (*Plexams) DeleteStudyProgram ¶ added in v1.159.0
DeleteStudyProgram removes one study program by shortname.
func (*Plexams) DisconnectPreplanExam ¶ added in v1.161.0
DisconnectPreplanExam removes the ZPA link from a pre-exam and undoes the constraints that were carried over: the freed ancode drops out of its partners' same-slot, and its own carried constraints (room kind, allowedRooms, same-slot) are removed.
func (*Plexams) DraftFSBytes ¶ added in v1.29.0
func (*Plexams) DraftLbaRepBytes ¶ added in v1.235.0
DraftLbaRepBytes builds the repeater-exams-of-LBAs draft PDF as bytes (REST download).
func (*Plexams) DraftSIZipBytes ¶ added in v1.235.0
DraftSIZipBytes builds one draft PDF per special interest and returns them as a ZIP, since the special-interest export produces several files (one per configured group).
func (*Plexams) EmailAttachmentInfos ¶ added in v1.102.0
func (p *Plexams) EmailAttachmentInfos(ctx context.Context, kind string) ([]*model.EmailAttachmentInfo, error)
EmailAttachmentInfos lists the uploaded attachments of a kind (without data).
func (*Plexams) EmailTemplateFunctions ¶ added in v1.214.0
EmailTemplateFunctions returns the helper functions available in every email template.
func (*Plexams) EmailTemplates ¶ added in v1.213.0
EmailTemplates, SetEmailTemplate and ResetEmailTemplate delegate to the email renderer (the GraphQL resolvers call these on *Plexams). EmailTemplates additionally enriches each template with its GUI catalog info (description + documented variables).
func (*Plexams) EndExclusiveOp ¶ added in v1.101.0
func (p *Plexams) EndExclusiveOp()
EndExclusiveOp deregisters a finished exclusive operation.
func (*Plexams) EndValidation ¶ added in v1.99.0
func (p *Plexams) EndValidation()
EndValidation deregisters a finished validation.
func (*Plexams) ExahmRoomsFromAnnyBookings ¶ added in v1.77.0
func (*Plexams) ExamDurationOverrides ¶ added in v1.173.0
ExamDurationOverrides returns all per-ancode duration overrides.
func (*Plexams) ExamPlanningMailRecipients ¶ added in v1.194.0
func (p *Plexams) ExamPlanningMailRecipients(ctx context.Context) ([]*model.ExamPlanningMailRecipient, error)
ExamPlanningMailRecipients computes the recipients of the consolidated exam-planning info email: one entry per examer with at least one exam I plan (toPlan and not notPlannedByMe, any faculty) listing those exams, plus the active FK07 examers I plan nothing for. Examers of other faculties without a planned exam are excluded. No slot/date is included. Used as the pre-step so the planner can select/deselect. Fetches the inputs; the pure grouping/sorting lives in email.BuildExamPlanningRecipients.
func (*Plexams) ExamScheduleConflicts ¶ added in v1.207.0
ExamScheduleConflicts computes the conflicts of the CURRENT plan (from the plan entries): per student, pairs of their exams that ended up close in time. It aggregates by exam pair (worst proximity, number of affected students) and annotates each with any stored rating and whether the pair is declared can-share-slot. This is the list the user rates to steer the next generation.
func (*Plexams) ExamScheduleConstraints ¶ added in v1.207.0
ExamScheduleConstraints returns the read-only description of the hard/soft constraints the exam-schedule generator applies.
func (*Plexams) ExamerInPlan ¶
func (*Plexams) ExamersWithExamsPlannedByMe ¶ added in v1.103.0
ExamersWithExamsPlannedByMe returns the main examers of all planned exams that are planned by me (i.e. not flagged NotPlannedByMe), as full teachers, sorted by short name. This is the set of examers the planner is responsible for (e.g. for cover-page mails).
func (*Plexams) ExamsAt ¶ added in v1.234.0
ExamsAt returns all planned exams whose PlanEntry.Starttime equals starttime.
func (*Plexams) ExamsCanShareSlot ¶ added in v1.207.0
ExamsCanShareSlot returns the exam pairs declared as allowed to share a slot.
func (*Plexams) ExamsWithNtas ¶ added in v1.75.0
func (*Plexams) ExamsWithoutDuration ¶ added in v1.76.0
func (*Plexams) ExamsWithoutSlot ¶
func (*Plexams) ExportICSString ¶ added in v1.235.0
ExportICSString builds the ICS calendar for a program and returns it as a string.
func (*Plexams) FetchFromAnny ¶ added in v1.77.0
func (*Plexams) FixExamRoomsPhase ¶ added in v1.207.0
FixExamRoomsPhase freezes the EXaHM/SEB room-phase result: every EXaHM/SEB exam that has a plan entry is marked PhaseFixed so phase B leaves it untouched (distinct from the user's manual Locked). Returns the number of exams fixed.
func (*Plexams) FixPrimussAncode ¶ added in v1.167.0
func (p *Plexams) FixPrimussAncode(ctx context.Context, zpaAncode int, program string, fromAncode, toAncode int) (*model.ConnectedExam, error)
FixPrimussAncode renumbers a Primuss exam (exam + student regs + conflicts) within a program and returns the freshly computed connected exam of the given ZPA exam.
func (*Plexams) FlushMailCollection ¶ added in v1.157.0
FlushMailCollection sends the captured dry-run mails as one bundled summary mail.
func (*Plexams) GenerateAssembledExams ¶ added in v1.204.0
func (p *Plexams) GenerateAssembledExams(ctx context.Context) (*model.GenerateAssembledExamsResult, error)
GenerateAssembledExams regenerates the cached assembled exams and returns the new (no longer dirty) state together with the changes vs the previous cache.
func (*Plexams) GenerateExamRoomsPhase ¶ added in v1.207.0
func (p *Plexams) GenerateExamRoomsPhase(ctx context.Context, dryRun bool, seed int64, iterations int, reporter Reporter) (*ExamScheduleResult, error)
GenerateExamRoomsPhase runs phase A: it schedules only the EXaHM/SEB exams into the booked T-building slots (maximizing room usage), leaving everything else for phase B.
func (*Plexams) GenerateExamSchedule ¶ added in v1.207.0
func (p *Plexams) GenerateExamSchedule(ctx context.Context, dryRun bool, seed int64, iterations int, ignoreRatings, keepAssigned bool, reporter Reporter) (*ExamScheduleResult, error)
GenerateExamSchedule builds and solves the exam schedule, streaming progress to the reporter. With dryRun it only reports (nothing written); otherwise it writes the non-fixed plan entries (locked / external / not-planned-by-me stay untouched) and removes stale entries of any exam that ended up unplaced. It refuses to write when there are hard violations.
func (*Plexams) GenerateExamsToPlanPDFBytes ¶ added in v1.235.0
GenerateExamsToPlanPDFBytes builds the "exams to plan" PDF as bytes.
func (*Plexams) GeneratePreparation ¶ added in v1.203.0
func (p *Plexams) GeneratePreparation(ctx context.Context) (*model.GeneratePreparationResult, error)
GeneratePreparation regenerates both the cached assembled exams and the per-student planned registrations in one step. They share the same inputs (connected exams + Primuss data) and do not depend on each other's output, so they are always (re)generated together. Each sub-step clears its own stale flag and marks its planning-state condition.
func (*Plexams) GeneratePreplanAssignment ¶ added in v1.162.0
func (p *Plexams) GeneratePreplanAssignment(ctx context.Context, keepAssigned bool) (*model.PreplanValidation, error)
GeneratePreplanAssignment distributes the pre-exams over the MUC.DAI slots that already have Anny rooms booked, up to ~90% of each slot's booked capacity (never brim-full). Exams of the same study program never share a slot and are spread across days; the most important exams (EXaHM, then large SEB) are placed first, so small SEB that no longer fit are the ones left without a slot. Same-slot exams stay together. A DSATUR constructive pass plus an SA repair (see solvePreplan) find the assignment. Fixed pre-exams keep their slot; all non-fixed exams are re-planned (with keepAssigned, currently-slotted non-fixed exams are kept too). When no Anny rooms are booked anywhere, nothing is assigned.
func (*Plexams) GenerateRoomRequestsPreview ¶ added in v1.116.0
func (p *Plexams) GenerateRoomRequestsPreview(ctx context.Context) ([]*model.RoomRequestPreview, error)
GenerateRoomRequestsPreview computes, per slot, which active management rooms would be requested for which exams (preferring higher-priority rooms). It is a read-only dry run and changes nothing. Each entry carries the triggering exam and the other exams in the same slot.
func (*Plexams) GenerateStudentRegs ¶ added in v1.174.0
func (p *Plexams) GenerateStudentRegs(ctx context.Context) (*model.GenerateStudentRegsResult, error)
GenerateStudentRegs regenerates the per-student planned registrations and returns the new (no longer dirty) state together with the number of students.
func (*Plexams) GenerationConfig ¶ added in v1.173.0
GenerationConfig returns the global generation config. When none is stored yet it falls back to the package defaults, seeded from the config file (viper) for backwards compatibility.
func (*Plexams) GetAllSemesterNames ¶
func (*Plexams) GetConflicts ¶
func (*Plexams) GetConnectedExam ¶
GetConnectedExam computes a single connected exam on the fly.
func (*Plexams) GetConnectedExams ¶
GetConnectedExams computes all connected exams on the fly: it loads all Primuss exams once into an index and connects every ZPA-exam-to-plan and non-ZPA exam in memory, so the result is always consistent with the current data (no cache).
func (*Plexams) GetEmailAttachment ¶ added in v1.102.0
func (p *Plexams) GetEmailAttachment(ctx context.Context, kind, key string) (*db.EmailAttachment, error)
GetEmailAttachment returns one stored attachment incl. its data (or nil).
func (*Plexams) GetEnhancedStudentRegs ¶ added in v1.64.0
func (*Plexams) GetFk07programs ¶
func (*Plexams) GetInvigilationTodos ¶
func (*Plexams) GetInvigilator ¶
func (*Plexams) GetInvigilatorAt ¶ added in v1.234.0
func (p *Plexams) GetInvigilatorAt(ctx context.Context, roomname string, starttime time.Time) (*model.Teacher, error)
GetInvigilatorAt returns the invigilator assigned to a room (or "reserve") at the given absolute start time.
func (*Plexams) GetInvigilatorForRoom ¶ added in v1.41.0
func (p *Plexams) GetInvigilatorForRoom(ctx context.Context, name string, start time.Time) (*model.Teacher, error)
GetInvigilatorForRoom returns the invigilator assigned to a room at the given absolute start time (nil when none is assigned).
func (*Plexams) GetInvigilators ¶
func (*Plexams) GetPrimussExam ¶
func (*Plexams) GetPrimussExamsForAncode ¶
func (*Plexams) GetReservations ¶
GetReservations returns the active building-management room requests as time ranges per room, read from the DB (collection room_requests). It feeds room planning (restrictedSlotsForOtherRooms) and the needs-request validation; inactive requests are excluded so they no longer count for planning.
func (*Plexams) GetSemesterConfig ¶
func (p *Plexams) GetSemesterConfig() *model.SemesterConfig
func (*Plexams) GetStudentRegs ¶
func (p *Plexams) GetStudentRegs(ctx context.Context, exam *model.PrimussExam) ([]*model.StudentReg, error)
func (*Plexams) GetStudentRegsForAncode ¶
func (p *Plexams) GetStudentRegsForAncode(ancode int) (*model.StudentRegsForAncode, error)
func (*Plexams) GetStudents ¶
func (*Plexams) GetStudentsFromZPA ¶ added in v1.60.0
func (*Plexams) GetSupervisorRequirements ¶
func (*Plexams) GetTeacher ¶
func (*Plexams) GetTeacherIdByRegex ¶ added in v1.39.0
func (*Plexams) GetTeachers ¶
func (*Plexams) GetZPAExam ¶
func (*Plexams) GetZPAExams ¶
func (*Plexams) GetZPAExamsGroupedByType ¶
func (*Plexams) GetZPAStudents ¶ added in v1.62.0
func (*Plexams) GetZpaAnCodes ¶
func (*Plexams) GetZpaAnCodesToPlan ¶
func (*Plexams) GetZpaExamByAncode ¶
func (*Plexams) GetZpaExamsNotToPlan ¶
func (*Plexams) GetZpaExamsToPlan ¶
func (*Plexams) HTTPDownloadCSVDraft ¶ added in v1.235.0
func (p *Plexams) HTTPDownloadCSVDraft(w http.ResponseWriter, r *http.Request)
HTTPDownloadCSVDraft streams one of the human-readable draft CSVs as a download. GET /download/csv/{kind} (kind=draft needs ?program=<program>)
func (*Plexams) HTTPDownloadDataset ¶ added in v1.219.0
func (p *Plexams) HTTPDownloadDataset(w http.ResponseWriter, r *http.Request)
HTTPDownloadDataset streams one per-page dataset as a JSON download. GET /download/dataset?name=<dataset>
func (*Plexams) HTTPDownloadDatasetCSV ¶ added in v1.220.0
func (p *Plexams) HTTPDownloadDatasetCSV(w http.ResponseWriter, r *http.Request)
HTTPDownloadDatasetCSV streams one dataset as a CSV download. GET /download/dataset-csv?name=<dataset>
func (*Plexams) HTTPDownloadICS ¶ added in v1.235.0
func (p *Plexams) HTTPDownloadICS(w http.ResponseWriter, r *http.Request)
HTTPDownloadICS streams the ICS calendar of a program as a download. GET /download/ics/{program}
func (*Plexams) HTTPDownloadMyInputsCSV ¶ added in v1.220.0
func (p *Plexams) HTTPDownloadMyInputsCSV(w http.ResponseWriter, r *http.Request)
HTTPDownloadMyInputsCSV streams the combined CSV ZIP of all entered data. GET /download/my-inputs-csv.zip
func (*Plexams) HTTPDownloadPDF ¶ added in v1.235.0
func (p *Plexams) HTTPDownloadPDF(w http.ResponseWriter, r *http.Request)
HTTPDownloadPDF streams one generated PDF (or the draft-si ZIP) as a download. GET /download/pdf/{kind}
func (*Plexams) HTTPDownloadPlannedRooms ¶ added in v1.153.0
func (p *Plexams) HTTPDownloadPlannedRooms(w http.ResponseWriter, r *http.Request)
HTTPDownloadPlannedRooms serves the planned-rooms export JSON as a file download, so the GUI can fetch it to generate the cover pages externally.
func (*Plexams) HTTPDownloadSemesterDump ¶ added in v1.219.0
func (p *Plexams) HTTPDownloadSemesterDump(w http.ResponseWriter, r *http.Request)
HTTPDownloadSemesterDump streams the current semester as a ZIP download. GET /download/semester-dump.zip
func (*Plexams) HTTPUploadDataset ¶ added in v1.219.0
func (p *Plexams) HTTPUploadDataset(w http.ResponseWriter, r *http.Request)
HTTPUploadDataset restores one per-page dataset into the current database. POST /upload/dataset (multipart form: name=<dataset>, file=<json>)
func (*Plexams) HTTPUploadDatasetCSV ¶ added in v1.220.0
func (p *Plexams) HTTPUploadDatasetCSV(w http.ResponseWriter, r *http.Request)
HTTPUploadDatasetCSV imports one dataset CSV into the current database. POST /upload/dataset-csv (multipart form: name=<dataset>, file=<csv>)
func (*Plexams) HTTPUploadEmailAttachment ¶ added in v1.102.0
func (p *Plexams) HTTPUploadEmailAttachment(w http.ResponseWriter, r *http.Request)
HTTPUploadEmailAttachment handles a single-file upload: POST /upload/email-attachment (multipart form: kind, key, file).
func (*Plexams) HTTPUploadEmailAttachmentsZip ¶ added in v1.102.0
func (p *Plexams) HTTPUploadEmailAttachmentsZip(w http.ResponseWriter, r *http.Request)
HTTPUploadEmailAttachmentsZip handles a ZIP bulk upload: POST /upload/email-attachments-zip (multipart form: kind, file=<zip>). The key of each entry is the trailing integer of its filename (e.g. "<prefix>12345.pdf" -> "12345").
func (*Plexams) HTTPUploadPrimussZip ¶ added in v1.199.0
func (p *Plexams) HTTPUploadPrimussZip(w http.ResponseWriter, r *http.Request)
HTTPUploadPrimussZip imports the Primuss Sammellisten XLSX from an uploaded ZIP (multipart form field "file"). It replaces the per-program studentregs_/exams_/count_/ conflicts_ collections (only for the programs present in the ZIP) and returns a JSON summary including the ZPA ancodes whose Primuss data changed (so the GUI can offer update emails).
func (*Plexams) HTTPUploadSemesterDump ¶ added in v1.219.0
func (p *Plexams) HTTPUploadSemesterDump(w http.ResponseWriter, r *http.Request)
HTTPUploadSemesterDump restores a semester ZIP into the current (fresh) database. POST /upload/semester-dump.zip (multipart form: file=<zip>)
func (*Plexams) ImportDatasetCSV ¶ added in v1.220.0
func (p *Plexams) ImportDatasetCSV(ctx context.Context, name string, data []byte) (*CSVImportResult, error)
ImportDatasetCSV applies one dataset CSV to the current database.
func (*Plexams) ImportExamsFromZPA ¶ added in v1.99.0
ImportExamsFromZPA fetches the exams from ZPA, caches them and streams a CLI-style listing via the reporter. It returns the number fetched.
func (*Plexams) ImportInvigilatorRequirementsFromZPA ¶ added in v1.99.0
func (p *Plexams) ImportInvigilatorRequirementsFromZPA(ctx context.Context, reporter Reporter) (int, error)
ImportInvigilatorRequirementsFromZPA fetches the invigilator requirements from ZPA, streams which invigilators are still missing and returns the number of requirements fetched.
func (*Plexams) ImportMucDaiExams ¶ added in v1.175.0
func (p *Plexams) ImportMucDaiExams(ctx context.Context, csvText string) (*model.ImportMucDaiResult, error)
ImportMucDaiExams parses a MUC.DAI CSV, replaces the mucdai_<program> collections and generates the non-ZPA exams for all exams not planned by FK07 (assigning a stable ancode to new ones). FK07 exams are left to the normal ZPA flow.
func (*Plexams) ImportPrimussDir ¶ added in v1.199.0
ImportPrimussDir zips all .xlsx under dir and imports them like an uploaded ZIP.
func (*Plexams) ImportPrimussZip ¶ added in v1.199.0
func (p *Plexams) ImportPrimussZip(ctx context.Context, zipData []byte) (*primuss.ImportResult, error)
ImportPrimussZip imports the Primuss Sammellisten XLSX from an uploaded ZIP; the import logic lives in the plexams/primuss package.
func (*Plexams) ImportTeachersFromZPA ¶ added in v1.99.0
ImportTeachersFromZPA fetches the teachers from ZPA, caches them and streams a CLI-style listing via the reporter. It returns the number fetched.
func (*Plexams) Invigilator ¶ added in v1.68.0
func (*Plexams) InvigilatorCandidates ¶ added in v1.141.0
InvigilatorCandidates returns all teachers in the invigilator pool, including those currently excluded (isNotInvigilator / permanent). The GUI uses this to manage constraints for everyone, since invigilatorsWithReq drops the excluded ones.
func (*Plexams) InvigilatorConstraints ¶ added in v1.139.0
func (p *Plexams) InvigilatorConstraints(ctx context.Context) ([]*model.InvigilatorConstraints, error)
InvigilatorConstraints returns all per-invigilator constraints stored in the DB.
func (*Plexams) InvigilatorICS ¶ added in v1.106.0
InvigilatorICS builds an iCalendar (as bytes) with the appointments of one invigilator: their own exams (Eigenaufsicht when self-supervised, otherwise Fremdaufsicht), their room invigilations (Aufsicht) and their reserve invigilations (Reserve) — the items shown in the plan image. Each event's description carries the relevant rooms, invigilators and NTAs.
func (*Plexams) InvigilatorsExcludedByConfig ¶ added in v1.103.0
InvigilatorsExcludedByConfig returns the invigilators who WOULD do invigilation duty (they are in the pool and their computed factor is > 0) but are excluded solely because invigilatorConstraints.<id>.isNotInvigilator is set in the semester config. People who are out anyway (factor 0, e.g. full free semester) are not returned here.
func (*Plexams) InvigilatorsForDay ¶
func (*Plexams) InvigilatorsWithReq ¶
func (*Plexams) IsReadOnly ¶ added in v1.178.0
IsReadOnly reports whether the current semester database is protected.
func (*Plexams) LogMutation ¶ added in v1.168.0
func (p *Plexams) LogMutation(ctx context.Context, entry *model.MutationLogEntry)
LogMutation records one mutating-operation call (best-effort: a logging failure never affects the operation).
func (*Plexams) MakeSelfInvigilations ¶
func (*Plexams) MarkAssembledExamsDirty ¶ added in v1.204.0
MarkAssembledExamsDirty flags the cached assembled exams as stale (best-effort: a failure here never affects the triggering operation). Called whenever an input of the generation changes.
func (*Plexams) MarkStudentRegsDirty ¶ added in v1.174.0
MarkStudentRegsDirty flags the prepared student regs as stale (best-effort).
func (*Plexams) MucDaiExam ¶ added in v1.3.0
func (*Plexams) MucDaiExamsForProgram ¶ added in v1.3.0
func (*Plexams) MucDaiZpaCandidates ¶ added in v1.198.0
func (p *Plexams) MucDaiZpaCandidates(ctx context.Context, program string, primussAncode int) ([]*model.ZPAExam, error)
MucDaiZpaCandidates suggests ZPA exams for linking an (unresolved) MUC.DAI exam, ranked: the program carried with a missing number (0/-1) first, then same examer + similar module, then either.
func (*Plexams) MucdaiExams ¶
func (*Plexams) MutationLog ¶ added in v1.168.0
func (p *Plexams) MutationLog(ctx context.Context, opType, name *string, ancode *int, args []*model.ArgFilterInput, since, until *time.Time, limit *int) ([]*model.MutationLogEntry, error)
MutationLog returns the mutation log filtered by the given criteria (newest first). limit nil/<=0 returns all.
func (*Plexams) MutationLogNames ¶ added in v1.168.0
MutationLogNames returns the distinct operation names in the log.
func (*Plexams) MyInputsCSVZip ¶ added in v1.220.0
MyInputsCSVZip builds a ZIP with one CSV per dataset (everything the planner entered).
func (*Plexams) NewSemesterConfigDefaults ¶ added in v1.158.0
func (p *Plexams) NewSemesterConfigDefaults(ctx context.Context) (*model.SemesterConfigInput, error)
NewSemesterConfigDefaults returns a template for creating a new semester, based on the current semester's stored config (slots, emails, MUC.DAI slots and — as a starting point — the dates carry over; the planner adjusts the dates). Falls back to minimal defaults when nothing is stored.
func (*Plexams) NotPlannedByMe ¶
func (*Plexams) NtaByMtknr ¶
func (*Plexams) NtaRoomAloneWaivers ¶ added in v1.131.0
NtaRoomAloneWaivers returns all accepted NTA room-alone waivers.
func (*Plexams) NtasWithRegs ¶
func (*Plexams) OptimizerOptionsFromConfig ¶ added in v1.84.0
func (p *Plexams) OptimizerOptionsFromConfig(ctx context.Context, seed int64, iterations int) invigplan.Options
OptimizerOptionsFromConfig builds the optimizer options from viper, applying the given seed and iteration overrides (0 = keep config/default).
func (*Plexams) PDFExportKinds ¶ added in v1.235.0
PDFExportKinds returns the known PDF export kinds in a stable order.
func (*Plexams) PermanentNonInvigilators ¶ added in v1.140.0
func (p *Plexams) PermanentNonInvigilators(ctx context.Context) ([]*model.PermanentNonInvigilator, error)
PermanentNonInvigilators returns the teachers who never do invigilation duty again (global, carries over between semesters).
func (*Plexams) PersistSemester ¶ added in v1.179.1
PersistSemester force-stores the current logical semester as the database's own (authoritative) semester. Use only for explicit values (a pin or override), never for a derived guess.
func (*Plexams) PlanEntries ¶
func (*Plexams) PlannedAncodes ¶ added in v1.53.0
func (*Plexams) PlannedExam ¶
func (*Plexams) PlannedExams ¶
func (*Plexams) PlannedExamsByExamer ¶
func (*Plexams) PlannedExamsForProgram ¶
func (*Plexams) PlannedRoomForStudent ¶ added in v1.10.0
func (*Plexams) PlannedRoomInfo ¶ added in v1.35.0
PlannedRoomInfo prints the planned room for a given room name.
func (*Plexams) PlannedRoomNames ¶
func (*Plexams) PlannedRoomNamesAt ¶ added in v1.234.0
PlannedRoomNamesAt is an alias for PlannedRoomNamesInSlot keyed on the start time.
func (*Plexams) PlannedRoomNamesInSlot ¶
func (*Plexams) PlannedRooms ¶
func (*Plexams) PlannedRoomsAt ¶ added in v1.234.0
func (p *Plexams) PlannedRoomsAt(ctx context.Context, starttime time.Time) ([]*model.PlannedRoom, error)
PlannedRoomsAt is an alias for PlannedRoomsInSlot keyed on the absolute start time.
func (*Plexams) PlannedRoomsForExport ¶ added in v1.153.0
func (p *Plexams) PlannedRoomsForExport(ctx context.Context) ([]*ExportPlannedRooms, error)
PlannedRoomsForExport builds the planned-rooms export data (one entry per room of each exam I planned, with examer, time, students, durations, invigilator and NTAs) used to generate the cover pages externally.
func (*Plexams) PlannedRoomsInSlot ¶
func (*Plexams) PlannedRoomsJSON ¶ added in v1.153.0
PlannedRoomsJSON returns the planned-rooms export as indented JSON bytes.
func (*Plexams) PlanningState ¶ added in v1.121.0
func (*Plexams) PostStudentRegsToZPA ¶
func (p *Plexams) PostStudentRegsToZPA(ctx context.Context, jsonOutputFile string, reporter Reporter) ([]*model.ZPAStudentReg, []*model.RegWithError, error)
func (*Plexams) PreAddInvigilation ¶ added in v1.84.0
func (p *Plexams) PreAddInvigilation(ctx context.Context, invigilatorID int, starttime time.Time, roomName *string) (bool, error)
PreAddInvigilation fixes an invigilator for a room (roomName != nil) or the reserve (roomName == nil) at a start time before the automatic invigilation planning runs. It validates the same constraints as AddInvigilation.
func (*Plexams) PreAddRoomToExam ¶ added in v1.30.0
func (*Plexams) PreExamsAt ¶ added in v1.234.0
func (*Plexams) PrePlanInvigilationInSlot ¶ added in v1.85.0
func (p *Plexams) PrePlanInvigilationInSlot(ctx context.Context, starttime time.Time, roomName *string) (bool, error)
PrePlanInvigilationInSlot promotes the invigilation currently planned for a room (roomName != nil) or the reserve (roomName == nil) at a start time to a pre-planned, fixed assignment. It looks up the assigned invigilator, stores a pre-planned invigilation for them and marks the live invigilation as pre-planned so the GUI can show it.
func (*Plexams) PrePlannedInvigilations ¶ added in v1.84.0
func (*Plexams) PrePlannedInvigilationsForInvigilator ¶ added in v1.84.0
func (*Plexams) PrePlannedRooms ¶ added in v1.56.0
func (*Plexams) PrePlannedRoomsForExam ¶ added in v1.50.0
func (*Plexams) PrepareAssembledExams ¶ added in v1.204.0
func (*Plexams) PrepareInvigilationTodos ¶
func (*Plexams) PrepareRoomForExams ¶
PrepareRoomForExams assigns rooms to all planned exams and stores the result in planned_rooms. The allowed rooms per slot are computed live once (see prepareRoomsCfg / computeRoomsForSlots) — there is no separate rooms-for-slots step or stored cache anymore.
func (*Plexams) PrepareSelfInvigilation ¶
func (*Plexams) PrepareStudentRegs ¶
func (*Plexams) PreplanExam ¶ added in v1.160.0
PreplanExam returns one pre-exam by id.
func (*Plexams) PreplanExamAncodeSuggestions ¶ added in v1.161.0
func (p *Plexams) PreplanExamAncodeSuggestions(ctx context.Context, id int) ([]*model.ZPAExam, error)
PreplanExamAncodeSuggestions returns ZPA exams that are good candidates for linking the given pre-exam, ranked by examer (same teacher) and module-name similarity. Returns an empty list before the ZPA exams are imported.
func (*Plexams) PreplanExams ¶ added in v1.160.0
PreplanExams returns all SEB/EXaHM pre-planning pseudo-exams of this semester.
func (*Plexams) PreplanOverview ¶ added in v1.160.0
PreplanOverview computes, per slot (plus one bucket for unslotted pre-exams), the EXaHM/SEB seat demand with a suggested set of rooms, and the program overlaps within each slot.
func (*Plexams) PreplanSameSlotGroups ¶ added in v1.191.0
PreplanSameSlotGroups returns the same-slot groups of pre-exams (size >= 2) with each member's connection status, so the GUI can show which members are still pending. A group is complete once every member is connected to a ZPA ancode.
func (*Plexams) PrimussExamExists ¶
func (*Plexams) PrimussExams ¶
func (*Plexams) PrintSameName ¶
func (p *Plexams) PrintSameName()
func (*Plexams) PrintSemesterConfig ¶ added in v1.12.0
func (p *Plexams) PrintSemesterConfig()
func (*Plexams) PrintStatistics ¶
func (*Plexams) PrintStudentInfo ¶ added in v1.14.0
func (*Plexams) RememberActiveSemester ¶ added in v1.179.0
RememberActiveSemester records the current semester/database as the last active one, so the next start can resume it (best-effort).
func (*Plexams) RemoveExamDuration ¶ added in v1.173.0
RemoveExamDuration removes the duration override for an ancode.
func (*Plexams) RemoveExamsCanShareSlot ¶ added in v1.207.0
RemoveExamsCanShareSlot undeclares a can-share-slot pair.
func (*Plexams) RemoveMucDaiLink ¶ added in v1.198.0
func (p *Plexams) RemoveMucDaiLink(ctx context.Context, program string, primussAncode int) (*model.MucDaiExam, error)
RemoveMucDaiLink drops a (manual) link and falls back to automatic detection.
func (*Plexams) RemoveNtaRoomAloneWaiver ¶ added in v1.131.0
func (p *Plexams) RemoveNtaRoomAloneWaiver(ctx context.Context, mtknr string, ancode int) (bool, error)
RemoveNtaRoomAloneWaiver removes a waiver (key: mtknr/ancode). Errors if none exists.
func (*Plexams) RemovePermanentNonInvigilator ¶ added in v1.140.0
RemovePermanentNonInvigilator removes a permanent non-invigilator.
func (*Plexams) RemovePrePlannedInvigilation ¶ added in v1.125.0
func (p *Plexams) RemovePrePlannedInvigilation(ctx context.Context, starttime time.Time, roomName *string) (bool, error)
RemovePrePlannedInvigilation removes a pre-planned invigilation (key: starttime/roomName; roomName nil = the reserve). If a live invigilation at that start time was marked pre-planned (via PrePlanInvigilationInSlot), that flag is cleared too. Errors if no such pre-planned invigilation exists.
func (*Plexams) RemovePrePlannedRoom ¶ added in v1.119.0
func (p *Plexams) RemovePrePlannedRoom(ctx context.Context, ancode int, roomName string, mtknr *string) (bool, error)
RemovePrePlannedRoom removes a pre-planned room from an exam (mtknr nil = the room for the normal students). Errors if no such pre-planned room exists.
func (*Plexams) RemovePrimussAncode ¶ added in v1.167.0
func (p *Plexams) RemovePrimussAncode(ctx context.Context, zpaAncode int, program string) (*model.ConnectedExam, error)
RemovePrimussAncode removes a (manually added) Primuss ancode mapping of a program from a ZPA exam and returns the freshly computed connected exam.
func (*Plexams) RemoveStudentConflictDecision ¶ added in v1.207.0
func (p *Plexams) RemoveStudentConflictDecision(ctx context.Context, ancode1, ancode2 int, mtknr string) (bool, error)
RemoveStudentConflictDecision clears an explicit decision (back to automatic handling).
func (*Plexams) RemoveStudentReg ¶
func (*Plexams) RenderEmailTemplatePreview ¶ added in v1.214.0
func (p *Plexams) RenderEmailTemplatePreview(_ context.Context, name, markdown string) (*model.EmailTemplatePreview, error)
RenderEmailTemplatePreview renders the given (possibly unsaved) Markdown for the named template against the catalog's representative sample data and returns the HTML/text preview. A template parse/execute error is returned in the preview's Error field (not as a Go error), so the GUI can show mistakes live while the user is editing.
func (*Plexams) RequestRoomsInfo ¶ added in v1.76.2
RequestRoomsInfo prints, read-only, which building-management rooms would be requested for which exams (the same dry-run the GUI shows via roomRequestsPreview). It changes nothing: generating, approving and emailing the actual requests happens in the GUI / via the GraphQL API.
func (*Plexams) ResetAssembledExams ¶ added in v1.233.0
ResetAssembledExams deletes the cached assembled exams and their state, undoing a generation; they can be rebuilt with GenerateAssembledExams. Returns how many assembled exams were removed. Blocked while a validation or transfer/email is running.
func (*Plexams) ResetEmailTemplate ¶ added in v1.213.0
func (*Plexams) ResetExamSchedule ¶ added in v1.207.0
ResetExamSchedule removes the generated exam schedule (phase B): every plan entry that was placed by the generator and is not manually locked, not external / not planned by me, and not frozen by the EXaHM/SEB room phase (phaseFixed). The frozen EXaHM/SEB placement from phase A is kept — to reset that too, call UnfixExamRoomsPhase first (then those entries become resettable). Blocked while the exam plan is published. Returns the number of entries removed.
func (*Plexams) ResetInvigilations ¶ added in v1.126.0
AssignInvigilations refreshes the self-invigilations and the todos, builds the planning problem, optimizes it and (unless dryRun) writes the result to invigilations_other, dropping the previous content. Self-invigilations stay in invigilations_self; pre-planned invigilations are included as fixed seeds. To fix an assignment across runs, move it to the pre-planning. ResetInvigilations drops the generated invigilations (invigilations_other) so that only the pre-planning (invigilations_pre_planned) remains; the self-invigilations are refreshed on the next generation. Blocked while the invigilation plan is published.
func (*Plexams) ResetPrimussData ¶ added in v1.232.0
ResetPrimussData deletes all imported Primuss Sammellisten collections (undoing an ImportPrimussZip); the manually maintained ancode overlay is kept. Returns the programs whose data was removed. Blocked while a validation or transfer/email is running.
func (*Plexams) ResetRoomsForExams ¶ added in v1.126.0
ResetRoomsForExams drops the generated room plan (planned_rooms) so that only the pre-planning (rooms_pre_planned) remains; a re-generation re-applies the pre-planned rooms. Blocked while the room plan is published.
func (*Plexams) RestoreDataset ¶ added in v1.219.0
func (p *Plexams) RestoreDataset(ctx context.Context, name string, data []byte) (*RestoreResult, error)
RestoreDataset restores a single dataset export into the current database. Simple datasets replace their collections; the external dataset replaces non_zpaexams and re-inserts only the external plan entries (by ancode), leaving the rest of the schedule untouched.
func (*Plexams) RestoreSemesterDump ¶ added in v1.219.0
RestoreSemesterDump restores a whole-semester ZIP (as produced by SemesterDumpZip) into the current database. It refuses (ErrDatabaseNotEmpty) if the database already holds planning data, so an existing semester can never be clobbered — create/switch to a fresh workspace first. The per-database semester_meta is intentionally left untouched so the workspace keeps its own identity and read-only flag.
func (*Plexams) RmConstraints ¶ added in v1.20.0
func (*Plexams) RmZpaExamFromPlan ¶
func (*Plexams) RoomByName ¶ added in v1.33.0
func (*Plexams) RoomRequests ¶ added in v1.115.0
RoomRequests returns all building-management room requests of the semester.
func (*Plexams) RoomsForSlot ¶
func (p *Plexams) RoomsForSlot(ctx context.Context, starttime time.Time) (*model.RoomsForSlot, error)
RoomsForSlot returns the allowed rooms for a single slot (computed live). For loops, compute the map once via roomsForSlotsMap instead.
func (*Plexams) RoomsForSlots ¶ added in v1.31.0
RoomsForSlots computes the allowed rooms per slot live from the current state (global rooms, EXaHM/Anny bookings, building-management requests, room blocks). There is no stored cache anymore.
func (*Plexams) RoomsFromRoomNames ¶ added in v1.33.0
func (*Plexams) RoomsWithFreeSeatsForSlot ¶ added in v1.130.0
func (p *Plexams) RoomsWithFreeSeatsForSlot(ctx context.Context, starttime time.Time) ([]*model.RoomWithFreeSeats, error)
RoomsWithFreeSeatsForSlot returns, for every room allowed in the slot, its capacity, how many seats are already used, the free seats and which exams use it — so the GUI can offer a (partly used) room for sharing, e.g. as a reserve.
func (*Plexams) RoomsWithInvigilationsForSlot ¶
func (*Plexams) SafeExamBrowser ¶
func (*Plexams) SameModulNamesBytes ¶ added in v1.235.0
SameModulNamesBytes builds the same-module-name PDF as bytes.
func (*Plexams) SaveEmailAttachment ¶ added in v1.102.0
func (p *Plexams) SaveEmailAttachment(ctx context.Context, kind, key, filename, contentType string, data []byte) error
SaveEmailAttachment stores one uploaded attachment for later sending.
func (*Plexams) SeedStudyProgramsFromConfig ¶ added in v1.159.0
SeedStudyProgramsFromConfig creates study programs from the configured program lists — fk07programs, oldprograms (retired fk07), mucdaiprograms (DE/GS/ID) and miscprograms (default GN) — without overwriting any that already exist. Returns the number newly created.
func (*Plexams) SemesterConfigInput ¶ added in v1.158.0
SemesterConfigInput returns the raw, editable per-semester config (source of truth). It falls back to the YAML when nothing is stored yet, so the GUI can always show and then save the current values.
func (*Plexams) SemesterDumpZip ¶ added in v1.219.0
SemesterDumpZip builds an in-memory ZIP with one MongoDB-Extended-JSON file per collection of the current (per-semester) database, plus a manifest.json. It is a full clone: imported ZPA/Primuss data is included alongside the local overlay, so the semester can be restored without re-importing. Types (ObjectIDs, dates, ints) are preserved via extended JSON.
func (*Plexams) SendAssembledExamMail ¶ added in v1.204.0
func (*Plexams) SendAssembledExamMails ¶ added in v1.204.0
func (*Plexams) SendCoverPageMail ¶ added in v1.40.0
func (*Plexams) SendCoverPagesMails ¶ added in v1.40.0
func (*Plexams) SendEmailDraft ¶ added in v1.29.0
func (*Plexams) SendEmailExaHM ¶ added in v1.66.0
func (*Plexams) SendEmailInvigilationReqMissing ¶ added in v1.82.0
func (p *Plexams) SendEmailInvigilationReqMissing(ctx context.Context, run bool, reporter Reporter) error
SendEmailInvigilationReqMissing sends an email to every invigilator who has not yet entered their invigilation requirements ("Anforderungen an die Planung der Prüfungsaufsichten") in the ZPA. They are warned that, without these requirements, they have to be planned with the full amount of invigilation duty (100%).
func (*Plexams) SendEmailInvigilations ¶ added in v1.31.0
func (*Plexams) SendEmailInvigilationsSecretariat ¶ added in v1.150.0
func (p *Plexams) SendEmailInvigilationsSecretariat(ctx context.Context, run bool, reporter Reporter) error
SendEmailInvigilationsSecretariat sends the secretariat a short note that the invigilation planning is finished, everything is in ZPA and the plan may be posted. Answerable by email (no JIRA). Send-once (condInvigSecretariatSent), after the invigilation plan has been published.
func (*Plexams) SendEmailKdpExahm ¶ added in v1.145.0
SendEmailKdpExahm sends the KDP the overview of the EXaHM/SEB room planning, ordered by day/time and room (with a per-exam recap), plus a room-oriented CSV attachment. Answerable by email (no JIRA). Send-once (condKdpRoomsSent), after the room plan has been published.
func (*Plexams) SendEmailLbaRepeaters ¶ added in v1.146.0
SendEmailLbaRepeaters sends the Lehrbeauftragten-Beauftragte:r (emails.lbaba) an overview of all repeat exams of LBAs that I planned — only dates and invigilations — so they know whom to remind. Answerable by email (no JIRA). Send-once (condLbaRepeatersSent).
func (*Plexams) SendEmailPublishedExams ¶ added in v1.39.0
func (*Plexams) SendEmailPublishedInvigilations ¶ added in v1.39.0
func (p *Plexams) SendEmailPublishedInvigilations(ctx context.Context, run bool, reporter Reporter) error
SendEmailPublishedInvigilations sends one individual email per invigilator who has a personal plan PNG (upload store or invigilationStats.dir), attaching it. Invigilators that have an assignment but no calendar are reported and skipped.
func (*Plexams) SendEmailPublishedRooms ¶ added in v1.39.0
SendEmailPublishedRooms sends one individual "rooms published" email per examer with exams planned by me, listing the planned rooms of all their exams with student counts, reserve flag, the NTAs in the rooms and which other exams share the same room in the same slot (co-usage). Send-once (condRoomPlanPublished).
func (*Plexams) SendEmailRoomRequests ¶ added in v1.117.0
SendEmailRoomRequests sends the request for building-management rooms to the Gebäudemanagement. It lists all active room requests grouped by room and then by day, with their (buffered) time ranges. run == false is a dry run that only mails the dry-run recipient.
func (*Plexams) SendEmailRoomsSecretariat ¶ added in v1.138.0
SendEmailRoomsSecretariat sends the secretariat one email listing, per room that does not have to be requested separately, when the room is occupied by an exam. Overlapping times (e.g. caused by NTAs) are merged, and the secretariat is asked to check the occupancy against ZPA. Send-once (condSecretariatRoomsSent), meant to be sent before the room plan is published.
func (*Plexams) SendExamPlanningInfoMails ¶ added in v1.195.0
func (p *Plexams) SendExamPlanningInfoMails(ctx context.Context, teacherIDs []int, run bool, reporter Reporter) error
SendExamPlanningInfoMails sends the consolidated exam-planning info email to the given examers (teacherIDs; empty = all candidates). Per examer it lists the exams I plan with their constraints (no slot/date), or — for FK07 examers I plan nothing for — a note that I plan none of theirs. run=false is a dry run (only the planner is mailed).
func (*Plexams) SendHandicapsMailToStudentPlanned ¶ added in v1.11.0
func (*Plexams) SendHandicapsMailToStudentRoomAlone ¶ added in v1.11.0
func (*Plexams) SendHandicapsMailsNTAPlanned ¶ added in v1.11.0
func (*Plexams) SendHandicapsMailsNTARoomAlone ¶
func (*Plexams) SendMailNewNTA ¶ added in v1.65.0
func (*Plexams) SendTestMail ¶
SendTestMail sends a fixed SMTP smoke-test mail to the planner.
func (*Plexams) SendUnplannedExamMail ¶ added in v1.54.0
func (*Plexams) ServerInfo ¶ added in v1.219.0
ServerInfo reports the running server's build version and the MongoDB it is connected to, e.g. for the GUI footer.
func (*Plexams) SetAnnyPersonalizationNames ¶ added in v1.181.0
func (*Plexams) SetEmailTemplate ¶ added in v1.213.0
func (*Plexams) SetExamDuration ¶ added in v1.173.0
func (p *Plexams) SetExamDuration(ctx context.Context, ancode, duration int) (*model.ExamDurationOverride, error)
SetExamDuration sets the duration override (minutes) for an ancode. It is only applied to assembled exams whose ZPA duration is 0.
func (*Plexams) SetExamTime ¶ added in v1.223.0
SetExamTime places one of our own exams at an absolute start time (the source of truth). Any time is accepted; the derived day/slot follow from the current slot grid (0 when the time is outside the exam period). The GUI warns for non-standard times.
func (*Plexams) SetExamsCanShareSlot ¶ added in v1.207.0
SetExamsCanShareSlot declares that two exams may share a slot.
func (*Plexams) SetExternalExamTime ¶ added in v1.175.0
func (p *Plexams) SetExternalExamTime(ctx context.Context, ancode int, date, t string) (bool, error)
SetExternalExamTime sets the external date/time of an exam (e.g. a MUC.DAI exam planned by another faculty): it computes the matching slot and stores it as the plan entry's externalTime. date is dd.mm.yyyy, t is HH:MM (Europe/Berlin).
func (*Plexams) SetGenerationConfig ¶ added in v1.173.0
func (p *Plexams) SetGenerationConfig(ctx context.Context, cfg *model.GenerationConfig) (*model.GenerationConfig, error)
SetGenerationConfig stores the global generation config.
func (*Plexams) SetInvigilatorConstraints ¶ added in v1.139.0
func (p *Plexams) SetInvigilatorConstraints(ctx context.Context, input model.InvigilatorConstraintsInput) (*model.InvigilatorConstraints, error)
SetInvigilatorConstraints creates or replaces the whole constraints record of one invigilator. Empty records (no exclusion, no dates, no windows) are stored too, so the GUI can keep an explicit "no constraints" entry.
func (*Plexams) SetMucDaiZpaLink ¶ added in v1.198.0
func (p *Plexams) SetMucDaiZpaLink(ctx context.Context, program string, primussAncode, zpaAncode int) (*model.MucDaiExam, error)
SetMucDaiZpaLink manually links a MUC.DAI exam to a ZPA exam (the unresolved/wrong FK07 cases). Stored as a manual link that survives re-imports. Returns the updated exam.
func (*Plexams) SetNTAActive ¶ added in v1.111.0
SetNTAActive activates/deactivates an NTA (key: mtknr). A deactivated NTA is not added to exams during prepare/generate. Errors if the mtknr does not exist.
func (*Plexams) SetPermanentNonInvigilator ¶ added in v1.140.0
func (p *Plexams) SetPermanentNonInvigilator(ctx context.Context, teacherID int, name, reason string) (*model.PermanentNonInvigilator, error)
SetPermanentNonInvigilator adds or updates a permanent (cross-semester) non-invigilator. If name is empty it tries to resolve the teacher's name (so a CLI/API caller need not supply it for teachers still in the pool).
func (*Plexams) SetPlaner ¶ added in v1.164.0
SetPlaner stores the planner in the global DB and applies it to the running instance.
func (*Plexams) SetPlanningCondition ¶ added in v1.121.0
func (*Plexams) SetPreplanExamCanShareSlot ¶ added in v1.189.0
func (p *Plexams) SetPreplanExamCanShareSlot(ctx context.Context, id, otherID int, canShare bool) (*model.PreplanExam, error)
SetPreplanExamCanShareSlot marks (canShare=true) or unmarks (false) otherID as "may run at the same time / right after" id despite a shared study program. The link is kept symmetric and cancels the program-based spreading for that pair.
func (*Plexams) SetPreplanExamConstraints ¶ added in v1.183.0
func (p *Plexams) SetPreplanExamConstraints(ctx context.Context, id int, input *model.ConstraintsInput) (*model.PreplanExam, error)
SetPreplanExamConstraints stores the constraints of a pre-exam. It reuses the normal ConstraintsInput; the `sameSlot` ints reference other PRE-EXAM ids (not ancodes) and are kept symmetric (the link is mirrored onto the referenced pre-exams), so the order in which they are later connected to ZPA ancodes does not matter.
func (*Plexams) SetPreplanExamFixed ¶ added in v1.186.0
func (p *Plexams) SetPreplanExamFixed(ctx context.Context, id int, fixed bool) (*model.PreplanExam, error)
SetPreplanExamFixed pins or unpins the pre-exam's current slot. A fixed pre-exam keeps its slot when the automatic assignment is regenerated. Fixing only makes sense for a slotted exam, so it is rejected when the exam has no slot.
func (*Plexams) SetPreplanExamNotSameSlot ¶ added in v1.188.0
func (p *Plexams) SetPreplanExamNotSameSlot(ctx context.Context, id, otherID int, conflict bool) (*model.PreplanExam, error)
SetPreplanExamNotSameSlot marks (conflict=true) or unmarks (false) otherID as a "must not run at the same time" partner of id (same students). The link is kept symmetric. Soft: the automatic assignment then spreads the two apart.
func (*Plexams) SetPreplanExamTime ¶ added in v1.234.0
func (p *Plexams) SetPreplanExamTime(ctx context.Context, id int, starttime *time.Time) (*model.PreplanExam, error)
SetPreplanExamTime assigns (or, with nil, clears) the absolute start time of a pre-exam. Any time is accepted (the source of truth); a time that matches no booked slot simply leaves the exam effectively unplaced for capacity purposes.
func (*Plexams) SetRoomActive ¶ added in v1.112.0
SetRoomActive activates/deactivates a room (key: name). A deactivated room is not used when computing the rooms available for planning. Errors if the room does not exist.
func (*Plexams) SetRoomRequestActive ¶ added in v1.115.0
func (p *Plexams) SetRoomRequestActive(ctx context.Context, room string, starttime time.Time, active bool) (*model.RoomRequest, error)
SetRoomRequestActive activates/deactivates a room request (key: room/starttime). An inactive request is not used for room planning. Errors if it does not exist.
func (*Plexams) SetRoomRequestApproved ¶ added in v1.115.0
func (p *Plexams) SetRoomRequestApproved(ctx context.Context, room string, starttime time.Time, approved bool) (*model.RoomRequest, error)
SetRoomRequestApproved sets the approved flag of a room request (key: room/starttime). Errors if no such request exists.
func (*Plexams) SetSemesterConfigInput ¶ added in v1.158.0
func (p *Plexams) SetSemesterConfigInput(ctx context.Context, data *model.SemesterConfigInputData) (*model.SaveSemesterConfigResult, error)
SetSemesterConfigInput validates and stores a new raw per-semester config, recomputes the derived config and snapshot, and returns non-fatal warnings for changes that may invalidate an existing plan (the change is still applied).
func (*Plexams) SetSemesterReadOnly ¶ added in v1.178.0
SetSemesterReadOnly protects/unprotects the current semester database.
func (*Plexams) SetStudentConflictDecision ¶ added in v1.207.0
func (p *Plexams) SetStudentConflictDecision(ctx context.Context, ancode1, ancode2 int, mtknr string, decision model.ConflictDecision) (bool, error)
SetStudentConflictDecision sets an explicit per-student decision: ACCEPT drops that student's proximity penalty (same-slot stays hard); VETO forces the conflict to count at full weight, overriding an automatic repeat down-weighting.
func (*Plexams) ShowInvigilationProblem ¶ added in v1.84.0
ShowInvigilationProblem builds the invigilation snapshot from the DB and prints a summary. It is read-only and meant to sanity-check the inputs before the optimizer (Phase 3) is run.
func (*Plexams) SlotForAncode ¶
func (*Plexams) SpecialInterests ¶ added in v1.173.0
SpecialInterests returns all special-interest groups.
func (*Plexams) StudentByMtknr ¶
func (*Plexams) StudentConflictDecisions ¶ added in v1.207.0
func (p *Plexams) StudentConflictDecisions(ctx context.Context) ([]*model.StudentConflictDecision, error)
StudentConflictDecisions returns all explicit per-student conflict decisions.
func (*Plexams) StudentRegsForProgram ¶
func (*Plexams) StudentRegsImportErrors ¶
func (*Plexams) StudentRegsPerStudentPlanned ¶
func (*Plexams) StudentRegsState ¶ added in v1.174.0
StudentRegsState returns whether the prepared student regs are stale. They can only be stale once they have been prepared at least once; before that the state is reported as not dirty.
func (*Plexams) StudentsByName ¶
func (*Plexams) StudyPrograms ¶ added in v1.159.0
StudyPrograms returns all study programs (Studiengänge), global/cross-semester.
func (*Plexams) SwitchSemester ¶ added in v1.177.0
func (p *Plexams) SwitchSemester(ctx context.Context, name, semesterOverride string) (*model.Semester, error)
SwitchSemester repoints the running instance to another database at runtime.
name identifies the target database (an allSemesterNames label, e.g. "2026 SS" or a clone "2026 SS-Test"). The logical semester used against external systems (ZPA) is the database's own stored semester, so a clone keeps the real semester (e.g. "2026 SS") instead of its database name. semesterOverride is only needed for an empty database that has no stored semester yet (it is then remembered).
Single-user only: refused while an operation (validation/import/email/upload) is running; the GUI must refetch all data afterwards. The target may be empty (no config yet) — the config is then nil until created/imported.
func (*Plexams) SyncLog ¶ added in v1.156.0
SyncLog returns the transfer history (newest first; limit <= 0 = all).
func (*Plexams) TryBeginExclusiveOp ¶ added in v1.101.0
TryBeginExclusiveOp registers a running exclusive operation (ZPA transfer or email send), unless a validation or another exclusive operation is in progress. Returns false if the operation must not start. On success the caller must call EndExclusiveOp when done.
func (*Plexams) TryBeginValidation ¶ added in v1.99.0
TryBeginValidation registers a running validation, unless an exclusive operation is in progress. Returns false if the validation must not start. On success the caller must call EndValidation when done.
func (*Plexams) UnblockRoomForSlot ¶ added in v1.119.0
func (p *Plexams) UnblockRoomForSlot(ctx context.Context, room string, starttime time.Time) (bool, error)
UnblockRoomForSlot removes a room-slot block. Errors if no such block exists.
func (*Plexams) UnfixExamRoomsPhase ¶ added in v1.207.0
UnfixExamRoomsPhase clears the phase-A fix on all plan entries (the manual Locked stays untouched).
func (*Plexams) UnlockExam ¶
func (*Plexams) UnplacedExams ¶ added in v1.137.1
UnplacedExams returns the students that could not be assigned a real room in their slot during the last room generation.
func (*Plexams) UpdateNta ¶ added in v1.111.0
UpdateNta updates the editable fields of an existing NTA (identified by its mtknr), preserving the server-managed fields exams, deactivated and lastSemester. It errors if no NTA with that mtknr exists.
func (*Plexams) UpdatePreplanExam ¶ added in v1.160.0
func (p *Plexams) UpdatePreplanExam(ctx context.Context, id int, input *model.PreplanExamInput) (*model.PreplanExam, error)
UpdatePreplanExam validates and replaces an existing pre-exam, keeping its id, slot assignment and ancode link.
func (*Plexams) UpdateRoom ¶ added in v1.113.0
UpdateRoom updates an existing room (key: name), keeping its active state. Errors if the room does not exist.
func (*Plexams) UpdateRoomRequestTime ¶ added in v1.117.0
func (p *Plexams) UpdateRoomRequestTime(ctx context.Context, room string, starttime time.Time, from, until time.Time) (*model.RoomRequest, error)
UpdateRoomRequestTime changes the time range of an existing room request, e.g. to extend it for an NTA (key: room/starttime). Errors if it does not exist.
func (*Plexams) UploadPlan ¶
func (*Plexams) UpsertAdditionalExam ¶ added in v1.173.0
func (p *Plexams) UpsertAdditionalExam(ctx context.Context, exam *model.AdditionalExam) (*model.AdditionalExam, error)
UpsertAdditionalExam creates or updates one additional exam (key: ancode).
func (*Plexams) UpsertSpecialInterest ¶ added in v1.173.0
func (p *Plexams) UpsertSpecialInterest(ctx context.Context, si *model.SpecialInterest) (*model.SpecialInterest, error)
UpsertSpecialInterest creates or updates one special-interest group (key: name).
func (*Plexams) UpsertStudyProgram ¶ added in v1.159.0
func (p *Plexams) UpsertStudyProgram(ctx context.Context, program *model.StudyProgram) (*model.StudyProgram, error)
UpsertStudyProgram creates or updates one study program (key: shortname).
func (*Plexams) ValidateConflicts ¶
func (*Plexams) ValidateConstraints ¶
func (p *Plexams) ValidateConstraints(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) ValidateDBConstraints ¶ added in v1.217.0
func (p *Plexams) ValidateDBConstraints(reporter Reporter) (*model.ValidationReport, error)
ValidateDBConstraints checks the constraints collection for dangling references and for the one plan-vs-constraint invariant not covered by ValidateConstraints: a FixedDay constraint must match the day the exam is actually planned on (the FIXME in ValidateConstraints). SameSlot / FixedTime / ExcludeDays / PossibleDays are validated by ValidateConstraints and deliberately not repeated here.
func (*Plexams) ValidateDBNtas ¶ added in v1.217.0
func (p *Plexams) ValidateDBNtas(reporter Reporter) (*model.ValidationReport, error)
ValidateDBNtas checks the sanity of the NTA collection: every NTA has a Matrikelnummer (the TODO in validate.go), a plausible duration delta, and no duplicate Matrikelnummer.
func (*Plexams) ValidateDBPlanEntries ¶ added in v1.217.0
func (p *Plexams) ValidateDBPlanEntries(reporter Reporter) (*model.ValidationReport, error)
ValidateDBPlanEntries checks the structural integrity of the plan collection: no ancode planned twice, every planned ancode is a real exam, every entry sits in a valid slot (or is a legitimate external-time-only entry), and the slot/external-time fields are mutually consistent.
func (*Plexams) ValidateDBReferences ¶ added in v1.217.0
func (p *Plexams) ValidateDBReferences(reporter Reporter) (*model.ValidationReport, error)
ValidateDBReferences checks that the per-exam auxiliary collections only reference exams that exist: duration overrides, canShareSlot pairs and MUC.DAI links.
func (*Plexams) ValidateDBRooms ¶ added in v1.217.0
func (p *Plexams) ValidateDBRooms(reporter Reporter) (*model.ValidationReport, error)
ValidateDBRooms checks the integrity of the planned_rooms collection — the main open TODO ("all planned_rooms okay? especially after moving an exam? room -> slot -> ancode sameslot?"). It verifies every planned room belongs to a planned exam and sits in that exam's slot, references a real active room, seats only registered students, seats no student twice for the same exam, and carries a valid NTA reference.
func (*Plexams) ValidateInvigilationConstraints ¶ added in v1.84.0
func (p *Plexams) ValidateInvigilationConstraints(reporter Reporter) (*model.ValidationReport, error)
ValidateInvigilationConstraints checks the persisted invigilation plan (invigilations_self + invigilations_other) against the shared invigplan constraints – the exact same hard and soft rules the automatic generator uses. It runs in addition to the hand-written invigilator validations.
func (*Plexams) ValidateInvigilationDups ¶
func (p *Plexams) ValidateInvigilationDups(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) ValidateInvigilationsTimeDistance ¶
func (p *Plexams) ValidateInvigilationsTimeDistance(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) ValidateInvigilatorRequirements ¶
func (p *Plexams) ValidateInvigilatorRequirements(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) ValidateInvigilatorSlots ¶
func (p *Plexams) ValidateInvigilatorSlots(reporter Reporter) (*model.ValidationReport, error)
TODO: NTA- und Reserve-Aufsicht (wenn NTA) nicht im folgenden Slot einteilen!
func (*Plexams) ValidatePreplanAssignment ¶ added in v1.162.0
ValidatePreplanAssignment checks the current slot assignment of the pre-exams: unassigned exams, per-slot/kind capacity overflow, and study programs shared by more than one exam in the same slot. ok is true when there are no findings.
func (*Plexams) ValidateRoomsBlocked ¶ added in v1.119.0
func (p *Plexams) ValidateRoomsBlocked(reporter Reporter) (*model.ValidationReport, error)
ValidateRoomsBlocked warns when a room that is blocked for a slot is still planned in that slot (the block only takes effect on the next rooms-for-exams run, so this surfaces the inconsistency until then).
func (*Plexams) ValidateRoomsEnoughSeats ¶ added in v1.129.0
func (p *Plexams) ValidateRoomsEnoughSeats(reporter Reporter) (*model.ValidationReport, error)
ValidateRoomsEnoughSeats warns when an exam is packed too tightly, i.e. its normal rooms (NTA-alone rooms excluded, reserve rooms counted as free) leave fewer free seats than the buffer max(roomFreeSeatsMin, roomFreeSeatsPercent%).
func (*Plexams) ValidateRoomsNeedRequest ¶
func (p *Plexams) ValidateRoomsNeedRequest(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) ValidateRoomsPerExam ¶
func (p *Plexams) ValidateRoomsPerExam(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) ValidateRoomsPerSlot ¶
func (p *Plexams) ValidateRoomsPerSlot(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) ValidateRoomsTimeDistance ¶
func (p *Plexams) ValidateRoomsTimeDistance(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) ValidateStudentRegs ¶ added in v1.57.0
func (p *Plexams) ValidateStudentRegs(reporter Reporter) (*model.ValidationReport, error)
ValidateStudentRegs reports students registered in more than one program. This is purely imported Primuss data that we cannot fix in plexams (it has to be corrected in Primuss), so the findings are info, not errors.
func (*Plexams) ValidateZPADateTimes ¶
func (p *Plexams) ValidateZPADateTimes(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) ValidateZPAInvigilators ¶
func (p *Plexams) ValidateZPAInvigilators(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) ValidateZPARooms ¶
func (p *Plexams) ValidateZPARooms(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) WritesAllowed ¶ added in v1.99.0
WritesAllowed reports whether writes are currently permitted, i.e. no validation and no exclusive operation is running.
func (*Plexams) ZpaExamsPlaningStatusUnknown ¶
func (*Plexams) ZpaExamsToPlanWithConstraints ¶
type PrimussAncode ¶
type Reporter ¶ added in v1.98.0
type Reporter interface {
// Printf / Println emit a normal output line (may contain ANSI color codes).
Printf(format string, a ...any)
Println(a ...any)
// Step emits a transient status message. Consumers should render it in-place
// (spinner style) instead of appending a new line each time.
Step(msg string)
// Progress emits a throttled optimizer snapshot, rendered in-place like Step.
Progress(p invigplan.Progress)
// StopProgress ends the current progress display with a success message.
StopProgress(finalMsg string)
// StopProgressFail ends the current progress display with a failure message.
StopProgressFail(finalMsg string)
// Warnf emits a warning line.
Warnf(format string, a ...any)
}
Reporter receives the human-readable output of a long-running operation (e.g. AssignInvigilations). It decouples the operation from where the output goes: the CLI uses ConsoleReporter (stdout, colored, with a spinner), the GraphQL server uses a streaming reporter that forwards every line to a subscription. Implementations must be safe to call from the goroutine that runs the operation.
type RestoreResult ¶ added in v1.219.0
RestoreResult reports how many documents were written per collection.
type UnpplannedExamMailData ¶ added in v1.54.0
type UnpplannedExamMailData struct {
Exam *model.PrimussExam
PlanerName string
}
Source Files
¶
- additional_exam.go
- anny.go
- assembledExams.go
- assembled_exams_state.go
- constraints.go
- csv.go
- csv_export.go
- dump.go
- email.go
- email_assembled.go
- email_attachments.go
- email_constraints.go
- email_cover_pages.go
- email_draft.go
- email_exahm.go
- email_exam_planning.go
- email_invigilations.go
- email_invigilations_missing.go
- email_invigilations_secretariat.go
- email_kdp.go
- email_lbaba.go
- email_nta.go
- email_published.go
- email_published_rooms.go
- email_render.go
- email_room_requests.go
- email_rooms_secretariat.go
- email_template_catalog.go
- exam.go
- exam_conflict.go
- exam_duration.go
- examplan_build.go
- examplan_time.go
- export.go
- generation_config.go
- guard.go
- ics.go
- ics_invigilator.go
- invigilation.go
- invigilation_generate.go
- invigilator_constraints.go
- invigilators.go
- mucdai.go
- mucdai_import.go
- mucdai_links.go
- mutation_log.go
- nta.go
- nta_room_alone_waivers.go
- pdf.go
- pdfDraft.go
- pdfDraftFS.go
- pdfDraftSI.go
- pdf_export.go
- plan.go
- planer.go
- plannedExams.go
- planning_state.go
- plexams.go
- preparation.go
- prepare.go
- preplan_assign.go
- preplan_booking.go
- preplan_connect.go
- preplan_constraints.go
- preplan_exams.go
- preplan_overview.go
- preplan_solve.go
- primuss.go
- primuss_fixData.go
- primuss_import_http.go
- program.go
- reporter.go
- reporter_discard.go
- request_rooms.go
- room_buffer.go
- room_requests.go
- room_requests_generate.go
- rooms.go
- roomsPrepare.go
- rooms_blocked.go
- rooms_for_slots.go
- rooms_free_seats.go
- samename.go
- semester_config.go
- semester_switch.go
- server_info.go
- special_interest.go
- statistics.go
- student.go
- studentRegs.go
- student_regs_state.go
- study_programs.go
- validate.go
- validate_db.go
- validate_invigilation.go
- validate_invigilation_constraints.go
- validate_preconditions.go
- validate_rooms.go
- validate_studentregs.go
- validate_zpa.go
- validation_report.go
- zpa.go
- zpa_get.go
- zpa_import.go
- zpa_post.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package anny integrates the Anny room-booking system (anny.eu): it fetches the bookings from the Anny API, stores them, and answers queries about them and about the personalization configuration that decides which bookings are "ours".
|
Package anny integrates the Anny room-booking system (anny.eu): it fetches the bookings from the Anny API, stores them, and answers queries about them and about the personalization configuration that decides which bookings are "ours". |
|
Package conflictcalc holds the pure schedule-conflict math: normalising an ancode pair into a stable key, ranking a conflict's proximity (how close in time two of a student's exams ended up), classifying two placed exams by their absolute times and durations, and diffing a freshly generated conflict list against the saved one.
|
Package conflictcalc holds the pure schedule-conflict math: normalising an ancode pair into a stable key, ranking a conflict's proximity (how close in time two of a student's exams ended up), classifying two placed exams by their absolute times and durations, and diffing a freshly generated conflict list against the saved one. |
|
Package csvgen builds the CSV export rows from already-fetched planning data.
|
Package csvgen builds the CSV export rows from already-fetched planning data. |
|
Package email is the email rendering toolkit: it turns a Markdown body template plus data into the plain-text and HTML parts of a mail, wrapped in the shared layout, and manages the DB-backed, editable per-template overrides.
|
Package email is the email rendering toolkit: it turns a Markdown body template plus data into the plain-text and HTML parts of a mail, wrapped in the shared layout, and manages the DB-backed, editable per-template overrides. |
|
Package examplan generates the exam schedule (Terminplan): it assigns every exam (unit) to a time slot on top of the generic simulated-annealing core in plexams/optimize.
|
Package examplan generates the exam schedule (Terminplan): it assigns every exam (unit) to a time slot on top of the generic simulated-annealing core in plexams/optimize. |
|
Package invigcalc computes the fair distribution of invigilation duties: given the total invigilation minutes to cover and each invigilator's factor and already-credited contributions, it derives the per-invigilator target minutes (factor-weighted, with largest-remainder rounding so the targets sum exactly to the work) and the per-invigilator todo summary.
|
Package invigcalc computes the fair distribution of invigilation duties: given the total invigilation minutes to cover and each invigilator's factor and already-credited contributions, it derives the per-invigilator target minutes (factor-weighted, with largest-remainder rounding so the targets sum exactly to the work) and the per-invigilator todo summary. |
|
Package invigplan contains the pure (DB- and ZPA-free) domain model and the hard/soft constraints used to plan invigilations (Aufsichten) automatically.
|
Package invigplan contains the pure (DB- and ZPA-free) domain model and the hard/soft constraints used to plan invigilations (Aufsichten) automatically. |
|
Package mucdai holds the pure MUC.DAI CSV import parsing: turning a raw CSV export (of varying encoding and delimiter) into db.MucDaiExam records grouped by program.
|
Package mucdai holds the pure MUC.DAI CSV import parsing: turning a raw CSV export (of varying encoding and delimiter) into db.MucDaiExam records grouped by program. |
|
Package optimize is a generic simulated-annealing engine shared by the schedule generators (exam schedule, pre-plan, invigilations).
|
Package optimize is a generic simulated-annealing engine shared by the schedule generators (exam schedule, pre-plan, invigilations). |
|
Package pdfgen renders the planning PDFs (maroto documents) from already-fetched data.
|
Package pdfgen renders the planning PDFs (maroto documents) from already-fetched data. |
|
Package planstate is the generic planning-state engine: a 1-safe condition/event Petri net where each condition is a milestone that can be set automatically (Mark) or by hand (SetCondition), and a condition with a gate locks the matching generation while it is set.
|
Package planstate is the generic planning-state engine: a 1-safe condition/event Petri net where each condition is a milestone that can be set automatically (Mark) or by hand (SetCondition), and a condition with a gate locks the matching generation while it is set. |
|
Package preplancalc holds the pure room-capacity math of the SEB/EXaHM pre-planning: which rooms cover a slot's seat demand for a kind (honouring per-exam room restrictions), how many seats a room set provides, which rooms still need to be booked, and the per-program clashes within a slot.
|
Package preplancalc holds the pure room-capacity math of the SEB/EXaHM pre-planning: which rooms cover a slot's seat demand for a kind (honouring per-exam room restrictions), how many seats a room set provides, which rooms still need to be booked, and the per-program clashes within a slot. |
|
Package primuss imports the Primuss "Sammellisten" data from the XLSX files (student registrations, exams, planning counts, conflicts) into the raw per-program collections, with change detection on re-import.
|
Package primuss imports the Primuss "Sammellisten" data from the XLSX files (student registrations, exams, planning counts, conflicts) into the raw per-program collections, with change detection on re-import. |
|
Package repeatcalc holds the pure study-group-semester repeat heuristic: reading the semester number out of a study-group code and deciding whether an exam is (likely) a repeat for a student.
|
Package repeatcalc holds the pure study-group-semester repeat heuristic: reading the semester number out of a study-group code and deciding whether an exam is (likely) a repeat for a student. |
|
Package roomcalc holds the pure room-seat math of the room preparation: whether a room satisfies an exam's room constraints (EXaHM/SEB/Lab/socket/allowed-rooms feature matching), the required free-seat buffer for an exam, and the free seats an exam currently has across its rooms.
|
Package roomcalc holds the pure room-seat math of the room preparation: whether a room satisfies an exam's room constraints (EXaHM/SEB/Lab/socket/allowed-rooms feature matching), the required free-seat buffer for an exam, and the free seats an exam currently has across its rooms. |
|
Package rooms holds the stateful per-slot room-allocation machine that assigns concrete rooms to the exams planned in a slot.
|
Package rooms holds the stateful per-slot room-allocation machine that assigns concrete rooms to the exams planned in a slot. |
|
Package zpaimport holds the pure decision logic of the ZPA import: diffing a fresh import against the previous DB state into a SyncLogEntry plus human-readable report lines, classifying a ZPA exam for the automatic to-plan pre-selection, and computing the new to-plan / not-to-plan sets.
|
Package zpaimport holds the pure decision logic of the ZPA import: diffing a fresh import against the previous DB state into a SyncLogEntry plus human-readable report lines, classifying a ZPA exam for the automatic to-plan pre-selection, and computing the new to-plan / not-to-plan sets. |