feat(exam): save registration timestamp
This commit is contained in:
parent
31931e708e
commit
78e4369afb
@ -34,6 +34,7 @@ ExamRegistration
|
|||||||
exam ExamId
|
exam ExamId
|
||||||
user UserId
|
user UserId
|
||||||
occurrence ExamOccurrenceId Maybe
|
occurrence ExamOccurrenceId Maybe
|
||||||
|
time UTCTime default=now()
|
||||||
UniqueExamRegistration exam user
|
UniqueExamRegistration exam user
|
||||||
ExamPartResult
|
ExamPartResult
|
||||||
examPart ExamPartId
|
examPart ExamPartId
|
||||||
|
|||||||
@ -815,7 +815,8 @@ postERegisterR tid ssh csh examn = do
|
|||||||
formResult btnResult $ \case
|
formResult btnResult $ \case
|
||||||
BtnRegister -> do
|
BtnRegister -> do
|
||||||
runDB $ do
|
runDB $ do
|
||||||
insert_ $ ExamRegistration eId uid Nothing
|
now <- liftIO getCurrentTime
|
||||||
|
insert_ $ ExamRegistration eId uid Nothing now
|
||||||
audit' $ TransactionExamRegister (unTermKey tid) (unSchoolKey ssh) csh examn userIdent
|
audit' $ TransactionExamRegister (unTermKey tid) (unSchoolKey ssh) csh examn userIdent
|
||||||
addMessageI Success $ MsgExamRegisteredSuccess examn
|
addMessageI Success $ MsgExamRegisteredSuccess examn
|
||||||
redirect $ CExamR tid ssh csh examn EShowR
|
redirect $ CExamR tid ssh csh examn EShowR
|
||||||
|
|||||||
Reference in New Issue
Block a user