refactor: fix hlint errors
This commit is contained in:
parent
1e756be778
commit
cf1c63cc78
@ -25,5 +25,4 @@ getCNotesR, postCNotesR :: TermId -> SchoolId -> CourseShorthand -> Handler Html
|
|||||||
-- PROBLEM: Correctors usually don't know Participants by name (anonymous), maybe notes are not shared?
|
-- PROBLEM: Correctors usually don't know Participants by name (anonymous), maybe notes are not shared?
|
||||||
-- If they are shared, adjust MsgCourseUserNoteTooltip
|
-- If they are shared, adjust MsgCourseUserNoteTooltip
|
||||||
getCNotesR = postCNotesR
|
getCNotesR = postCNotesR
|
||||||
postCNotesR _ _ _ = do
|
postCNotesR _ _ _ = defaultLayout [whamlet|You have corrector access to this course.|]
|
||||||
defaultLayout $ [whamlet|You have corrector access to this course.|]
|
|
||||||
|
|||||||
@ -128,20 +128,20 @@ postCAddUserR tid ssh csh = do
|
|||||||
-- register known users
|
-- register known users
|
||||||
execWriterT $ mapM (registerUser cid) uids
|
execWriterT $ mapM (registerUser cid) uids
|
||||||
|
|
||||||
when (not $ null emails) $
|
unless (null emails) $
|
||||||
tell . pure <=< messageI Success . MsgCourseParticipantsInvited $ length emails
|
tell . pure <=< messageI Success . MsgCourseParticipantsInvited $ length emails
|
||||||
|
|
||||||
when (not $ null aurAlreadyRegistered) $ do
|
unless (null aurAlreadyRegistered) $ do
|
||||||
let modalTrigger = [whamlet|_{MsgCourseParticipantsAlreadyRegistered (length aurAlreadyRegistered)}|]
|
let modalTrigger = [whamlet|_{MsgCourseParticipantsAlreadyRegistered (length aurAlreadyRegistered)}|]
|
||||||
modalContent = $(widgetFile "messages/courseInvitationAlreadyRegistered")
|
modalContent = $(widgetFile "messages/courseInvitationAlreadyRegistered")
|
||||||
tell . pure <=< messageWidget Info $ msgModal modalTrigger (Right modalContent)
|
tell . pure <=< messageWidget Info $ msgModal modalTrigger (Right modalContent)
|
||||||
|
|
||||||
when (not $ null aurNoUniquePrimaryField) $ do
|
unless (null aurNoUniquePrimaryField) $ do
|
||||||
let modalTrigger = [whamlet|_{MsgCourseParticipantsRegisteredWithoutField (length aurNoUniquePrimaryField)}|]
|
let modalTrigger = [whamlet|_{MsgCourseParticipantsRegisteredWithoutField (length aurNoUniquePrimaryField)}|]
|
||||||
modalContent = $(widgetFile "messages/courseInvitationRegisteredWithoutField")
|
modalContent = $(widgetFile "messages/courseInvitationRegisteredWithoutField")
|
||||||
tell . pure <=< messageWidget Warning $ msgModal modalTrigger (Right modalContent)
|
tell . pure <=< messageWidget Warning $ msgModal modalTrigger (Right modalContent)
|
||||||
|
|
||||||
when (not $ null aurSuccess) $
|
unless (null aurSuccess) $
|
||||||
tell . pure <=< messageI Success . MsgCourseParticipantsRegistered $ length aurSuccess
|
tell . pure <=< messageI Success . MsgCourseParticipantsRegistered $ length aurSuccess
|
||||||
|
|
||||||
registerUser :: CourseId -> UserId -> WriterT AddRecipientsResult (YesodJobDB UniWorX) ()
|
registerUser :: CourseId -> UserId -> WriterT AddRecipientsResult (YesodJobDB UniWorX) ()
|
||||||
|
|||||||
Reference in New Issue
Block a user