fix(lms): eliminate unlikely possible discrepancy for LMS deletion indicator

It was theoretically possible for LMS Learner deletion tag to be not correctly shown in LMS table.

Also see #2605 for further related issues.
This commit is contained in:
Steffen Jost 2025-01-10 16:49:53 +01:00
parent 9a281f040e
commit e90d11682b

View File

@ -135,7 +135,7 @@ lmsDeletionDate mbMaxAuditMonths = do
-- | Decide whether LMS platform should delete an identifier
lmsUserToDeleteExpr :: UTCTime -> E.SqlExpr (Entity LmsUser) -> E.SqlExpr (E.Value Bool)
lmsUserToDeleteExpr cutoff lmslist = E.isNothing (lmslist E.^. LmsUserEnded)
E.&&. E.isJust (lmslist E.^. LmsUserStatus)
-- E.&&. E.isJust (lmslist E.^. LmsUserStatus)
E.&&. E.isJust (lmslist E.^. LmsUserStatusDay)
E.&&. lmslist E.^. LmsUserStatusDay E.<=. E.justVal cutoff