diff --git a/src/Dfe.EarlyYearsQualification.Mock/Content/MockQualificationsRepository.cs b/src/Dfe.EarlyYearsQualification.Mock/Content/MockQualificationsRepository.cs index 62da27ed..2109c6f8 100644 --- a/src/Dfe.EarlyYearsQualification.Mock/Content/MockQualificationsRepository.cs +++ b/src/Dfe.EarlyYearsQualification.Mock/Content/MockQualificationsRepository.cs @@ -19,9 +19,6 @@ public class MockQualificationsRepository : IQualificationsRepository "eyq-115" => await Task.FromResult(CreateQualification("EYQ-115", "NCFE", AwardingOrganisations.Various, 3, false)), "eyq-114" => await Task.FromResult(CreateLevel2FurtherActionRequiredQualification("EYQ-114", "Level 2 Further Action Qualification", AwardingOrganisations.Ncfe, 3)), - - "eyq-241" => await Task.FromResult(CreateQualification("EYQ-241", "BTEC", - AwardingOrganisations.Various, 2)), _ => await Task.FromResult(CreateQualification("EYQ-240", "T Level Technical Qualification in Education and Childcare (Specialism - Early Years Educator)", AwardingOrganisations.Ncfe, 3)) diff --git a/src/Dfe.EarlyYearsQualification.Web/Controllers/QualificationDetailsController.cs b/src/Dfe.EarlyYearsQualification.Web/Controllers/QualificationDetailsController.cs index 43eed457..e254870d 100644 --- a/src/Dfe.EarlyYearsQualification.Web/Controllers/QualificationDetailsController.cs +++ b/src/Dfe.EarlyYearsQualification.Web/Controllers/QualificationDetailsController.cs @@ -94,19 +94,19 @@ public async Task Index(string qualificationId) if (!validateAdditionalRequirementQuestions.isValid) { - await CheckLevel2EdgeCase(model, qualification); + await QualificationLevel3OrAboveMightBeRelevantAtLevel2(model, qualification); return validateAdditionalRequirementQuestions.actionResult!; } // If all the additional requirement checks pass, then we can go to check each level individually await CheckRatioRequirements(qualificationStartedBeforeSeptember2014, qualification, model); - await CheckLevel2EdgeCase(model, qualification); + await QualificationLevel3OrAboveMightBeRelevantAtLevel2(model, qualification); return View(model); } - private async Task CheckLevel2EdgeCase(QualificationDetailsModel model, Qualification qualification) + private async Task QualificationLevel3OrAboveMightBeRelevantAtLevel2(QualificationDetailsModel model, Qualification qualification) { // Check if the qualification is not full and relevant and was started between Sept 2014 and Aug 2019 and is above a level 2 qualification if (model.RatioRequirements.IsNotFullAndRelevant && userJourneyCookieService.WasStartedBetweenSept2014AndAug2019() && qualification.QualificationLevel > 2) diff --git a/src/Dfe.EarlyYearsQualification.Web/Models/Content/RatioRequirementModel.cs b/src/Dfe.EarlyYearsQualification.Web/Models/Content/RatioRequirementModel.cs index 047470a9..ee8cbd43 100644 --- a/src/Dfe.EarlyYearsQualification.Web/Models/Content/RatioRequirementModel.cs +++ b/src/Dfe.EarlyYearsQualification.Web/Models/Content/RatioRequirementModel.cs @@ -10,10 +10,16 @@ public class RatioRequirementModel public QualificationApprovalStatus ApprovedForUnqualified { get; set; } - public bool IsNotFullAndRelevant => - ApprovedForLevel2 != QualificationApprovalStatus.Approved - && ApprovedForLevel3 != QualificationApprovalStatus.Approved - && ApprovedForLevel6 != QualificationApprovalStatus.Approved; + public bool IsNotFullAndRelevant + { + get + { + return ApprovedForLevel2 != QualificationApprovalStatus.Approved + && ApprovedForLevel3 != QualificationApprovalStatus.Approved + && ApprovedForLevel6 != QualificationApprovalStatus.Approved; + } + } + public string RequirementsHeadingForLevel2 { get; set; } = string.Empty; diff --git a/src/Dfe.EarlyYearsQualification.Web/Models/RatioRowModel.cs b/src/Dfe.EarlyYearsQualification.Web/Models/RatioRowModel.cs index f70895ca..c57c14b1 100644 --- a/src/Dfe.EarlyYearsQualification.Web/Models/RatioRowModel.cs +++ b/src/Dfe.EarlyYearsQualification.Web/Models/RatioRowModel.cs @@ -4,7 +4,13 @@ public class RatioRowModel { public string LevelText { get; init; } = string.Empty; - public string RatioId => string.Concat(LevelText.Where(c => !char.IsWhiteSpace(c))); + public string RatioId + { + get + { + return string.Concat(LevelText.Where(c => !char.IsWhiteSpace(c))); + } + } public QualificationApprovalStatus ApprovalStatus { get; init; }