Skip to content

Commit 4a49e00

Browse files
authored
Merge pull request #2911 from TechnologyEnhancedLearning/Develop/feature/TD-4972-Limit-existing-supervisors-in-Manage-Supervisors
TD-4972-Limit the list of existing supervisors in the Manage Supervisors list to supervisors with a matching category
2 parents 7744ebf + c2c50d3 commit 4a49e00

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAssessmentSupervisorDataService.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ int delegateUserId
7676
{
7777
return connection.Query<SelfAssessmentSupervisor>(
7878
@$"{SelectSelfAssessmentSupervisorQuery}
79-
WHERE (sd.Removed IS NULL) AND (cas.Removed IS NULL) AND (ca.DelegateUserID = @delegateUserId) AND (ca.SelfAssessmentID = @selfAssessmentId)
79+
WHERE (sd.Removed IS NULL) AND (cas.Removed IS NULL) AND (ca.DelegateUserID = @delegateUserId)
80+
AND (ca.SelfAssessmentID = @selfAssessmentId)
81+
AND (au.CategoryID = 0 OR au.CategoryID IN (select CategoryID from SelfAssessments where ID = @selfAssessmentId))
8082
ORDER BY SupervisorName",
8183
new { selfAssessmentId, delegateUserId }
8284
);

0 commit comments

Comments
 (0)