Skip to content

Commit

Permalink
KB-5744 | The assessment reattempt count shuld not include the 1st at…
Browse files Browse the repository at this point in the history
…tempt (#632)

* KB-5744 | The assessment reattempt  count shuld not  include the 1st attempt

1. Assessment reattempt handled.

* KB-5744 | The assessment reattempt count shuld not include the 1st attempt
  • Loading branch information
tarentomaheshvakkund authored Jul 3, 2024
1 parent ade47ff commit a8456ed
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,8 @@ public SBApiResponse readAssessment(String assessmentIdentifier, String token,bo
logger.info(
"Incase the assessment is submitted before the end time, or the endtime has exceeded, read assessment freshly ");
if (assessmentAllDetail.get(Constants.MAX_ASSESSMENT_RETAKE_ATTEMPTS) != null) {
int retakeAttemptsAllowed = (int) assessmentAllDetail.get(Constants.MAX_ASSESSMENT_RETAKE_ATTEMPTS);
int retakeAttemptsAllowed = (int) assessmentAllDetail.get(Constants.MAX_ASSESSMENT_RETAKE_ATTEMPTS) +1;
int retakeAttemptsConsumed = calculateAssessmentRetakeCount(userId, assessmentIdentifier);
retakeAttemptsConsumed=retakeAttemptsConsumed+1;
if(retakeAttemptsConsumed >= retakeAttemptsAllowed) {
errMsg = Constants.ASSESSMENT_RETRY_ATTEMPTS_CROSSED;
updateErrorDetails(response, errMsg, HttpStatus.INTERNAL_SERVER_ERROR);
Expand Down

0 comments on commit a8456ed

Please sign in to comment.