From 2c6c163102fdc2475d81acb0870ec3c42b2b2409 Mon Sep 17 00:00:00 2001 From: tarentomaheshvakkund <139739142+tarentomaheshvakkund@users.noreply.github.com> Date: Fri, 14 Jun 2024 22:03:59 +0530 Subject: [PATCH] KB-5130 | DEV| Assessment | BE | Enhancement in Consumption Logic for the QuestionWeightage Assessment Type. 1. Assessment Bug fix. --- .../assessment/service/AssessmentUtilServiceV2Impl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/sunbird/assessment/service/AssessmentUtilServiceV2Impl.java b/src/main/java/org/sunbird/assessment/service/AssessmentUtilServiceV2Impl.java index 07435da99..277d9506e 100644 --- a/src/main/java/org/sunbird/assessment/service/AssessmentUtilServiceV2Impl.java +++ b/src/main/java/org/sunbird/assessment/service/AssessmentUtilServiceV2Impl.java @@ -474,7 +474,10 @@ public Map validateQumlAssessmentV2(Map question String assessmentType= (String)questionSetDetailsMap.get(Constants.ASSESSMENT_TYPE); String negativeWeightAgeEnabled; int negativeMarksValue = 0; - int minimumPassPercentage = (int) questionSetDetailsMap.get(Constants.MINIMUM_PASS_PERCENTAGE); + int minimumPassPercentage = 0; + if (questionSetDetailsMap.get(Constants.MINIMUM_PASS_PERCENTAGE) != null) { + minimumPassPercentage = (int) questionSetDetailsMap.get(Constants.MINIMUM_PASS_PERCENTAGE); + } Integer totalMarks= (Integer) questionSetDetailsMap.get(Constants.TOTAL_MARKS); Map resultMap = new HashMap<>(); Map answers = getQumlAnswers(originalQuestionList,questionMap);