From 730e7989be4e6af11188342d3dbbc0bbda06b393 Mon Sep 17 00:00:00 2001 From: SaipradeepR <53404427+SaipradeepR@users.noreply.github.com> Date: Fri, 2 Aug 2024 15:09:33 +0530 Subject: [PATCH] Retake Count Fix Retake Count Fix --- .../org/sunbird/assessment/service/AssessmentServiceV4Impl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/sunbird/assessment/service/AssessmentServiceV4Impl.java b/src/main/java/org/sunbird/assessment/service/AssessmentServiceV4Impl.java index 88eafd528..55688a62e 100644 --- a/src/main/java/org/sunbird/assessment/service/AssessmentServiceV4Impl.java +++ b/src/main/java/org/sunbird/assessment/service/AssessmentServiceV4Impl.java @@ -92,6 +92,8 @@ public SBApiResponse retakeAssessment(String assessmentIdentifier, String token, if (serverProperties.isAssessmentRetakeCountVerificationEnabled()) { retakeAttemptsConsumed = calculateAssessmentRetakeCount(userId, assessmentIdentifier); + if(retakeAttemptsConsumed > 0) + retakeAttemptsConsumed = retakeAttemptsConsumed-1; } } catch (Exception e) { errMsg = String.format("Error while calculating retake assessment. Exception: %s", e.getMessage());