chore(fill): add exam and sheet to driving lecture
This commit is contained in:
parent
f1f510c24c
commit
6ec5abf056
@ -615,13 +615,35 @@ fillDb = do
|
|||||||
, courseDeregisterNoShow = True
|
, courseDeregisterNoShow = True
|
||||||
}
|
}
|
||||||
insert_ $ CourseEdit jost now fdf
|
insert_ $ CourseEdit jost now fdf
|
||||||
|
void $ insert Sheet
|
||||||
|
{ sheetCourse = fdf
|
||||||
|
, sheetName = "Sehtest"
|
||||||
|
, sheetDescription = Just $ htmlToStoredMarkup [shamlet|Bitte einen Scan ihres Sehtest hochladen!|]
|
||||||
|
, sheetType = NotGraded
|
||||||
|
, sheetGrouping = Arbitrary 3
|
||||||
|
, sheetMarkingText = Nothing
|
||||||
|
, sheetVisibleFrom = Just $ termTime True (season currentTerm) (-2) False Monday toMidnight
|
||||||
|
, sheetActiveFrom = Just $ termTime True (season currentTerm) (-2) False Monday toMidnight
|
||||||
|
, sheetActiveTo = Just $ termTime True (season currentTerm) 0 True Saturday beforeMidnight
|
||||||
|
, sheetSubmissionMode = SubmissionMode False . Just $ UploadAny True Nothing False
|
||||||
|
, sheetHintFrom = Nothing
|
||||||
|
, sheetSolutionFrom = Nothing
|
||||||
|
, sheetAutoDistribute = False
|
||||||
|
, sheetAnonymousCorrection = True
|
||||||
|
, sheetRequireExamRegistration = Nothing
|
||||||
|
, sheetAllowNonPersonalisedSubmission = True
|
||||||
|
, sheetAuthorshipStatementMode = SheetAuthorshipStatementModeExam
|
||||||
|
, sheetAuthorshipStatementExam = Nothing
|
||||||
|
, sheetAuthorshipStatement = Nothing
|
||||||
|
}
|
||||||
forM_ [(Monday)..Thursday] $ \td -> do
|
forM_ [(Monday)..Thursday] $ \td -> do
|
||||||
forM_ [(1::Int)..(4*4)] $ \tw -> do
|
forM_ [(1::Int)..(4*4)] $ \tw -> do
|
||||||
let firstTT = utctDay $ termTime True (season currentTerm) (toRational $ tw - 1) False td toMorning
|
let firstTT = termTime True (season currentTerm) (toRational $ tw - 1) False td toMorning
|
||||||
secondTT = utctDay $ termTime True (season currentTerm) (toRational $ tw - 1) False (succ td) toMorning
|
secondTT = termTime True (season currentTerm) (toRational $ tw - 1) False (succ td) toMorning
|
||||||
|
regFrom = termTime True (season currentTerm) (toRational $ tw - 8) False td toMorning
|
||||||
|
regTo = termTime True (season currentTerm) (toRational $ tw - 2) False td toMorning
|
||||||
tut1 <- insert Tutorial
|
tut1 <- insert Tutorial
|
||||||
{ tutorialName = CI.mk $ Text.pack $ "KW" ++ show (snd3 $ toWeekDate firstTT) ++ take 3 (show td)
|
{ tutorialName = CI.mk $ Text.pack $ "KW" ++ show (snd3 $ toWeekDate $ utctDay firstTT) ++ take 3 (show td)
|
||||||
, tutorialCourse = fdf
|
, tutorialCourse = fdf
|
||||||
, tutorialType = "Schulung"
|
, tutorialType = "Schulung"
|
||||||
, tutorialCapacity = Just 16
|
, tutorialCapacity = Just 16
|
||||||
@ -635,25 +657,54 @@ fillDb = do
|
|||||||
{ occurrencesScheduled = Set.empty
|
{ occurrencesScheduled = Set.empty
|
||||||
, occurrencesExceptions = Set.fromList
|
, occurrencesExceptions = Set.fromList
|
||||||
[ ExceptOccur
|
[ ExceptOccur
|
||||||
{ exceptDay = firstTT
|
{ exceptDay = utctDay firstTT
|
||||||
, exceptStart = TimeOfDay 8 30 0
|
, exceptStart = TimeOfDay 8 30 0
|
||||||
, exceptEnd = TimeOfDay 16 0 0
|
, exceptEnd = TimeOfDay 16 0 0
|
||||||
}
|
}
|
||||||
, ExceptOccur
|
, ExceptOccur
|
||||||
{ exceptDay = secondTT
|
{ exceptDay = utctDay secondTT
|
||||||
, exceptStart = TimeOfDay 9 0 0
|
, exceptStart = TimeOfDay 9 0 0
|
||||||
, exceptEnd = TimeOfDay 16 0 0
|
, exceptEnd = TimeOfDay 16 0 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
, tutorialRegGroup = Just "schulung"
|
, tutorialRegGroup = Just "schulung"
|
||||||
, tutorialRegisterFrom = Just $ termTime True (season currentTerm) (toRational $ tw - 9) False td toMorning
|
, tutorialRegisterFrom = Just regFrom
|
||||||
, tutorialRegisterTo = Just $ termTime True (season currentTerm) (toRational $ tw - 2) False td toMorning
|
, tutorialRegisterTo = Just regTo
|
||||||
, tutorialDeregisterUntil = Nothing
|
, tutorialDeregisterUntil = Nothing
|
||||||
, tutorialLastChanged = now
|
, tutorialLastChanged = now
|
||||||
, tutorialTutorControlled = True
|
, tutorialTutorControlled = True
|
||||||
}
|
}
|
||||||
void . insert $ Tutor tut1 jost
|
void . insert $ Tutor tut1 jost
|
||||||
|
void . insert' $ Exam
|
||||||
|
{ examCourse = fdf
|
||||||
|
, examName = "Theorie"
|
||||||
|
, examGradingRule = Nothing
|
||||||
|
, examBonusRule = Nothing
|
||||||
|
, examOccurrenceRule = ExamRoomManual
|
||||||
|
, examExamOccurrenceMapping = Nothing
|
||||||
|
, examVisibleFrom = Just regFrom
|
||||||
|
, examRegisterFrom = Just firstTT
|
||||||
|
, examRegisterTo = Just $ toMidday $ utctDay secondTT
|
||||||
|
, examDeregisterUntil = Nothing
|
||||||
|
, examPublishOccurrenceAssignments = Nothing
|
||||||
|
, examStart = Just $ toTimeOfDay 15 30 0 $ utctDay secondTT
|
||||||
|
, examEnd = Just $ toTimeOfDay 16 30 0 $ utctDay secondTT
|
||||||
|
, examFinished = Nothing
|
||||||
|
, examPartsFrom = Nothing
|
||||||
|
, examClosed = Nothing
|
||||||
|
, examPublicStatistics = True
|
||||||
|
, examGradingMode = ExamGradingPass
|
||||||
|
, examDescription = Just $ htmlToStoredMarkup [shamlet|Theoretische Prüfung mit Fragebogen|]
|
||||||
|
, examExamMode = ExamMode
|
||||||
|
{ examAids = Just $ ExamAidsPreset ExamClosedBook
|
||||||
|
, examOnline = Just $ ExamOnlinePreset ExamOffline
|
||||||
|
, examSynchronicity = Just $ ExamSynchronicityPreset ExamSynchronous
|
||||||
|
, examRequiredEquipment = Just $ ExamRequiredEquipmentPreset ExamRequiredEquipmentNone
|
||||||
|
}
|
||||||
|
, examStaff = Just "Jost"
|
||||||
|
, examAuthorshipStatement = Nothing
|
||||||
|
}
|
||||||
|
|
||||||
-- FFP
|
-- FFP
|
||||||
let nbrs :: [Int]
|
let nbrs :: [Int]
|
||||||
|
|||||||
Reference in New Issue
Block a user