Skip to content

Commit 9c8910d

Browse files
authored
Merge pull request #2837 from TechnologyEnhancedLearning/Develop/Features/TD-4427-ChecktheminimumoptionalcompetencieshavebeenaddedbeforeenablingRequestSign-off
TD-4427 Check the minimum optional competencies have been added before enabling Request Sign-off
2 parents 1fef4f2 + 3816315 commit 9c8910d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
{ "selfAssessedCount", selfAssessedCount },
2626
{ "verifiedCount", verifiedCount }
2727
};
28-
28+
var competencyQuestionsSummary = competencySummaries.Sum(c => (int)c["questionsCount"]);
29+
var competencyVerifiedSummary = competencySummaries.Sum(c => (int)c["verifiedCount"]);
2930
Layout = "SelfAssessments/_Layout";
3031
ViewData["Title"] = "Self Assessment - Proficiencies";
3132
ViewData["SelfAssessmentTitle"] = Model.SelfAssessment.Name;
@@ -199,10 +200,13 @@
199200
All required @Model.SelfAssessment.Vocabulary.ToLower() self-assessments must be completed and confirmed,
200201
before requesting @Model.SelfAssessment.SignOffRoleName sign off of the @Model.SelfAssessment.Name.
201202
</p>
203+
@if (competencyQuestionsSummary == competencyVerifiedSummary)
204+
{
202205
<p class="nhsuk-body-l">
203206
Your self assessment does not contain enough optional proficiencies to request sign off.
204207
Go to Manage Optional Competencies to choose the optional competencies that you wish to include..
205208
</p>
209+
}
206210
}
207211
</div>
208212
}

0 commit comments

Comments
 (0)