Skip to content

Commit 3e6bbbd

Browse files
committed
TD-4751-Resolving the code comments obtained on the existing PR
1 parent e4eba69 commit 3e6bbbd

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

DigitalLearningSolutions.Data/DataServices/CourseDataService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ IEnumerable<CourseDelegateForExport> GetCourseDelegatesForExport(string searchSt
122122
int customisationId, int centreId, bool? isDelegateActive, bool? isProgressLocked, bool? removed, bool? hasCompleted, string? answer1, string? answer2, string? answer3);
123123

124124
int EnrolOnActivitySelfAssessment(int selfAssessmentId, int candidateId, int supervisorId, string adminEmail,
125-
int selfAssessmentSupervisorRoleId, DateTime? completeByDate, int delegateUserId, int centreId, int? enrolledByAdminId, int? adminUserId);
125+
int selfAssessmentSupervisorRoleId, DateTime? completeByDate, int delegateUserId, int centreId, int? enrolledByAdminId);
126126

127127
bool IsCourseCompleted(int candidateId, int customisationId);
128128
bool IsCourseCompleted(int candidateId, int customisationId, int progressID);
@@ -442,7 +442,7 @@ public void RemoveCurrentCourse(int progressId, int candidateId, RemovalMethod r
442442
}
443443

444444
public int EnrolOnActivitySelfAssessment(int selfAssessmentId, int candidateId, int supervisorId, string adminEmail,
445-
int selfAssessmentSupervisorRoleId, DateTime? completeByDate, int delegateUserId, int centreId, int? enrolledByAdminId, int? adminUserId)
445+
int selfAssessmentSupervisorRoleId, DateTime? completeByDate, int delegateUserId, int centreId, int? enrolledByAdminId)
446446
{
447447
IClockUtility clockUtility = new ClockUtility();
448448
DateTime startedDate = clockUtility.UtcNow;
@@ -563,7 +563,7 @@ BEGIN TRANSACTION
563563
if (supervisorId > 0)
564564
{
565565

566-
adminUserId = Convert.ToInt32(connection.ExecuteScalar(@"SELECT UserID FROM AdminAccounts WHERE (AdminAccounts.ID = @supervisorId)",
566+
var adminUserId = Convert.ToInt32(connection.ExecuteScalar(@"SELECT UserID FROM AdminAccounts WHERE (AdminAccounts.ID = @supervisorId)",
567567
new { supervisorId })
568568
);
569569

DigitalLearningSolutions.Web/Controllers/TrackingSystem/Delegates/EnrolController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public IActionResult EnrolDelegateSummary()
326326
sessionEnrol.CompleteByDate,
327327
(int)sessionEnrol.DelegateUserID,
328328
centreId,
329-
GetAdminID(),0
329+
GetAdminID()
330330
);
331331

332332
}

DigitalLearningSolutions.Web/Services/EnrolService.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ int EnrolOnActivitySelfAssessment(
4343
DateTime? completeByDate,
4444
int delegateUserId,
4545
int centreId,
46-
int? enrolledByAdminId,
47-
int? adminUserId
46+
int? enrolledByAdminId
4847
);
4948
}
5049
public class EnrolService : IEnrolService
@@ -185,9 +184,9 @@ by the system because a previous course completion has expired.</p>
185184
return new Email(EnrolEmailSubject, body, emailAddress);
186185
}
187186

188-
public int EnrolOnActivitySelfAssessment(int selfAssessmentId, int candidateId, int supervisorId, string adminEmail, int selfAssessmentSupervisorRoleId, DateTime? completeByDate, int delegateUserId, int centreId, int? enrolledByAdminId, int? adminUserId)
187+
public int EnrolOnActivitySelfAssessment(int selfAssessmentId, int candidateId, int supervisorId, string adminEmail, int selfAssessmentSupervisorRoleId, DateTime? completeByDate, int delegateUserId, int centreId, int? enrolledByAdminId)
189188
{
190-
return courseDataService.EnrolOnActivitySelfAssessment(selfAssessmentId, candidateId, supervisorId, adminEmail, selfAssessmentSupervisorRoleId, completeByDate, delegateUserId, centreId, enrolledByAdminId, adminUserId);
189+
return courseDataService.EnrolOnActivitySelfAssessment(selfAssessmentId, candidateId, supervisorId, adminEmail, selfAssessmentSupervisorRoleId, completeByDate, delegateUserId, centreId, enrolledByAdminId);
191190
}
192191
}
193192
}

0 commit comments

Comments
 (0)