Skip to content

Commit 1501b77

Browse files
committed
TD-3877 Putting foreach inside the if condition
1 parent a311001 commit 1501b77

File tree

2 files changed

+28
-34
lines changed

2 files changed

+28
-34
lines changed

DigitalLearningSolutions.Web/Views/LearningPortal/Current/CompetencySelfAssessmentCertificate.cshtml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -142,24 +142,21 @@
142142
<h3 class=" nhsuk-u-margin-bottom-3">
143143
Including the following optional proficiencies:
144144
</h3>
145+
@foreach (var entry in Model.CompetencyCountSelfAssessmentCertificate)
146+
{
147+
<p class="nhsuk-u-margin-bottom-2 nhsuk-body-s">
148+
@entry.CompetencyGroup - @entry.OptionalCompetencyCount
149+
@if (@entry.OptionalCompetencyCount == 1)
150+
{
151+
@Model.CompetencySelfAssessmentCertificates.Vocabulary
152+
}
153+
else
154+
{
155+
@Model.VocabPlural
156+
}
157+
</p>
158+
}
145159
}
146-
@foreach (var entry in Model.CompetencyCountSelfAssessmentCertificate)
147-
{
148-
<p class="nhsuk-u-margin-bottom-2 nhsuk-body-s">
149-
@entry.CompetencyGroup - @entry.OptionalCompetencyCount
150-
@if (@entry.OptionalCompetencyCount == 1)
151-
{
152-
@Model.CompetencySelfAssessmentCertificates.Vocabulary
153-
}
154-
else
155-
{
156-
@Model.VocabPlural
157-
}
158-
159-
</p>
160-
161-
}
162-
163160
</div>
164161

165162
<div class="footer">

DigitalLearningSolutions.Web/Views/LearningPortal/Current/DownloadCompetencySelfAssessmentCertificate.cshtml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -451,24 +451,21 @@
451451
<h3 class=" nhsuk-u-margin-bottom-3">
452452
Including the following optional proficiencies:
453453
</h3>
454+
@foreach (var entry in Model.CompetencyCountSelfAssessmentCertificate)
455+
{
456+
<p class="nhsuk-u-margin-bottom-2 nhsuk-body-s">
457+
@entry.CompetencyGroup - @entry.OptionalCompetencyCount
458+
@if (@entry.OptionalCompetencyCount == 1)
459+
{
460+
@Model.CompetencySelfAssessmentCertificates.Vocabulary
461+
}
462+
else
463+
{
464+
@Model.VocabPlural
465+
}
466+
</p>
467+
}
454468
}
455-
@foreach (var entry in Model.CompetencyCountSelfAssessmentCertificate)
456-
{
457-
<p class="nhsuk-u-margin-bottom-2 nhsuk-body-s">
458-
@entry.CompetencyGroup - @entry.OptionalCompetencyCount
459-
@if (@entry.OptionalCompetencyCount == 1)
460-
{
461-
@Model.CompetencySelfAssessmentCertificates.Vocabulary
462-
}
463-
else
464-
{
465-
@Model.VocabPlural
466-
}
467-
468-
</p>
469-
470-
}
471-
472469
</div>
473470

474471
<div class="footer">

0 commit comments

Comments
 (0)