diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/CmmcBusiness.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/CmmcBusiness.cs index d982165d32..c6d86933db 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/CmmcBusiness.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/CmmcBusiness.cs @@ -30,8 +30,12 @@ public class CmmcBusiness private List _maturityExtra; + // Answers that don't count against the score private readonly List _goodAnswerOptions = new List() {"Y", "NA"}; + // The questions that allow an "incomplete" answer selection + private readonly List _questionsThatAllowIncomplete = new List() { 5330, 5382 }; + // CMMC 2.0 FINAL model ID private readonly int modelIdCmmc2 = 19; @@ -280,9 +284,19 @@ public CmmcScoreModel GetSPRSScore(int assessmentId) /// Successful answers (Y, NA) deduct no points. /// Questions not defined with a point value in MATURITY_EXTRA (e.g., Level 1 and Level 3) /// default to a 1-point deduction. + /// + /// SPECIAL CASE: Two of the questions can get a partial score. This limited scenario is not + /// worth a total refactor of MATURITY_EXTRA, so we are handling it programmatically + /// in this method for now. /// private int DeductionForAnswer(CmmcQuestion q) { + // Special "incomplete" scenario for CMMC questions 5330 and 5382 + if (_questionsThatAllowIncomplete.Contains(q.QuestionId) && q.AnswerText == "I") + { + return 3; + } + if (_goodAnswerOptions.Contains(q.AnswerText)) { return 0; diff --git a/CSETWebNg/src/assets/i18n/en.json b/CSETWebNg/src/assets/i18n/en.json index eaf080d245..a1535dabcc 100644 --- a/CSETWebNg/src/assets/i18n/en.json +++ b/CSETWebNg/src/assets/i18n/en.json @@ -494,6 +494,7 @@ "no-cmmc": "Not Met", "n-cmmc": "Not Met", "na-cmmc": "N/A", + "i-cmmc": "Incomplete", "u-cmmc": "Unanswered" }, "placeholders": {