refactor: document cronNotAfter for exam closure

This commit is contained in:
Gregor Kleen 2020-11-17 13:48:49 +01:00
parent ef1411efdb
commit 1ce5598207

View File

@ -365,6 +365,10 @@ determineCrontab = execWriterT $ do
case closeTime of
Just close -> do
-- If an exam that was previously under `ExamCloseSeparate` rules transitions to `ExamCloseOnFinish`, it might suddenly have been closed an arbitrary time ago
-- If `cronNotAfter` was only `appNotificationExpiration` in that case, no notification might ever be sent
-- That's probably fine.
changedResults <- lift . E.select . E.from $ \examResult -> do
E.where_ $ examResult E.^. ExamResultExam E.==. E.val nExam
E.&&. examResult E.^. ExamResultLastChanged E.>. E.val close