From 03340a4bc42ab2db6f8a3bd2ab838f4d8466c294 Mon Sep 17 00:00:00 2001 From: Olivier Barais Date: Mon, 12 Feb 2024 17:38:32 +0100 Subject: [PATCH] update for no sheet --- src/main/java/fr/istic/web/rest/ExtendedAPI.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/fr/istic/web/rest/ExtendedAPI.java b/src/main/java/fr/istic/web/rest/ExtendedAPI.java index a8b8a95..184ea76 100644 --- a/src/main/java/fr/istic/web/rest/ExtendedAPI.java +++ b/src/main/java/fr/istic/web/rest/ExtendedAPI.java @@ -1888,15 +1888,15 @@ public Response getExamStatusFinish(@PathParam("examId") final long examId, @Con return Response.status(403, "Current user cannot access this ressource").build(); } - final MarkingExamStateDTO result = new MarkingExamStateDTO(); final List stdResponses = StudentResponse.getAll4ExamId(examId).list(); final Map> byQuestion = stdResponses.stream() .collect(Collectors.groupingBy(StudentResponse::getQuestionNumero)); var nbreSheet = ExamSheet.getAll4ExamId(examId).count(); var res = byQuestion.keySet().stream().allMatch(e-> byQuestion.get(e).size()==nbreSheet); - log.error("" +result); - + if (nbreSheet ==0){ + res = false; + } return Response.ok(res).build(); }