From b3bfffe1c656adb7a0c3da4b56f872111fa2a3e2 Mon Sep 17 00:00:00 2001 From: SJost Date: Tue, 11 Sep 2018 11:23:14 +0200 Subject: [PATCH] minor --- src/Handler/Utils/Table/Convenience.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Handler/Utils/Table/Convenience.hs b/src/Handler/Utils/Table/Convenience.hs index 5ff8b12a4..95293a02b 100644 --- a/src/Handler/Utils/Table/Convenience.hs +++ b/src/Handler/Utils/Table/Convenience.hs @@ -76,12 +76,13 @@ sheetCell (crse, E.Value shn) = link= CSheetR tid ssh csh shn SShowR in anchorCell link $ display2widget shn -submissionCell :: IsDBTable m a => (CourseLink', E.Value SheetName, SubmissionId) -> DBCell m a -submissionCell (crse, E.Value shn, sid) = +submissionCell :: IsDBTable m a => (CourseLink', E.Value SheetName, Entity Submission) -> DBCell m a +submissionCell (crse, E.Value shn, submission) = let tid = crse ^. _1 . _unValue ssh = crse ^. _2 . _unValue csh = crse ^. _4 . _unValue - mkCid = encrypt (sid :: SubmissionId) -- TODO: executed twice -- FIXED! + sid = entityKey submission + mkCid = encrypt (sid :: SubmissionId) -- TODO: executed twice -- FIXED here, but not everywhere! mkRoute cid = CSubmissionR tid ssh csh shn cid SubShowR mkText cid = display2widget cid in anchorCellM' mkCid mkRoute mkText