Documentation
¶
Index ¶
- Constants
- func CalculatedAllowedSlots(semesterConfigSlots []*model.Slot, goSlots [][]int, isGO bool, ...) []*model.Slot
- func PrintGOSlots(semesterConfigSlots []*model.Slot, goSlots [][]int) error
- type AnnyBooking
- type BookedEntry
- 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 CsvExam
- type CsvExamEXaHM
- type CsvKdpRoom
- type CsvLBARepeater
- type Email
- type Event
- type ExahmEmail
- type ExportNtas
- type ExportPlannedRooms
- type GeneratedExamMailData
- type HandicapExam
- type HandicapStudent
- type HandicapsEmail
- type InvigilationMissingMailData
- type InvigilationsEmail
- type KdpEmail
- type KnownConflict
- 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) AddExamToSlot(ctx context.Context, ancode int, dayNumber int, timeNumber int, force bool) (bool, error)
- func (p *Plexams) AddExamToSlottime(ctx context.Context, ancode int, time time.Time) (bool, error)
- func (p *Plexams) AddInvigilation(ctx context.Context, room string, day, slot, 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) 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) AddRoom(ctx context.Context, input model.RoomInput) (*model.Room, error)
- func (p *Plexams) AddRoomRequest(ctx context.Context, room string, day, slot int, 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) 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) ApplyRoomRequestsPreview(ctx context.Context, force bool) (int, error)
- func (p *Plexams) AwkwardSlots(ctx context.Context, ancode int) ([]*model.Slot, error)
- func (p *Plexams) BlockRoomForSlot(ctx context.Context, room string, day, slot int, reason *string) (*model.BlockedRoom, error)
- func (p *Plexams) BlockRoomForSlots(ctx context.Context, room string, slots []*model.SlotInput, reason *string) ([]*model.BlockedRoom, error)
- func (p *Plexams) BlockedRooms(ctx context.Context) ([]*model.BlockedRoom, 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) ChangeRoom(ctx context.Context, ancode int, oldRoomName, newRoomName string) (bool, 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) 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) ConstraintsPDF(ctx context.Context, outfile string) error
- func (p *Plexams) CsvForEXaHM(filename string) error
- func (p *Plexams) CsvForLBARepeater(filename string) error
- func (p *Plexams) CsvForProgram(program, filename string) error
- func (p *Plexams) DeleteInvigilatorConstraints(ctx context.Context, teacherID int) (bool, error)
- func (p *Plexams) DraftExahmPDF(ctx context.Context, outfile string) error
- func (p *Plexams) DraftFS(ctx context.Context, outfile string) error
- func (p *Plexams) DraftFSBytes(ctx context.Context) ([]byte, error)
- func (p *Plexams) DraftFk08PDF(ctx context.Context, outfile string) error
- func (p *Plexams) DraftFk10PDF(ctx context.Context, outfile string) error
- func (p *Plexams) DraftLbaRep(ctx context.Context) error
- func (p *Plexams) DraftMucDaiPDF(ctx context.Context, outfile string) error
- func (p *Plexams) DraftSI(ctx context.Context) error
- func (p *Plexams) EmailAttachmentInfos(ctx context.Context, kind string) ([]*model.EmailAttachmentInfo, 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) ([]BookedEntry, error)
- func (p *Plexams) ExamInfo(ancode int) (string, error)
- func (p *Plexams) ExamerInPlan(ctx context.Context) ([]*model.ExamerInPlan, error)
- func (p *Plexams) ExamersWithExamsPlannedByMe(ctx context.Context) ([]*model.Teacher, error)
- func (p *Plexams) ExamsInSlot(ctx context.Context, day int, time int) ([]*model.PlannedExam, 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) ExcludeDays(ctx context.Context, ancode int, dayStrings []string) (bool, error)
- func (p *Plexams) ExportICS(program string, filename string) error
- func (p *Plexams) ExportPlannedRooms(jsonfile string) error
- func (p *Plexams) FetchFromAnny(ctx context.Context, reporter Reporter) error
- func (p *Plexams) GenerateExamsToPlanPDF(ctx context.Context, outfile string) error
- func (p *Plexams) GenerateInvigilations(ctx context.Context, dryRun bool, opts invigplan.Options, reporter Reporter) (*model.InvigilationReport, error)
- func (p *Plexams) GenerateRoomRequestsPreview(ctx context.Context) ([]*model.RoomRequestPreview, error)
- func (p *Plexams) GeneratedExam(ctx context.Context, ancode int) (*model.GeneratedExam, error)
- func (p *Plexams) GeneratedExams(ctx context.Context) ([]*model.GeneratedExam, error)
- func (p *Plexams) GeneratedExamsForExamer(ctx context.Context, examerID int) ([]*model.GeneratedExam, 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) GetExamsForStudent(name string) errordeprecated
- func (p *Plexams) GetFk07programs(ctx context.Context) ([]*model.FK07Program, error)
- func (p *Plexams) GetGoSlots() [][]int
- 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) GetInvigilatorForRoom(ctx context.Context, name string, day, time int) (*model.Teacher, error)
- func (p *Plexams) GetInvigilatorInSlot(ctx context.Context, roomname string, day, time int) (*model.Teacher, error)
- func (p *Plexams) GetInvigilators(ctx context.Context) ([]*model.ZPAInvigilator, 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) GetStarttime(dayNumber, slotNumber int) (*time.Time, error)
- 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) HTTPUploadEmailAttachment(w http.ResponseWriter, r *http.Request)
- func (p *Plexams) HTTPUploadEmailAttachmentsZip(w http.ResponseWriter, r *http.Request)
- 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) ImportTeachersFromZPA(ctx context.Context, reporter Reporter) (int, error)
- func (p *Plexams) InvigilationTodos(ctx context.Context) (*model.InvigilationTodos, error)deprecated
- func (p *Plexams) Invigilator(ctx context.Context, room string, day int, time int) (*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, day int) (*model.InvigilatorsForDay, error)
- func (p *Plexams) InvigilatorsWithReq(ctx context.Context) ([]*model.Invigilator, error)
- func (p *Plexams) Lab(ctx context.Context, ancode int) (bool, error)
- func (p *Plexams) LockExam(ctx context.Context, ancode int) (*model.PlanEntry, *model.GeneratedExam, error)
- func (p *Plexams) LockPlan(ctx context.Context) error
- func (p *Plexams) MakeSelfInvigilations(ctx context.Context) ([]*model.Invigilation, error)
- func (p *Plexams) MigrateInvigilatorConstraintsFromConfig(ctx context.Context) (int, error)
- func (p *Plexams) MigrateRoomRequestsFromConfig(ctx context.Context) (int, error)
- func (p *Plexams) MigrateRoomsRequestWith(ctx context.Context) (int, error)
- 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) MucdaiExams(ctx context.Context) ([]*model.MucDaiExam, error)
- func (p *Plexams) NotPlannedByMe(ctx context.Context, ancode int) (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(seed int64, iterations int) invigplan.Options
- func (p *Plexams) PermanentNonInvigilators(ctx context.Context) ([]*model.PermanentNonInvigilator, error)
- func (p *Plexams) PlacesWithSockets(ctx context.Context, ancode int) (bool, error)
- 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) PlannedRoomNamesInSlot(ctx context.Context, day int, time int) ([]string, error)
- func (p *Plexams) PlannedRooms(ctx context.Context) ([]*model.PlannedRoom, error)
- func (p *Plexams) PlannedRoomsInSlot(ctx context.Context, day int, time int) ([]*model.PlannedRoom, error)
- func (p *Plexams) PlanningState(ctx context.Context) (*model.PlanningState, error)
- func (p *Plexams) PossibleDays(ctx context.Context, ancode int, dayStrings []string) (bool, error)
- func (p *Plexams) PostStudentRegsToZPA(ctx context.Context, jsonOutputFile string, reporter Reporter) ([]*model.ZPAStudentReg, []*model.RegWithError, error)
- func (p *Plexams) PreAddExamToSlot(ctx context.Context, ancode int, dayNumber int, timeNumber int) (bool, error)
- func (p *Plexams) PreAddInvigilation(ctx context.Context, invigilatorID, day, slot int, roomName *string) (bool, error)
- func (p *Plexams) PreAddRoomToExam(ctx context.Context, ancode int, roomName string, mtknr *string, reserve bool, ...) (bool, error)
- func (p *Plexams) PreExamsInSlot(ctx context.Context, day int, time int) ([]*model.PreExam, error)
- func (p *Plexams) PrePlanInvigilationInSlot(ctx context.Context, day, slot int, 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) PrepareConnectedExam(ancode int) error
- func (p *Plexams) PrepareConnectedExams() error
- func (p *Plexams) PrepareGeneratedExams() error
- func (p *Plexams) PrepareInvigilationTodos(ctx context.Context) (*model.InvigilationTodos, error)
- func (p *Plexams) PrepareRoomForExams(ctx context.Context, reporter Reporter) error
- func (p *Plexams) PrepareRoomsForSlots(ctx context.Context, reporter Reporter) error
- func (p *Plexams) PrepareSelfInvigilation() error
- func (p *Plexams) PrepareStudentRegs() 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) ReadMucdaiICS(filename string) 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, day, slot int, roomName *string) (bool, error)
- func (p *Plexams) RemovePrePlannedRoom(ctx context.Context, ancode int, roomName string, mtknr *string) (bool, error)
- func (p *Plexams) RemoveStudentReg(ctx context.Context, program string, ancode int, mtknr string) (int, error)
- func (p *Plexams) RequestRoomsInfo() error
- func (p *Plexams) ResetInvigilations(ctx context.Context) error
- func (p *Plexams) ResetRoomsForExams(ctx context.Context) 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, day int, time int) (*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, day, time int) ([]*model.RoomWithFreeSeats, error)
- func (p *Plexams) RoomsWithInvigilationsForSlot(ctx context.Context, day int, time int) (*model.InvigilationSlot, error)
- func (p *Plexams) SafeExamBrowser(ctx context.Context, ancode int) (bool, error)
- func (p *Plexams) SameModulNames(ctx context.Context, outfile string) error
- func (p *Plexams) SameSlot(ctx context.Context, ancodeInput int, ancodesInput []int) (bool, error)
- func (p *Plexams) SaveEmailAttachment(ctx context.Context, kind, key, filename, contentType string, data []byte) 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) SendEmailConstraints(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) SendEmailKdpExahm(ctx context.Context, run bool, reporter Reporter) error
- func (p *Plexams) SendEmailPrepared(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) SendGeneratedExamMail(ctx context.Context, ancode int, updated, run bool, reporter Reporter) error
- func (p *Plexams) SendGeneratedExamMails(ctx context.Context, emailAddresses, 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) SetInvigilatorConstraints(ctx context.Context, input model.InvigilatorConstraintsInput) (*model.InvigilatorConstraints, 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) SetPlanningCondition(ctx context.Context, key string, done bool) (*model.PlanningState, error)
- func (p *Plexams) SetRoomActive(ctx context.Context, name string, active bool) (*model.Room, error)
- func (p *Plexams) SetRoomRequestActive(ctx context.Context, room string, day, slot int, active bool) (*model.RoomRequest, error)
- func (p *Plexams) SetRoomRequestApproved(ctx context.Context, room string, day, slot int, approved bool) (*model.RoomRequest, 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) SlotsWithRoomsFromBookedEntries(bookedEntries []BookedEntry) (map[SlotNumber][]*model.Room, error)
- func (p *Plexams) StudentByMtknr(ctx context.Context, mtknr string) (*model.Student, 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) Students(ctx context.Context) ([]*model.Student, error)
- func (p *Plexams) StudentsByName(ctx context.Context, regex string) ([]*model.Student, error)
- func (p *Plexams) TryBeginExclusiveOp() bool
- func (p *Plexams) TryBeginValidation() bool
- func (p *Plexams) UnblockRoomForSlot(ctx context.Context, room string, day, slot int) (bool, error)
- func (p *Plexams) UnblockRoomForSlots(ctx context.Context, room string, slots []*model.SlotInput) (int, error)
- func (p *Plexams) UnlockExam(ctx context.Context, ancode int) (*model.PlanEntry, *model.GeneratedExam, 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) UpdateRoom(ctx context.Context, input model.RoomInput) (*model.Room, error)
- func (p *Plexams) UpdateRoomRequestTime(ctx context.Context, room string, day, slot int, from, until time.Time) (*model.RoomRequest, error)
- func (p *Plexams) UploadPlan(ctx context.Context, withRooms, withInvigilators, upload bool, ...) ([]*model.ZPAExamPlan, 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) ValidateDB(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) ValidatePrePlannedExahmRooms(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateRoomsBlocked(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateRoomsEnoughSeats(reporter Reporter) (*model.ValidationReport, error)
- func (p *Plexams) ValidateRoomsForSlotsFresh(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) ZpaExamsToPlan(ctx context.Context, input []int) ([]*model.ZPAExam, error)
- func (p *Plexams) ZpaExamsToPlanWithConstraints(ctx context.Context) ([]*model.ZPAExamWithConstraints, error)
- type PrimussAncode
- type PublishedRoomsEmail
- type Reporter
- type RoomRequestEmail
- type SecretariatRoomsEmail
- type Slot
- type SlotNumber
- 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 ¶
This section is empty.
Functions ¶
func CalculatedAllowedSlots ¶
Types ¶
type AnnyBooking ¶ added in v1.77.0
type AnnyBooking struct {
Number string `json:"number"`
StartDate time.Time `json:"start_date"`
EndDate time.Time `json:"end_date"`
BlockerStartDate time.Time `json:"blocker_start_date"`
BlockerEndDate time.Time `json:"blocker_end_date"`
ChargedDuration int `json:"charged_duration"`
Description string `json:"description"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CanceledAt *time.Time `json:"canceled_at,omitempty"`
Status string `json:"status"`
StatusReason json.RawMessage `json:"status_reason,omitempty"`
IsBlocker bool `json:"is_blocker"`
CanEdit bool `json:"can_edit"`
IsEditable bool `json:"is_editable"`
ManuallyCreated bool `json:"manually_created"`
Note string `json:"note"`
Room string `json:"room,omitempty"`
Self string `json:"self"`
PersonalizationName string `json:"personalization_name"`
BookingGroupID string `json:"booking_group_identifier,omitempty"`
CancelableUntil *time.Time `json:"cancelable_until,omitempty"`
HasCustomDescription bool `json:"has_custom_description"`
ResourceID string `json:"-"`
}
type BookedEntry ¶
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 CoverMailData ¶ added in v1.40.0
type CsvExamEXaHM ¶
type CsvExamEXaHM struct {
Ancode int `csv:"Ancode"`
Module string `csv:"Modul"`
MainExamer string `csv:"Erstprüfender"`
ExamDate string `csv:"Termin"`
MaxDuration int `csv:"Maximale Länge"`
Students int `csv:"Anmeldungen"`
Rooms string `csv:"Räume"`
Type string `csv:"Typ"`
Jira string `csv:"Jira"`
}
type CsvKdpRoom ¶ added in v1.145.0
type CsvKdpRoom struct {
Tag string `csv:"Tag"`
Datum string `csv:"Datum"`
Beginn string `csv:"Beginn"`
Raum string `csv:"Raum"`
Ancode int `csv:"Ancode"`
Modul string `csv:"Modul"`
Erstpruefer string `csv:"Erstprüfer"`
Typ string `csv:"Typ"`
Plaetze int `csv:"Plätze"`
NTAPlaetze int `csv:"davon NTA"`
Reserve int `csv:"Reserve"`
DauerMin int `csv:"Dauer (min)"`
NTADauern string `csv:"NTA-Dauern (min)"`
}
CsvKdpRoom is one row of the room-oriented CSV: per slot, room and exam how many seats (incl. NTA and reserve) the KDP has to configure.
type CsvLBARepeater ¶ added in v1.41.0
type ExahmEmail ¶ added in v1.66.0
type ExahmEmail struct {
PlanerName string
}
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 GeneratedExamMailData ¶
type HandicapExam ¶
type HandicapExam struct {
AnCode int
Module string
TypeExamFull string
HandicapStudents []*HandicapStudent
}
type HandicapStudent ¶
type HandicapsEmail ¶
type HandicapsEmail struct {
MainExamer string
Exams []*HandicapExam
PlanerName string
}
type InvigilationMissingMailData ¶ added in v1.82.0
type InvigilationsEmail ¶ added in v1.39.0
type KdpEmail ¶ added in v1.145.0
type KdpEmail struct {
SemesterName string
PlanerName string
Slots []*kdpSlot // ordered by day/time, then room
Exams []*kdpExamView // ordered by day/time, then ancode
}
KdpEmail is the data for the KDP EXaHM/SEB room-overview email.
type KnownConflict ¶
type KnownConflict struct {
Mtknr, Ancode1, Ancode2 string
}
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
// 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) AddExamToSlot ¶
func (*Plexams) AddExamToSlottime ¶ added in v1.74.0
func (*Plexams) AddInvigilation ¶
func (*Plexams) AddInvigilatorsToInvigilationTodos ¶
func (*Plexams) AddMucDaiExam ¶ added in v1.3.0
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) 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, day, slot int, from, until time.Time) (*model.RoomRequest, error)
AddRoomRequest manually adds a single room request (key: room/day/slot). It starts active and not approved. Errors if one already exists.
func (*Plexams) AddStudentReg ¶ added in v1.36.0
func (*Plexams) AddZpaExamToPlan ¶
func (*Plexams) AllAnnyBookings ¶ added in v1.77.0
func (*Plexams) AllProgramsInPlan ¶
func (*Plexams) AllowedSlots ¶
func (*Plexams) AnnyBookings ¶ added in v1.77.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) AwkwardSlots ¶
func (*Plexams) BlockRoomForSlot ¶ added in v1.119.0
func (p *Plexams) BlockRoomForSlot(ctx context.Context, room string, day, slot int, 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) BlockRoomForSlots ¶ added in v1.120.0
func (p *Plexams) BlockRoomForSlots(ctx context.Context, room string, slots []*model.SlotInput, reason *string) ([]*model.BlockedRoom, error)
BlockRoomForSlots blocks a room for several slots at once (e.g. a whole day or a time range). Returns the stored blocks.
func (*Plexams) BlockedRooms ¶ added in v1.119.0
BlockedRooms returns all room-slot blocks of the semester.
func (*Plexams) ChangeAncode ¶
func (*Plexams) ChangeAncodeInConflicts ¶
func (*Plexams) ChangeAncodeInStudentRegs ¶
func (*Plexams) ChangeRoom ¶
func (*Plexams) ClearEmailAttachments ¶ added in v1.102.0
ClearEmailAttachments removes all uploaded attachments of a kind.
func (*Plexams) ConflictingAncodes ¶
func (*Plexams) ConnectExam ¶
TODO: check if there are Exams with same Ancode in other programs
func (*Plexams) ConstraintForAncode ¶
func (*Plexams) Constraints ¶
func (*Plexams) ConstraintsMap ¶
func (*Plexams) ConstraintsPDF ¶
func (*Plexams) CsvForEXaHM ¶
func (*Plexams) CsvForLBARepeater ¶ added in v1.41.0
func (*Plexams) CsvForProgram ¶
func (*Plexams) DeleteInvigilatorConstraints ¶ added in v1.139.0
DeleteInvigilatorConstraints removes the constraints record of one invigilator.
func (*Plexams) DraftExahmPDF ¶
func (*Plexams) DraftFSBytes ¶ added in v1.29.0
func (*Plexams) DraftFk08PDF ¶
func (*Plexams) DraftFk10PDF ¶
func (*Plexams) DraftMucDaiPDF ¶
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) 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 (p *Plexams) ExahmRoomsFromAnnyBookings(ctx context.Context) ([]BookedEntry, error)
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) ExamsInSlot ¶
func (*Plexams) ExamsWithNtas ¶ added in v1.75.0
func (*Plexams) ExamsWithoutDuration ¶ added in v1.76.0
func (*Plexams) ExamsWithoutSlot ¶
func (*Plexams) ExcludeDays ¶
func (*Plexams) ExportPlannedRooms ¶ added in v1.15.0
func (*Plexams) FetchFromAnny ¶ added in v1.77.0
func (*Plexams) GenerateExamsToPlanPDF ¶
func (*Plexams) GenerateInvigilations ¶ added in v1.84.0
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) GeneratedExam ¶
func (*Plexams) GeneratedExams ¶
func (*Plexams) GeneratedExamsForExamer ¶
func (*Plexams) GetAllSemesterNames ¶
func (*Plexams) GetConflicts ¶
func (*Plexams) GetConnectedExam ¶
func (*Plexams) GetConnectedExams ¶
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) GetExamsForStudent
deprecated
func (*Plexams) GetFk07programs ¶
func (*Plexams) GetGoSlots ¶
func (*Plexams) GetInvigilationTodos ¶
func (*Plexams) GetInvigilator ¶
func (*Plexams) GetInvigilatorForRoom ¶ added in v1.41.0
func (*Plexams) GetInvigilatorInSlot ¶
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) GetStarttime ¶
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) 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) 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) 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) InvigilationTodos
deprecated
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) MakeSelfInvigilations ¶
func (*Plexams) MigrateInvigilatorConstraintsFromConfig ¶ added in v1.139.0
MigrateInvigilatorConstraintsFromConfig is a one-time migration that copies the invigilatorConstraints from the semester config (viper) into the DB collection. Returns the number of records written.
func (*Plexams) MigrateRoomRequestsFromConfig ¶ added in v1.115.0
MigrateRoomRequestsFromConfig is the one-time import of roomConstraints.<room>.reservations from the semester config into the DB. All imported requests start active. Returns the number imported.
func (*Plexams) MigrateRoomsRequestWith ¶ added in v1.114.0
MigrateRoomsRequestWith is a one-time backfill: it derives requestWith (and the matching needsRequest) for every room and persists it. Returns the number of rooms updated. Idempotent.
func (*Plexams) MucDaiExam ¶ added in v1.3.0
func (*Plexams) MucDaiExamsForProgram ¶ added in v1.3.0
func (*Plexams) MucdaiExams ¶
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
OptimizerOptionsFromConfig builds the optimizer options from viper, applying the given seed and iteration overrides (0 = keep config/default).
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) PlacesWithSockets ¶
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) PlannedRoomNamesInSlot ¶
func (*Plexams) PlannedRooms ¶
func (*Plexams) PlannedRoomsInSlot ¶
func (*Plexams) PlanningState ¶ added in v1.121.0
PlanningState assembles the current planning state from the declarative net and the conditions stored as set in the DB.
func (*Plexams) PossibleDays ¶
func (*Plexams) PostStudentRegsToZPA ¶
func (p *Plexams) PostStudentRegsToZPA(ctx context.Context, jsonOutputFile string, reporter Reporter) ([]*model.ZPAStudentReg, []*model.RegWithError, error)
func (*Plexams) PreAddExamToSlot ¶ added in v1.18.0
func (*Plexams) PreAddInvigilation ¶ added in v1.84.0
func (p *Plexams) PreAddInvigilation(ctx context.Context, invigilatorID, day, slot int, roomName *string) (bool, error)
PreAddInvigilation fixes an invigilator for a room (roomName != nil) or the reserve (roomName == nil) in a slot before the automatic invigilation planning runs. It validates the same constraints as AddInvigilation.
func (*Plexams) PreAddRoomToExam ¶ added in v1.30.0
func (*Plexams) PreExamsInSlot ¶ added in v1.23.0
func (*Plexams) PrePlanInvigilationInSlot ¶ added in v1.85.0
func (p *Plexams) PrePlanInvigilationInSlot(ctx context.Context, day, slot int, roomName *string) (bool, error)
PrePlanInvigilationInSlot promotes the invigilation currently planned for a room (roomName != nil) or the reserve (roomName == nil) in a slot 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) PrepareConnectedExam ¶
func (*Plexams) PrepareConnectedExams ¶
func (*Plexams) PrepareGeneratedExams ¶
func (*Plexams) PrepareInvigilationTodos ¶
func (*Plexams) PrepareRoomForExams ¶
PrepareRoomForExams assigns rooms to all planned exams and stores the result in planned_rooms. It first (re)computes the allowed rooms per slot (PrepareRoomsForSlots), so that step no longer has to be run separately: the room-for-exams generation always works on an up-to-date rooms-for-slots cache.
func (*Plexams) PrepareRoomsForSlots ¶ added in v1.31.0
PrepareRoomsForSlots (re)computes, for every slot, the set of rooms that may be used in it, and stores the result in the rooms_for_slots collection. This is a derived cache: it is recomputed entirely from the current rooms, their (de)activation, the active building-management room requests, EXaHM bookings and the config room constraints. It is run automatically as the first step of PrepareRoomForExams, but can also be triggered on its own to preview the allowed rooms per slot.
func (*Plexams) PrepareSelfInvigilation ¶
func (*Plexams) PrepareStudentRegs ¶
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) ReadMucdaiICS ¶ added in v1.4.0
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, day, slot int, roomName *string) (bool, error)
RemovePrePlannedInvigilation removes a pre-planned invigilation (key: day/slot/roomName; roomName nil = the reserve). If a live invigilation in that slot 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) RemoveStudentReg ¶
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) ResetInvigilations ¶ added in v1.126.0
GenerateInvigilations 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) 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) 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 (*Plexams) RoomsForSlots ¶ added in v1.31.0
func (*Plexams) RoomsFromRoomNames ¶ added in v1.33.0
func (*Plexams) RoomsWithFreeSeatsForSlot ¶ added in v1.130.0
func (p *Plexams) RoomsWithFreeSeatsForSlot(ctx context.Context, day, time int) ([]*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 (p *Plexams) RoomsWithInvigilationsForSlot(ctx context.Context, day int, time int) (*model.InvigilationSlot, error)
TODO: rewrite me
func (*Plexams) SafeExamBrowser ¶
func (*Plexams) SameModulNames ¶
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) SendCoverPageMail ¶ added in v1.40.0
func (*Plexams) SendCoverPagesMails ¶ added in v1.40.0
func (*Plexams) SendEmailConstraints ¶ added in v1.12.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) 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) SendEmailPrepared ¶ added in v1.21.0
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) SendGeneratedExamMail ¶ added in v1.3.0
func (*Plexams) SendGeneratedExamMails ¶
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 ¶
func (*Plexams) SendUnplannedExamMail ¶ added in v1.54.0
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) 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) SetPlanningCondition ¶ added in v1.121.0
func (p *Plexams) SetPlanningCondition(ctx context.Context, key string, done bool) (*model.PlanningState, error)
SetPlanningCondition sets or clears a condition by hand. Errors on an unknown key.
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, day, slot int, active bool) (*model.RoomRequest, error)
SetRoomRequestActive activates/deactivates a room request (key: room/day/slot). 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, day, slot int, approved bool) (*model.RoomRequest, error)
SetRoomRequestApproved sets the approved flag of a room request (key: room/day/slot). Errors if no such request exists.
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) SlotsWithRoomsFromBookedEntries ¶
func (p *Plexams) SlotsWithRoomsFromBookedEntries(bookedEntries []BookedEntry) (map[SlotNumber][]*model.Room, error)
func (*Plexams) StudentByMtknr ¶
func (*Plexams) StudentRegsForProgram ¶
func (*Plexams) StudentRegsImportErrors ¶
func (*Plexams) StudentRegsPerStudentPlanned ¶
func (*Plexams) StudentsByName ¶
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
UnblockRoomForSlot removes a room-slot block. Errors if no such block exists.
func (*Plexams) UnblockRoomForSlots ¶ added in v1.120.0
func (p *Plexams) UnblockRoomForSlots(ctx context.Context, room string, slots []*model.SlotInput) (int, error)
UnblockRoomForSlots removes the room blocks for several slots at once. Returns how many blocks were actually removed.
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) 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, day, slot int, 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/day/slot). Errors if it does not exist.
func (*Plexams) UploadPlan ¶
func (*Plexams) ValidateConflicts ¶
func (*Plexams) ValidateConstraints ¶
func (p *Plexams) ValidateConstraints(reporter Reporter) (*model.ValidationReport, error)
func (*Plexams) ValidateDB ¶
func (p *Plexams) ValidateDB(reporter Reporter) (*model.ValidationReport, error)
TODO: all planned_rooms okay? especially after moving an exam? check room -> slot -> ancode sameslot?
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) ValidatePrePlannedExahmRooms ¶ added in v1.52.0
func (p *Plexams) ValidatePrePlannedExahmRooms(reporter Reporter) (*model.ValidationReport, error)
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) ValidateRoomsForSlotsFresh ¶ added in v1.120.0
func (p *Plexams) ValidateRoomsForSlotsFresh(reporter Reporter) (*model.ValidationReport, error)
ValidateRoomsForSlotsFresh warns when the stored rooms-for-slots cache differs from a fresh recompute, i.e. it is stale after editing rooms, room requests or blocks and rooms-for-exams should be regenerated.
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)
TODO: all planned_rooms okay? especially after moving an exam? check room -> slot -> ancode sameslot?
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) ZpaExamsToPlan ¶
func (*Plexams) ZpaExamsToPlanWithConstraints ¶
type PrimussAncode ¶
type PublishedRoomsEmail ¶ added in v1.127.0
type PublishedRoomsEmail struct {
Teacher *model.Teacher
PlanerName string
Exams []*publishedRoomsExam
}
PublishedRoomsEmail is the data for one examer's "rooms published" email.
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. GenerateInvigilations). 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 RoomRequestEmail ¶ added in v1.117.0
type SecretariatRoomsEmail ¶ added in v1.138.0
type SecretariatRoomsEmail struct {
SemesterName string
PlanerName string
Rooms []*roomRequestEmailRoom // reused: room -> days -> time ranges
}
SecretariatRoomsEmail is the data for the rooms-occupancy email to the secretariat: per (non-request) room, on which day at which times it is used by an exam.
type SlotNumber ¶
type SlotNumber struct {
// contains filtered or unexported fields
}
type UnpplannedExamMailData ¶ added in v1.54.0
type UnpplannedExamMailData struct {
Exam *model.PrimussExam
PlanerName string
}
Source Files
¶
- anny.go
- anny_query.go
- constraints.go
- csv.go
- email.go
- email_attachments.go
- email_constraints.go
- email_cover_pages.go
- email_draft.go
- email_exahm.go
- email_generated.go
- email_invigilations.go
- email_invigilations_missing.go
- email_kdp.go
- email_nta.go
- email_prepared.go
- email_published.go
- email_published_rooms.go
- email_room_requests.go
- email_rooms_secretariat.go
- exam.go
- export.go
- generatedExams.go
- guard.go
- ics.go
- ics_invigilator.go
- invigilation.go
- invigilation_generate.go
- invigilator_constraints.go
- invigilators.go
- mucdai.go
- nta.go
- nta_room_alone_waivers.go
- pdf.go
- pdfDraft.go
- pdfDraftFS.go
- pdfDraftSI.go
- plan.go
- plannedExams.go
- planning_state.go
- plexams.go
- prepare.go
- primuss.go
- primuss_fixData.go
- program.go
- reporter.go
- reporter_discard.go
- request_rooms.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
- slots.go
- statistics.go
- student.go
- studentRegs.go
- validate.go
- validate_db.go
- validate_exahm_rooms.go
- validate_invigilation.go
- validate_invigilation_constraints.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 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. |