minor
This commit is contained in:
parent
ac3272e2b8
commit
68cc79e5f3
@ -892,8 +892,15 @@ postCUserR tid ssh csh uCId = do
|
|||||||
-- De-/Register Button for Lecturer
|
-- De-/Register Button for Lecturer
|
||||||
mRegAt <- traverse (formatTime SelFormatDateTime) $ courseParticipantRegistration <$> registration
|
mRegAt <- traverse (formatTime SelFormatDateTime) $ courseParticipantRegistration <$> registration
|
||||||
((registerRes,registerView), registerEnctype) <- runFormPost $ registerForm (Just uid) registration Nothing Nothing -- Lecturers are never asked their own register secret
|
((registerRes,registerView), registerEnctype) <- runFormPost $ registerForm (Just uid) registration Nothing Nothing -- Lecturers are never asked their own register secret
|
||||||
formResult registerRes $ \(mbfeatures, _secretCorrect) ->
|
formResult registerRes $ \(mbSfId, _secretCorrect) -> if -- lecturers need no secret verification
|
||||||
error "TODO: change registration"
|
-- | isRegistered -> do
|
||||||
|
| 1 + 2 < 42 -> do
|
||||||
|
runDB $ deleteBy $ UniqueParticipant uid cid
|
||||||
|
addMessageI Info MsgCourseDeregisterOk
|
||||||
|
| otherwise -> do
|
||||||
|
actTime <- liftIO getCurrentTime
|
||||||
|
regOk <- runDB $ insertUnique $ CourseParticipant cid uid actTime mbSfId
|
||||||
|
when (isJust regOk) $ addMessageI Success MsgCourseRegisterOk
|
||||||
-- generate output
|
-- generate output
|
||||||
let headingLong = [whamlet|^{nameWidget userDisplayName userSurname} - _{MsgCourseMemberOf} #{csh} #{display tid}|]
|
let headingLong = [whamlet|^{nameWidget userDisplayName userSurname} - _{MsgCourseMemberOf} #{csh} #{display tid}|]
|
||||||
headingShort = prependCourseTitle tid ssh csh $ SomeMessage userDisplayName
|
headingShort = prependCourseTitle tid ssh csh $ SomeMessage userDisplayName
|
||||||
|
|||||||
Reference in New Issue
Block a user