fill-db corrected

This commit is contained in:
SJost 2018-04-03 16:50:08 +02:00
parent e578139a21
commit 5af34861be

View File

@ -75,9 +75,10 @@ main = db $ do
void . insert $ UserLecturer gkleen ifi
void . insert $ UserLecturer fhamann ifi
void . insert $ UserLecturer jost ifi
ifiBsc <- insert $ Degree "Bachelor Informatik" ifi
ifiMsc <- insert $ Degree "Master Informatik" ifi
miBsc <- insert $ Degree "Bachelor Mathematik" mi
sdBsc <- insert $ StudyDegree 82 (Just "BSc") (Just "Bachelor" )
sdMst <- insert $ StudyDegree 88 (Just "MSc") (Just "Master" )
sdInf <- insert $ StudyTerms 79 (Just "Inf") (Just "Informatik")
sdMath <- insert $ StudyTerms 105 (Just "M" ) (Just "Mathematik")
-- FFP
ffp <- insert Course
{ courseName = "Fortgeschrittene Funktionale Programmierung"
@ -92,8 +93,9 @@ main = db $ do
, courseRegisterTo = Just ((3600 * 24 * 60) `addUTCTime` now )
}
insert_ $ CourseEdit jost now ffp
void . insert $ DegreeCourse ifiBsc ffp
void . insert $ DegreeCourse ifiMsc ffp
void . insert $ DegreeCourse ffp sdBsc sdInf
void . insert $ DegreeCourse ffp sdMst sdInf
void . insert $ Lecturer jost ffp
void . insert $ Lecturer gkleen ffp
insert_ $ Corrector gkleen ffp (ByProportion 1)
sheetkey <- insert $ Sheet ffp "Blatt 1" Nothing NotGraded NoGroups Nothing Nothing now now Nothing Nothing
@ -112,8 +114,7 @@ main = db $ do
, courseRegisterTo = Nothing
}
insert_ $ CourseEdit fhamann now eip
void . insert $ DegreeCourse ifiBsc eip
void . insert $ DegreeCourse ifiMsc eip
void . insert $ DegreeCourse eip sdBsc sdInf
void . insert $ Lecturer fhamann eip
-- interaction design
ixd <- insert Course
@ -129,7 +130,7 @@ main = db $ do
, courseRegisterTo = Just ((3600 * 24 * 60) `addUTCTime` now )
}
insert_ $ CourseEdit fhamann now ixd
void . insert $ DegreeCourse ifiBsc ixd
void . insert $ DegreeCourse ixd sdBsc sdInf
void . insert $ Lecturer fhamann ixd
-- concept development
ux3 <- insert Course
@ -145,7 +146,7 @@ main = db $ do
, courseRegisterTo = Nothing
}
insert_ $ CourseEdit fhamann now ux3
void . insert $ DegreeCourse ifiBsc ux3
void . insert $ DegreeCourse ux3 sdBsc sdInf
void . insert $ Lecturer fhamann ux3
-- promo
pmo <- insert Course
@ -161,7 +162,7 @@ main = db $ do
, courseRegisterTo = Nothing
}
insert_ $ CourseEdit jost now pmo
void . insert $ DegreeCourse ifiBsc pmo
void . insert $ DegreeCourse pmo sdBsc sdInf
void . insert $ Lecturer jost pmo
-- datenbanksysteme
dbs <- insert Course
@ -177,6 +178,7 @@ main = db $ do
, courseRegisterTo = Nothing
}
insert_ $ CourseEdit gkleen now dbs
void . insert $ DegreeCourse ifiBsc dbs
void . insert $ DegreeCourse dbs sdBsc sdInf
void . insert $ DegreeCourse dbs sdBsc sdMath
void . insert $ Lecturer gkleen dbs
void . insert $ Lecturer jost dbs