u2w-merge #192

Merged
savau merged 344 commits from u2w-merge into master 2022-09-02 18:00:29 +02:00
Showing only changes of commit b294b1cfc4 - Show all commits

View File

@ -293,9 +293,15 @@ postEGradesR tid ssh csh examn = do
isSynced <- view . queryIsSynced $ E.val uid
lift $ do
E.on $ courseParticipant E.?. CourseParticipantCourse E.==. E.just (E.val examCourse)
E.&&. courseParticipant E.?. CourseParticipantUser E.==. E.just (user E.^. UserId)
E.&&. courseParticipant E.?. CourseParticipantState E.==. E.just (E.val CourseParticipantActive)
E.on $ E.maybe E.true (\cCourse ->
cCourse E.==. E.val examCourse
) (courseParticipant E.?. CourseParticipantCourse)
E.&&. E.maybe E.true (\cUser ->
cUser E.==. user E.^. UserId
) (courseParticipant E.?. CourseParticipantUser)
E.&&. E.maybe E.true (\cState ->
cState E.==. E.val CourseParticipantActive
) (courseParticipant E.?. CourseParticipantState)
E.on $ occurrence E.?. ExamOccurrenceExam E.==. E.just (E.val eid)
E.&&. occurrence E.?. ExamOccurrenceId E.==. E.joinV (examRegistration E.?. ExamRegistrationOccurrence)
E.on $ examRegistration E.?. ExamRegistrationUser E.==. E.just (user E.^. UserId)