Skip to content

Commit c4b040b

Browse files
committed
TD-5339 Changing text to pick up dynamic vocabulary
1 parent 378b7b6 commit c4b040b

File tree

3 files changed

+22
-13
lines changed

3 files changed

+22
-13
lines changed

DigitalLearningSolutions.Web/Controllers/LearningPortalController/SelfAssessment.cs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,25 @@ public IActionResult SelfAssessment(int selfAssessmentId)
6868
return RedirectToAction("StatusCode", "LearningSolutions", new { code = 403 });
6969
}
7070

71+
if (!selfAssessment.SelfAssessmentProcessAgreed && selfAssessment.IsSupervised)
72+
{
73+
var processmodel = new SelfAssessmentProcessViewModel()
74+
{
75+
SelfAssessmentID = selfAssessmentId,
76+
Vocabulary = selfAssessment.Vocabulary,
77+
VocabPlural = FrameworkVocabularyHelper.VocabularyPlural(selfAssessment.Vocabulary)
78+
};
79+
return View("SelfAssessments/AgreeSelfAssessmentProcess", processmodel);
80+
}
81+
7182
selfAssessmentService.IncrementLaunchCount(selfAssessmentId, delegateUserId);
7283
selfAssessmentService.UpdateLastAccessed(selfAssessmentId, delegateUserId);
7384
var supervisors = selfAssessmentService.GetAllSupervisorsForSelfAssessmentId(
7485
selfAssessmentId,
7586
delegateUserId
7687
).ToList();
7788
var model = new SelfAssessmentDescriptionViewModel(selfAssessment, supervisors);
78-
var isProcessAgreed = model.SelfAssessmentProcessAgreed;
79-
if (!isProcessAgreed && selfAssessment.IsSupervised)
80-
{
81-
var processmodel = new SelfAssessmentProcessViewModel()
82-
{
83-
SelfAssessmentID = selfAssessmentId
84-
};
85-
return View("SelfAssessments/AgreeSelfAssessmentProcess", processmodel);
86-
}
89+
8790
return View("SelfAssessments/SelfAssessmentDescription", model);
8891
}
8992

DigitalLearningSolutions.Web/ViewModels/LearningPortal/SelfAssessments/SelfAssessmentProcessViewModel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@ public class SelfAssessmentProcessViewModel
1010
public int SelfAssessmentID { get; set; }
1111
[BooleanMustBeTrue(ErrorMessage = "Please tick the checkbox to confirm that you understand and agree to the self-assessment process")]
1212
public bool ActionConfirmed { get; set; }
13+
14+
public string? VocabPlural { get; set; }
15+
public string? Vocabulary { get; set; }
16+
1317
}
1418
}

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
{
1919
<vc:error-summary order-of-property-names="@(new[] { nameof(Model.ActionConfirmed) })" />
2020
}
21-
<h2>How are proficiencies and frameworks assessed?</h2>
21+
<h2>How are @Model.VocabPlural?.ToLower() and frameworks assessed?</h2>
2222

2323
<p>The process is learner-driven but you must be assessed by a supervisor before completing a self-assessment.</p>
2424

25-
<p>Once enrolled in a framework with at least 1 supervisor added, you can complete a digital self-assessment for any proficiency. However, before doing so, ensure that:</p>
25+
<p>Once enrolled in a framework with at least 1 supervisor added, you can complete a digital self-assessment for any @Model.Vocabulary?.ToLower(). However, before doing so, ensure that:</p>
2626

2727
<ol>
28-
<li>Your supervisor can sign-off this proficiency based on their competence or department requirements.</li>
28+
<li>Your supervisor can sign-off this @Model.Vocabulary?.ToLower() based on their competence or department requirements.</li>
2929
<li>You have been formally assessed, this could be through observation, discussion, or another agreed method with your supervisor.</li>
30-
<li>You have reflected on the proficiency description and feel you meet the requirements.</li>
30+
<li>You have reflected on the @Model.Vocabulary?.ToLower() description and feel you meet the requirements.</li>
3131
<li>If you don’t fully meet the requirements, you can still document your progress and next steps for future assessment.</li>
3232
</ol>
3333

@@ -41,6 +41,8 @@
4141
Continue
4242
</button>
4343
<input type="hidden" asp-for="SelfAssessmentID" />
44+
<input type="hidden" asp-for="Vocabulary" />
45+
<input type="hidden" asp-for="VocabPlural" />
4446
</form>
4547
<div class="nhsuk-back-link">
4648
<a class="nhsuk-back-link__link" asp-controller="LearningPortal"

0 commit comments

Comments
 (0)