Bugfix: SAssignR time attribute

This commit is contained in:
SJost 2018-11-13 14:23:43 +01:00
parent 673d98ff91
commit b27fb8f391

View File

@ -427,7 +427,8 @@ knownTags = Map.fromList -- should not throw exceptions, i.e. no getBy404 or req
cTime <- liftIO getCurrentTime
let
visible = NTop sheetVisibleFrom <= NTop (Just cTime)
active = sheetActiveFrom <= cTime && cTime <= sheetActiveTo
active = sheetActiveFrom <= cTime && cTime <= sheetActiveTo
marking = cTime > sheetActiveTo
guard visible
@ -436,7 +437,7 @@ knownTags = Map.fromList -- should not throw exceptions, i.e. no getBy404 or req
SFileR SheetHint _ -> guard $ maybe False (<= cTime) sheetHintFrom
SFileR SheetSolution _ -> guard $ maybe False (<= cTime) sheetSolutionFrom
SubmissionNewR -> guard active
SubmissionR _ SAssignR -> guard $ not active -- Correctors can only be assigned when the Sheet is inactive, since submissions are subject to change
SubmissionR _ SAssignR -> guard $ marking -- Correctors can only be assigned when the Sheet is inactive, since submissions are subject to change
SubmissionR _ _ -> guard active
_ -> return ()