Skip to content

Commit

Permalink
Added Randomisation for V4
Browse files Browse the repository at this point in the history
Added Randomisation for V4
  • Loading branch information
SaipradeepR authored Aug 2, 2024
1 parent a3d638d commit d26709b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@ private void readSectionLevelParams(Map<String, Object> assessmentAllDetail,
}
}
List<Map<String, Object>> questions = (List<Map<String, Object>>) section.get(Constants.CHILDREN);
// Shuffle the list of questions
Collections.shuffle(questions);
int maxQuestions = (int) section.getOrDefault(Constants.MAX_QUESTIONS, questions.size());
List<String> childNodeList = questions.stream()
.map(question -> (String) question.get(Constants.IDENTIFIER))
Expand Down

0 comments on commit d26709b

Please sign in to comment.