Fix for SheetMarking visible to students

This commit is contained in:
SJost 2018-06-07 10:39:43 +02:00
parent 5e5c980459
commit ea6c7b7761

View File

@ -268,8 +268,10 @@ knownTags = -- should not throw exceptions, i.e. no getBy404 or requireAuthId
Entity sid Sheet{..} <- MaybeT . getBy $ CourseSheet cid shn
cTime <- liftIO getCurrentTime
case subRoute of
SFileR SheetExercise _ -> guard $ maybe False (<= cTime) sheetVisibleFrom
SFileR SheetHint _ -> guard $ maybe False (<= cTime) sheetHintFrom
SFileR SheetSolution _ -> guard $ maybe False (<= cTime) sheetSolutionFrom
SFileR SheetMarking _ -> return False -- only for correctors and lecturers
SubmissionR NewSubmission -> guard $ sheetActiveFrom <= cTime && cTime <= sheetActiveTo
_ -> guard $ maybe False (<= cTime) sheetVisibleFrom
return Authorized