You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAssessmentDataService.cs
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -229,13 +229,14 @@ FROM SelfAssessments
229
229
sa.SupervisorSelfAssessmentReview,
230
230
sa.SupervisorResultsReview";
231
231
232
-
varfromTableQuery=$@" FROM dbo.SelfAssessments AS sa
232
+
varfromTableQuery=$@" FROM dbo.SelfAssessments AS sa
233
+
INNER JOIN CourseCategories AS cc ON sa.CategoryID = cc.CourseCategoryID
233
234
INNER JOIN dbo.CandidateAssessments AS ca WITH (NOLOCK) ON sa.ID = ca.SelfAssessmentID
234
235
INNER JOIN dbo.CentreSelfAssessments AS csa WITH (NOLOCK) ON sa.ID = csa.SelfAssessmentID
235
236
INNER JOIN dbo.DelegateAccounts da WITH (NOLOCK) ON ca.CentreID = da.CentreID AND ca.DelegateUserID = da.UserID AND da.CentreID = csa.CentreID
236
237
INNER JOIN dbo.Users u WITH (NOLOCK) ON DA.UserID = u.ID
237
238
LEFT JOIN UserCentreDetails AS ucd WITH (NOLOCK) ON ucd.UserID = da.UserID AND ucd.centreID = da.CentreID
238
-
LEFT OUTER JOIN AdminAccounts AS aaEnrolledBy WITH (NOLOCK) ON aaEnrolledBy.ID = ca.EnrolledByAdminID
239
+
LEFT OUTER JOIN AdminAccounts AS aaEnrolledBy WITH (NOLOCK) ON aaEnrolledBy.ID = ca.EnrolledByAdminID AND aaEnrolledBy.CategoryID = cc.CourseCategoryID
239
240
LEFT OUTER JOIN Users AS uEnrolledBy WITH (NOLOCK) ON uEnrolledBy.ID = aaEnrolledBy.UserID
240
241
LEFT JOIN dbo.CandidateAssessmentSupervisors AS cas WITH (NOLOCK) ON ca.ID = cas.CandidateAssessmentID
241
242
LEFT JOIN dbo.CandidateAssessmentSupervisorVerifications AS casv WITH (NOLOCK) ON cas.ID = casv.CandidateAssessmentSupervisorID AND
0 commit comments