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
|
||||
mRegAt <- traverse (formatTime SelFormatDateTime) $ courseParticipantRegistration <$> registration
|
||||
((registerRes,registerView), registerEnctype) <- runFormPost $ registerForm (Just uid) registration Nothing Nothing -- Lecturers are never asked their own register secret
|
||||
formResult registerRes $ \(mbfeatures, _secretCorrect) ->
|
||||
error "TODO: change registration"
|
||||
formResult registerRes $ \(mbSfId, _secretCorrect) -> if -- lecturers need no secret verification
|
||||
-- | 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
|
||||
let headingLong = [whamlet|^{nameWidget userDisplayName userSurname} - _{MsgCourseMemberOf} #{csh} #{display tid}|]
|
||||
headingShort = prependCourseTitle tid ssh csh $ SomeMessage userDisplayName
|
||||
|
||||
Loading…
Reference in New Issue
Block a user