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