diff --git a/src/CryptoID.hs b/src/CryptoID.hs index 1f6c3bf0d..efcc099ca 100644 --- a/src/CryptoID.hs +++ b/src/CryptoID.hs @@ -43,6 +43,7 @@ decCryptoIDs [ ''SubmissionId , ''SystemMessageId , ''SystemMessageTranslationId , ''StudyFeaturesId + , ''ExamId , ''ExamOccurrenceId , ''ExamPartId , ''AllocationId diff --git a/src/Handler/Exam/Correct.hs b/src/Handler/Exam/Correct.hs index fcc025a95..d730ef647 100644 --- a/src/Handler/Exam/Correct.hs +++ b/src/Handler/Exam/Correct.hs @@ -66,7 +66,7 @@ getECorrectR :: TermId -> SchoolId -> CourseShorthand -> ExamName -> Handler Htm getECorrectR tid ssh csh examn = do MsgRenderer mr <- getMsgRenderer - (Entity _ Exam{..}, examParts) <- runDB $ do + (Entity eId Exam{..}, examParts) <- runDB $ do exam@(Entity eId Exam{..}) <- fetchExam tid ssh csh examn examParts <- sortOn (view $ _entityVal . _examPartNumber) <$> selectList [ ExamPartExam ==. eId ] [ Asc ExamPartName ] return (exam, entityVal <$> examParts) @@ -81,7 +81,7 @@ getECorrectR tid ssh csh examn = do participantHeadTooltip = [whamlet| _{MsgExamCorrectHeadParticipantTooltip} |] - examCorrectIdent = intercalate "-" [toPathPiece tid, toPathPiece ssh, toPathPiece csh, toPathPiece examn] + examCorrectIdent <- encrypt eId :: Handler CryptoUUIDExam siteLayoutMsg heading $ do setTitleI heading