From a2e36995ea4699718ef88f7b9ecda8e8264a9fd0 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 17 Oct 2019 16:36:19 +0200 Subject: [PATCH] fix(course-show): show display-email for correctors & tutors --- src/Handler/Course/Show.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Handler/Course/Show.hs b/src/Handler/Course/Show.hs index 246ee7037..39ec5b047 100644 --- a/src/Handler/Course/Show.hs +++ b/src/Handler/Course/Show.hs @@ -56,13 +56,13 @@ getCShowR tid ssh csh = do E.on $ sheetCorrector E.^. SheetCorrectorSheet E.==. sheet E.^. SheetId E.where_ $ sheet E.^. SheetCourse E.==. E.val cid E.orderBy [ E.asc $ user E.^. UserSurname, E.asc $ user E.^. UserDisplayName ] - return ( user E.^. UserEmail, user E.^. UserDisplayName, user E.^. UserSurname ) + return ( user E.^. UserDisplayEmail, user E.^. UserDisplayName, user E.^. UserSurname ) tutors <- fmap (map $(unValueN 3)) . lift . E.select $ E.from $ \(tutorial `E.InnerJoin` tutor `E.InnerJoin` user) -> E.distinctOnOrderBy [E.asc $ user E.^. UserSurname, E.asc $ user E.^. UserDisplayName, E.asc $ user E.^. UserEmail ] $ do E.on $ tutor E.^. TutorUser E.==. user E.^. UserId E.on $ tutor E.^. TutorTutorial E.==. tutorial E.^. TutorialId E.where_ $ tutorial E.^. TutorialCourse E.==. E.val cid E.orderBy [ E.asc $ user E.^. UserSurname, E.asc $ user E.^. UserDisplayName ] - return ( user E.^. UserEmail, user E.^. UserDisplayName, user E.^. UserSurname ) + return ( user E.^. UserDisplayEmail, user E.^. UserDisplayName, user E.^. UserSurname ) mAllocation <- fmap (fmap entityVal . listToMaybe) . lift . E.select . E.from $ \(allocation `E.InnerJoin` allocationCourse) -> do E.on $ allocation E.^. AllocationId E.==. allocationCourse E.^. AllocationCourseAllocation E.where_ $ allocationCourse E.^. AllocationCourseCourse E.==. E.val cid