diff --git a/src/Handler/Exam/Correct.hs b/src/Handler/Exam/Correct.hs index c91c345ac..a14a839b3 100644 --- a/src/Handler/Exam/Correct.hs +++ b/src/Handler/Exam/Correct.hs @@ -98,9 +98,10 @@ postECorrectR tid ssh csh examn = do if -- on no-op request, answer with 200 and a set of all participant matches | is _Nothing ciqResults, is _Nothing ciqGrade -> do - users <- traverse userToResponse participantMatches + users <- traverse userToResponse $ take maxCountUserMatches participantMatches return CorrectInterfaceResponseNoOp - { cirnUsers = Set.fromList users + { cirnUsers = Set.fromList users + , cirnHasMore = length participantMatches > maxCountUserMatches } -- on match with exactly one exam participant, insert results and/or grade and answer with 200 diff --git a/src/Handler/ExternalExam/Correct.hs b/src/Handler/ExternalExam/Correct.hs index 26521a266..729265437 100644 --- a/src/Handler/ExternalExam/Correct.hs +++ b/src/Handler/ExternalExam/Correct.hs @@ -93,9 +93,10 @@ postEECorrectR tid ssh coursen examn = do if | is _Nothing ciqResults, is _Nothing ciqGrade -> do - users <- traverse userToResponse matches + users <- traverse userToResponse $ take maxCountUserMatches matches return CorrectInterfaceResponseNoOp - { cirnUsers = Set.fromList users + { cirnUsers = Set.fromList users + , cirnHasMore = length matches > maxCountUserMatches } | [match@(Entity uid _)] <- matches -> do now <- liftIO getCurrentTime diff --git a/src/Utils/Exam.hs b/src/Utils/Exam.hs index a82c85ed7..ea025fb1e 100644 --- a/src/Utils/Exam.hs +++ b/src/Utils/Exam.hs @@ -51,6 +51,7 @@ data CorrectInterfaceResponse } | CorrectInterfaceResponseNoOp { cirnUsers :: Set CorrectInterfaceUser + , cirnHasMore :: Bool } deriveToJSON defaultOptions