Skip to content

Commit b9c0a9f

Browse files
authored
Merge pull request #3332 from TechnologyEnhancedLearning/Develop/feature/TD-5611-Cannot-be-enrolled-retired-SA
TD-5611-Supervise - modified SQL query to hide retired self-assessment role profiles
2 parents b2322ba + 3820011 commit b9c0a9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ FROM CandidateAssessments AS CA
796796
WHERE (DelegateUserID = @delegateUserId) AND (RemovedDate IS NULL)
797797
AND (CompletedDate IS NULL)))
798798
AND ((rp.SupervisorSelfAssessmentReview = 1) OR (rp.SupervisorResultsReview = 1))
799-
AND (ISNULL(@categoryId, 0) = 0 OR rp.CategoryID = @categoryId)", new { delegateUserId, centreId, categoryId }
799+
AND (ISNULL(@categoryId, 0) = 0 OR rp.CategoryID = @categoryId) AND
800+
((CAST(rp.RetirementDate AS DATE) >= CAST(GETUTCDATE() AS DATE)) OR rp.RetirementDate IS NULL)", new { delegateUserId, centreId, categoryId }
800801
);
801802
}
802803

0 commit comments

Comments
 (0)