chore(testdata): create f course for avn-a
This commit is contained in:
parent
94b4ff2e7e
commit
e33ca48227
@ -155,7 +155,7 @@ fillDb = do
|
|||||||
, userTitle = Just "Dr."
|
, userTitle = Just "Dr."
|
||||||
, userMaxFavourites = 14
|
, userMaxFavourites = 14
|
||||||
, userMaxFavouriteTerms = 4
|
, userMaxFavouriteTerms = 4
|
||||||
, userTheme = ThemeMossGreen
|
, userTheme = userDefaultTheme
|
||||||
, userDateTimeFormat = userDefaultDateTimeFormat
|
, userDateTimeFormat = userDefaultDateTimeFormat
|
||||||
, userDateFormat = userDefaultDateFormat
|
, userDateFormat = userDefaultDateFormat
|
||||||
, userTimeFormat = userDefaultTimeFormat
|
, userTimeFormat = userDefaultTimeFormat
|
||||||
@ -353,7 +353,7 @@ fillDb = do
|
|||||||
matrikel <- toMatrikel <$> getRandomRs (0 :: Int, 9 :: Int)
|
matrikel <- toMatrikel <$> getRandomRs (0 :: Int, 9 :: Int)
|
||||||
manyUsers <- insertMany . getZipList $ manyUser <$> ZipList ((,,) <$> firstNames <*> middlenames <*> surnames) <*> ZipList matrikel
|
manyUsers <- insertMany . getZipList $ manyUser <$> ZipList ((,,) <$> firstNames <*> middlenames <*> surnames) <*> ZipList matrikel
|
||||||
|
|
||||||
forM_ [prevPrevTerm, prevTerm, currentTerm, nextTerm, succ nextTerm] $ \tid -> do
|
forM_ [(pred $ pred prevPrevTerm)..(succ $ succ $ succ $ succ nextTerm)] $ \tid -> do
|
||||||
let term = Term { termName = tid
|
let term = Term { termName = tid
|
||||||
, termStart = guessDay tid TermDayStart
|
, termStart = guessDay tid TermDayStart
|
||||||
, termEnd = guessDay tid TermDayEnd
|
, termEnd = guessDay tid TermDayEnd
|
||||||
@ -391,6 +391,8 @@ fillDb = do
|
|||||||
}
|
}
|
||||||
ifi <- insert' $ School "Institut für Informatik" "IfI" (Just $ 14 * nominalDay) (Just $ 10 * nominalDay) True (ExamModeDNF predDNFFalse) (ExamCloseOnFinished True) SchoolAuthorshipStatementModeOptional (Just ifiAuthorshipStatement) True SchoolAuthorshipStatementModeRequired (Just ifiAuthorshipStatement) False
|
ifi <- insert' $ School "Institut für Informatik" "IfI" (Just $ 14 * nominalDay) (Just $ 10 * nominalDay) True (ExamModeDNF predDNFFalse) (ExamCloseOnFinished True) SchoolAuthorshipStatementModeOptional (Just ifiAuthorshipStatement) True SchoolAuthorshipStatementModeRequired (Just ifiAuthorshipStatement) False
|
||||||
mi <- insert' $ School "Institut für Mathematik" "MI" Nothing Nothing False (ExamModeDNF predDNFFalse) (ExamCloseOnFinished False) SchoolAuthorshipStatementModeNone Nothing True SchoolAuthorshipStatementModeOptional Nothing True
|
mi <- insert' $ School "Institut für Mathematik" "MI" Nothing Nothing False (ExamModeDNF predDNFFalse) (ExamCloseOnFinished False) SchoolAuthorshipStatementModeNone Nothing True SchoolAuthorshipStatementModeOptional Nothing True
|
||||||
|
avn <- insert' $ School "Fahrschule" "AVN-A" Nothing Nothing False (ExamModeDNF predDNFFalse) (ExamCloseOnFinished False) SchoolAuthorshipStatementModeNone Nothing True SchoolAuthorshipStatementModeOptional Nothing True
|
||||||
|
void . insert' $ UserFunction jost avn SchoolAdmin
|
||||||
void . insert' $ UserFunction gkleen ifi SchoolAdmin
|
void . insert' $ UserFunction gkleen ifi SchoolAdmin
|
||||||
void . insert' $ UserFunction gkleen mi SchoolAdmin
|
void . insert' $ UserFunction gkleen mi SchoolAdmin
|
||||||
void . insert' $ UserFunction fhamann ifi SchoolAdmin
|
void . insert' $ UserFunction fhamann ifi SchoolAdmin
|
||||||
@ -405,10 +407,12 @@ fillDb = do
|
|||||||
void . insert' $ UserFunction gkleen ifi SchoolAllocation
|
void . insert' $ UserFunction gkleen ifi SchoolAllocation
|
||||||
void . insert' $ UserFunction sbarth ifi SchoolLecturer
|
void . insert' $ UserFunction sbarth ifi SchoolLecturer
|
||||||
void . insert' $ UserFunction sbarth ifi SchoolExamOffice
|
void . insert' $ UserFunction sbarth ifi SchoolExamOffice
|
||||||
for_ [gkleen, fhamann, jost, maxMuster, svaupel] $ \uid ->
|
for_ [gkleen, fhamann, maxMuster, svaupel] $ \uid ->
|
||||||
void . insert' $ UserSchool uid ifi False
|
void . insert' $ UserSchool uid ifi False
|
||||||
for_ [gkleen, tinaTester] $ \uid ->
|
for_ [gkleen, tinaTester] $ \uid ->
|
||||||
void . insert' $ UserSchool uid mi False
|
void . insert' $ UserSchool uid mi False
|
||||||
|
for_ [jost] $ \uid ->
|
||||||
|
void . insert' $ UserSchool uid avn False
|
||||||
let
|
let
|
||||||
sdBsc = StudyDegreeKey' 82
|
sdBsc = StudyDegreeKey' 82
|
||||||
sdMst = StudyDegreeKey' 88
|
sdMst = StudyDegreeKey' 88
|
||||||
@ -576,6 +580,78 @@ fillDb = do
|
|||||||
True
|
True
|
||||||
Nothing
|
Nothing
|
||||||
|
|
||||||
|
|
||||||
|
-- Fahrschule F
|
||||||
|
fdf <- insert' Course
|
||||||
|
{ courseName = "F - Vorfeldführerschein"
|
||||||
|
, courseDescription = Just $ htmlToStoredMarkup [shamlet|
|
||||||
|
<p>
|
||||||
|
Berechtigung zum Führen eines Fahrzeuges auf den Fahrstrassen des Vorfeldes.
|
||||||
|
<section>
|
||||||
|
<h3>Benötigte Unterlagen
|
||||||
|
<ul>
|
||||||
|
<li>Sehtest
|
||||||
|
<i>(Bitte vorab hochladen!)
|
||||||
|
<li>Regulärer Führerschein
|
||||||
|
|]
|
||||||
|
, courseLinkExternal = Nothing
|
||||||
|
, courseShorthand = "F"
|
||||||
|
, courseTerm = TermKey $ currentTerm
|
||||||
|
, courseSchool = avn
|
||||||
|
, courseCapacity = Nothing
|
||||||
|
, courseVisibleFrom = Just now
|
||||||
|
, courseVisibleTo = Nothing
|
||||||
|
, courseRegisterFrom = Just $ termTime True (season currentTerm) (-2) False Monday toMidnight
|
||||||
|
, courseRegisterTo = Just $ termTime True (season currentTerm) 0 True Saturday beforeMidnight
|
||||||
|
, courseDeregisterUntil = Nothing
|
||||||
|
, courseRegisterSecret = Nothing
|
||||||
|
, courseMaterialFree = True
|
||||||
|
, courseApplicationsRequired = False
|
||||||
|
, courseApplicationsInstructions = Nothing
|
||||||
|
, courseApplicationsText = False
|
||||||
|
, courseApplicationsFiles = NoUpload
|
||||||
|
, courseApplicationsRatingsVisible = False
|
||||||
|
, courseDeregisterNoShow = True
|
||||||
|
}
|
||||||
|
insert_ $ CourseEdit jost now fdf
|
||||||
|
|
||||||
|
forM_ [(Monday)..Thursday] $ \td -> do
|
||||||
|
forM_ [(1::Int)..4] $ \tw -> do
|
||||||
|
tut1 <- insert Tutorial
|
||||||
|
{ tutorialName = CI.mk $ Text.pack $ "KW" ++ (show tw) ++ (take 3 $ show td)
|
||||||
|
, tutorialCourse = fdf
|
||||||
|
, tutorialType = "Schulung"
|
||||||
|
, tutorialCapacity = Just 16
|
||||||
|
, tutorialRoom = Just $ case tw of
|
||||||
|
1 -> "A380"
|
||||||
|
2 -> "B747"
|
||||||
|
3 -> "A320"
|
||||||
|
_ -> "CRJ9"
|
||||||
|
, tutorialRoomHidden = False
|
||||||
|
, tutorialTime = Occurrences
|
||||||
|
{ occurrencesScheduled = Set.empty
|
||||||
|
, occurrencesExceptions = Set.fromList
|
||||||
|
[ ExceptOccur
|
||||||
|
{ exceptDay = utctDay $ termTime True (season currentTerm) (toRational $ tw - 1) False td (toMorning)
|
||||||
|
, exceptStart = TimeOfDay 8 30 0
|
||||||
|
, exceptEnd = TimeOfDay 16 0 0
|
||||||
|
}
|
||||||
|
, ExceptOccur
|
||||||
|
{ exceptDay = utctDay $ termTime True (season currentTerm) (toRational $ tw - 1) False (succ td) (toMorning)
|
||||||
|
, exceptStart = TimeOfDay 9 0 0
|
||||||
|
, exceptEnd = TimeOfDay 16 0 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
, tutorialRegGroup = Just "schulung"
|
||||||
|
, tutorialRegisterFrom = Just $ termTime True (season currentTerm) (toRational $ tw - 9) False td (toMorning)
|
||||||
|
, tutorialRegisterTo = Just $ termTime True (season currentTerm) (toRational $ tw - 2) False td (toMorning)
|
||||||
|
, tutorialDeregisterUntil = Nothing
|
||||||
|
, tutorialLastChanged = now
|
||||||
|
, tutorialTutorControlled = True
|
||||||
|
}
|
||||||
|
void . insert $ Tutor tut1 jost
|
||||||
|
|
||||||
-- FFP
|
-- FFP
|
||||||
let nbrs :: [Int]
|
let nbrs :: [Int]
|
||||||
nbrs = [1,2,3,27,7,1]
|
nbrs = [1,2,3,27,7,1]
|
||||||
|
|||||||
Reference in New Issue
Block a user