From d26709ba045c8bfbdcf3e414500875908c5d3872 Mon Sep 17 00:00:00 2001 From: SaipradeepR <53404427+SaipradeepR@users.noreply.github.com> Date: Fri, 2 Aug 2024 13:15:01 +0530 Subject: [PATCH] Added Randomisation for V4 Added Randomisation for V4 --- .../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 07f11a715..88eafd528 100644 --- a/src/main/java/org/sunbird/assessment/service/AssessmentServiceV4Impl.java +++ b/src/main/java/org/sunbird/assessment/service/AssessmentServiceV4Impl.java @@ -595,6 +595,8 @@ private void readSectionLevelParams(Map assessmentAllDetail, } } List> questions = (List>) section.get(Constants.CHILDREN); + // Shuffle the list of questions + Collections.shuffle(questions); int maxQuestions = (int) section.getOrDefault(Constants.MAX_QUESTIONS, questions.size()); List childNodeList = questions.stream() .map(question -> (String) question.get(Constants.IDENTIFIER))