refactor: update db fill

This commit is contained in:
Sarah Vaupel 2021-06-09 14:10:37 +02:00 committed by Gregor Kleen
parent 7b11ed46de
commit a1111b498f

View File

@ -657,7 +657,7 @@ fillDb = do
, sheetAnonymousCorrection = True , sheetAnonymousCorrection = True
, sheetRequireExamRegistration = Nothing , sheetRequireExamRegistration = Nothing
, sheetAllowNonPersonalisedSubmission = True , sheetAllowNonPersonalisedSubmission = True
, sheetAuthorshipStatement = Nothing -- , sheetAuthorshipStatement = Nothing
} }
insert_ $ SheetEdit gkleen now adhoc insert_ $ SheetEdit gkleen now adhoc
feste <- insert Sheet feste <- insert Sheet
@ -677,7 +677,7 @@ fillDb = do
, sheetAnonymousCorrection = True , sheetAnonymousCorrection = True
, sheetRequireExamRegistration = Nothing , sheetRequireExamRegistration = Nothing
, sheetAllowNonPersonalisedSubmission = True , sheetAllowNonPersonalisedSubmission = True
, sheetAuthorshipStatement = Nothing -- , sheetAuthorshipStatement = Nothing
} }
insert_ $ SheetEdit gkleen now feste insert_ $ SheetEdit gkleen now feste
keine <- insert Sheet keine <- insert Sheet
@ -697,7 +697,7 @@ fillDb = do
, sheetAnonymousCorrection = True , sheetAnonymousCorrection = True
, sheetRequireExamRegistration = Nothing , sheetRequireExamRegistration = Nothing
, sheetAllowNonPersonalisedSubmission = True , sheetAllowNonPersonalisedSubmission = True
, sheetAuthorshipStatement = Nothing -- , sheetAuthorshipStatement = Nothing
} }
insert_ $ SheetEdit gkleen now keine insert_ $ SheetEdit gkleen now keine
void . insertMany $ map (\u -> CourseParticipant ffp u now Nothing CourseParticipantActive) void . insertMany $ map (\u -> CourseParticipant ffp u now Nothing CourseParticipantActive)
@ -732,6 +732,7 @@ fillDb = do
, examSynchronicity = Just $ ExamSynchronicityPreset ExamSynchronous , examSynchronicity = Just $ ExamSynchronicityPreset ExamSynchronous
, examRequiredEquipment = Just $ ExamRequiredEquipmentPreset ExamRequiredEquipmentNone , examRequiredEquipment = Just $ ExamRequiredEquipmentPreset ExamRequiredEquipmentNone
} }
-- , examAuthorshipStatement = Nothing
, examStaff = Just "Hofmann" , examStaff = Just "Hofmann"
} }
_ <- insert' Material _ <- insert' Material
@ -942,7 +943,7 @@ fillDb = do
, sheetAnonymousCorrection = True , sheetAnonymousCorrection = True
, sheetRequireExamRegistration = Nothing , sheetRequireExamRegistration = Nothing
, sheetAllowNonPersonalisedSubmission = True , sheetAllowNonPersonalisedSubmission = True
, sheetAuthorshipStatement = Nothing -- , sheetAuthorshipStatement = Nothing
} }
void . insert $ SheetEdit jost now shId void . insert $ SheetEdit jost now shId
when (submissionModeCorrector sheetSubmissionMode) $ when (submissionModeCorrector sheetSubmissionMode) $
@ -1186,7 +1187,7 @@ fillDb = do
, sheetAnonymousCorrection = True , sheetAnonymousCorrection = True
, sheetRequireExamRegistration = Nothing , sheetRequireExamRegistration = Nothing
, sheetAllowNonPersonalisedSubmission = True , sheetAllowNonPersonalisedSubmission = True
, sheetAuthorshipStatement = if shNr == 14 then Just ifiAuthorshipStatement else Nothing -- , sheetAuthorshipStatement = if shNr == 14 then Just ifiAuthorshipStatement else Nothing
} }
manyUsers' <- shuffleM $ take 1024 manyUsers manyUsers' <- shuffleM $ take 1024 manyUsers
groupSizes <- getRandomRs (1, 3) groupSizes <- getRandomRs (1, 3)