Skip to content

Commit 2c611cd

Browse files
committed
Merge branch 'DLS-Release-v1.2.4' into UAT
2 parents b7aa6f5 + d206803 commit 2c611cd

File tree

9 files changed

+12
-69
lines changed

9 files changed

+12
-69
lines changed

DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public interface ISupervisorDataService
3939
IEnumerable<SupervisorDelegateDetail> GetSupervisorDelegateDetailsForAdminIdWithoutRemovedClause(int adminId);
4040
SupervisorDelegateDetail GetSupervisorDelegateDetailsByIdWithoutRemoveClause(int supervisorDelegateId, int adminId, int delegateUserId);
4141
//UPDATE DATA
42-
bool ConfirmSupervisorDelegateById(int supervisorDelegateId, int candidateId, int adminId);
4342
bool RemoveSupervisorDelegateById(int supervisorDelegateId, int delegateUserId, int adminId);
4443
bool UpdateSelfAssessmentResultSupervisorVerifications(int selfAssessmentResultSupervisorVerificationId, string? comments, bool signedOff, int adminId);
4544
bool UpdateSelfAssessmentResultSupervisorVerificationsEmailSent(int selfAssessmentResultSupervisorVerificationId);
@@ -522,22 +521,6 @@ FROM AdminAccounts AS aa INNER JOIN
522521
new { CentreID, CategoryID });
523522
}
524523

525-
public bool ConfirmSupervisorDelegateById(int supervisorDelegateId, int delegateUserId, int adminId)
526-
{
527-
var numberOfAffectedRows = connection.Execute(
528-
@"UPDATE SupervisorDelegates SET Confirmed = getUTCDate()
529-
WHERE ID = @supervisorDelegateId AND Confirmed IS NULL AND Removed IS NULL AND (CandidateID = @candidateId OR SupervisorAdminID = @adminId)",
530-
new { supervisorDelegateId, delegateUserId, adminId });
531-
if (numberOfAffectedRows < 1)
532-
{
533-
logger.LogWarning(
534-
$"Not confirming SupervisorDelegate as db update failed. supervisorDelegateId: {supervisorDelegateId}, delegateUserId: {delegateUserId}, adminId: {adminId}"
535-
);
536-
return false;
537-
}
538-
return true;
539-
}
540-
541524
public bool RemoveSupervisorDelegateById(int supervisorDelegateId, int delegateUserId, int adminId)
542525
{
543526

DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -263,16 +263,6 @@ private string IsMemberAlreadySupervisor(int adminId,
263263
return string.Empty;
264264
}
265265

266-
public IActionResult ConfirmSupervise(int supervisorDelegateId)
267-
{
268-
var adminId = GetAdminId();
269-
if (supervisorService.ConfirmSupervisorDelegateById(supervisorDelegateId, 0, adminId))
270-
{
271-
frameworkNotificationService.SendSupervisorDelegateConfirmed(supervisorDelegateId, adminId, 0, GetCentreId());
272-
}
273-
274-
return RedirectToAction("MyStaffList");
275-
}
276266
public IActionResult RemoveSupervisorDelegate()
277267
{
278268
return RedirectToAction("MyStaffList");

DigitalLearningSolutions.Web/Services/FrameworkNotificationService.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public interface IFrameworkNotificationService
1616
void SendReviewRequest(int id, int invitedByAdminId, bool required, bool reminder, int centreId);
1717
void SendReviewOutcomeNotification(int reviewId, int centreId);
1818
void SendSupervisorDelegateInvite(int supervisorDelegateId, int adminId, int centreId);
19-
void SendSupervisorDelegateConfirmed(int superviseDelegateId, int adminId, int delegateUserId, int centreId);
2019
void SendSupervisorResultReviewed(int adminId, int supervisorDelegateId, int candidateAssessmentId, int resultId, int centreId);
2120
void SendSupervisorEnroledDelegate(int adminId, int supervisorDelegateId, int candidateAssessmentId, DateTime? completeByDate, int centreId);
2221
void SendReminderDelegateSelfAssessment(int adminId, int supervisorDelegateId, int candidateAssessmentId, int centreId);
@@ -227,24 +226,6 @@ public void SendSupervisorDelegateInvite(int supervisorDelegateId, int adminId,
227226
}
228227
}
229228

230-
public void SendSupervisorDelegateConfirmed(int supervisorDelegateId, int adminId, int delegateUserId, int centreId)
231-
{
232-
var supervisorDelegate = supervisorService.GetSupervisorDelegateDetailsById(supervisorDelegateId, adminId, delegateUserId);
233-
234-
string centreName = GetCentreName(centreId);
235-
string emailSubjectLine = "Supervisor Confirmed - Digital Learning Solutions";
236-
var builder = new BodyBuilder();
237-
builder.TextBody = $@"Dear {supervisorDelegate.FirstName}
238-
You have been identified as a supervised delegate by {supervisorDelegate.SupervisorName} ({supervisorDelegate.SupervisorEmail}) ({centreName}) in the NHS England, Digital Learning Solutions (DLS) platform.
239-
240-
You are already registered as a delegate at the supervisor's DLS centre so they can now assign competency self assessments and view and validate your self assessment results.
241-
242-
If this looks like a mistake, please contact {supervisorDelegate.SupervisorName} ({supervisorDelegate.SupervisorEmail}) ({centreName}) directly to correct.";
243-
builder.HtmlBody = $@"<body style= 'font-family: Calibri; font-size: small;'><p>Dear {supervisorDelegate.FirstName}</p><p>{supervisorDelegate.SupervisorName} ({centreName}) has accepted your request to be your supervisor for profile asessment activities in the NHS England, Digital Learning Solutions platform.</p><p><a href='{GetCurrentActivitiesUrl()}'>Click here</a> to access your role profile assessments.</p></body>";
244-
string toEmail = (@adminId == 0 ? supervisorDelegate.DelegateEmail : supervisorDelegate.SupervisorEmail);
245-
emailService.SendEmail(new Email(emailSubjectLine, builder, toEmail));
246-
}
247-
248229
public void SendSupervisorResultReviewed(int adminId, int supervisorDelegateId, int candidateAssessmentId, int resultId, int centreId)
249230
{
250231
var supervisorDelegate = supervisorService.GetSupervisorDelegateDetailsById(supervisorDelegateId, adminId, 0);

DigitalLearningSolutions.Web/Services/NotificationService.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ int numLearningLogItemsAffected
159159
" Note: This message has been copied to the administrator(s) managing this activity, for their information.";
160160
}
161161

162-
const string emailSubjectLine = "Digital Learning Solutions Activity Complete";
162+
string courseName = progressCompletionData.CourseName.Length > 30
163+
? progressCompletionData.CourseName.Substring(0, 30)
164+
: progressCompletionData.CourseName;
165+
166+
string emailSubjectLine = $"Digital Learning Solutions Activity Complete - {courseName}";
163167
var delegateNameOrGenericTitle = progress.DelegateFirstName ?? "Digital Learning Solutions Delegate";
164168
var emailsToCc = GetEmailsToCc(
165169
progressCompletionData.AdminId,

DigitalLearningSolutions.Web/Services/SupervisorService.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public interface ISupervisorService
3737
SupervisorDelegateDetail GetSupervisorDelegateDetailsByIdWithoutRemoveClause(int supervisorDelegateId, int adminId, int delegateUserId);
3838

3939
//UPDATE DATA
40-
bool ConfirmSupervisorDelegateById(int supervisorDelegateId, int candidateId, int adminId);
4140
bool RemoveSupervisorDelegateById(int supervisorDelegateId, int delegateUserId, int adminId);
4241
bool UpdateSelfAssessmentResultSupervisorVerifications(int selfAssessmentResultSupervisorVerificationId, string? comments, bool signedOff, int adminId);
4342
bool UpdateSelfAssessmentResultSupervisorVerificationsEmailSent(int selfAssessmentResultSupervisorVerificationId);
@@ -70,11 +69,6 @@ public int AddSuperviseDelegate(int? supervisorAdminId, int? delegateUserId, str
7069
return supervisorDataService.AddSuperviseDelegate(supervisorAdminId, delegateUserId, delegateEmail, supervisorEmail, centreId);
7170
}
7271

73-
public bool ConfirmSupervisorDelegateById(int supervisorDelegateId, int candidateId, int adminId)
74-
{
75-
return supervisorDataService.ConfirmSupervisorDelegateById(supervisorDelegateId, candidateId, adminId);
76-
}
77-
7872
public int EnrolDelegateOnAssessment(int delegateUserId, int supervisorDelegateId, int selfAssessmentId, DateTime? completeByDate, int? selfAssessmentSupervisorRoleId, int adminId, int centreId, bool isLoggedInUser)
7973
{
8074
return supervisorDataService.EnrolDelegateOnAssessment(delegateUserId, supervisorDelegateId, selfAssessmentId, completeByDate, selfAssessmentSupervisorRoleId, adminId, centreId, isLoggedInUser);

DigitalLearningSolutions.Web/Views/LearningPortal/Available/ConfirmRetirement.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
{
2121
<vc:error-summary order-of-property-names="@(new[] { nameof(Model.ActionConfirmed) })" />
2222
}
23-
<h1 id="page-heading">Confirm Retirement</h1>
23+
<h1 id="page-heading">Confirm Enrolment</h1>
2424
<p class="nhsuk-body-m">You are about to enrol on a retiring <strong>@Model.Name</strong> self-assessment.</p>
25-
<p class="nhsuk-body-m"> Retirement date: <strong>@Model.RetirementDate?.ToString("dd MMMM yyyy")</strong> </p>
25+
<p class="nhsuk-body-m"> Retirement date: <strong>@Model.RetirementDate?.ToString("dd/MM/yyyy")</strong> </p>
2626
<p class="nhsuk-body-m">After this date, the <strong>@Model.Name</strong> self-assessment will no longer be accessible.</p>
2727

2828
<p class="nhsuk-body-m">Please consider:</p>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
<link rel="stylesheet" href="@Url.Content("~/css/learningPortal/selfAssessment.css")" asp-append-version="true">
2424
<h1>@Model.SelfAssessment.Name - Manage Supervisors</h1>
2525

26-
@if (Model.SelfAssessment.ManageSupervisorsDescription != null)
26+
@* Temporarily hidden - TD-5638 *@
27+
@* @if (Model.SelfAssessment.ManageSupervisorsDescription != null)
2728
{
2829
<div class="nhsuk-warning-callout">
2930
<h3 class="nhsuk-warning-callout__label">
@@ -36,7 +37,7 @@
3637
@Html.Raw(Model.SelfAssessment.ManageSupervisorsDescription)
3738
</p>
3839
</div>
39-
}
40+
} *@
4041

4142
@if (Model.Supervisors.Any())
4243
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
</p>
2424
</div>
2525
<div class="activity">
26-
<p><b>Responses confirmed by nominated supervisor</b></p> <p>
26+
<p><b>Number of confirmed responses</b></p> <p>
2727
@Model.ConfirmedResponses
2828
</p>
2929
</div>
3030
<div class="activity">
31-
<p><b>Nominated supervisors</b></p><ul>
31+
<p><b>Individual @Model.VocabPlural.ToLower() signed off by</b></p><ul>
3232
@foreach (var accessor in Model.Accessors)
3333
{
3434
<p>

DigitalLearningSolutions.Web/Views/Supervisor/Shared/_StaffMemberCard.cshtml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,4 @@
134134
View self assessments (@Model.SupervisorDelegateDetail.CandidateAssessmentCount)
135135
</a>
136136
}
137-
else if (Model.SupervisorDelegateDetail.AddedByDelegate)
138-
{
139-
<a class="nhsuk-button nhsuk-u-margin-left-4 nhsuk-u-margin-top-0"
140-
aria-describedby="@Model.SupervisorDelegateDetail.ID-name"
141-
asp-controller="Supervisor"
142-
asp-action="ConfirmSupervise"
143-
asp-route-supervisorDelegateId="@Model.SupervisorDelegateDetail.ID">
144-
Confirm
145-
</a>
146-
}
147137
</div>

0 commit comments

Comments
 (0)