diff --git a/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/CandidateAssessmentsDataService.cs b/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/CandidateAssessmentsDataService.cs index aae3988660..4f3677edca 100644 --- a/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/CandidateAssessmentsDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/CandidateAssessmentsDataService.cs @@ -423,7 +423,7 @@ public void SetSubmittedDateNow(int selfAssessmentId, int delegateUserId) public void RemoveEnrolment(int selfAssessmentId, int delegateUserId) { connection.Execute( - @"UPDATE CandidateAssessments SET RemovedDate = GETDATE() + @"UPDATE CandidateAssessments SET RemovedDate = GETDATE(), SelfAssessmentProcessAgreed = NULL WHERE SelfAssessmentID = @selfAssessmentId AND DelegateUserID = @delegateUserId", new { selfAssessmentId, delegateUserId } ); diff --git a/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAssessmentDataService.cs b/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAssessmentDataService.cs index ad32f35ba2..bc47f8eb21 100644 --- a/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAssessmentDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAssessmentDataService.cs @@ -745,7 +745,8 @@ public void RemoveDelegateSelfAssessment(int candidateAssessmentsId) connection.Execute( @"BEGIN TRY BEGIN TRANSACTION - UPDATE CandidateAssessments SET RemovedDate = GETUTCDATE(), RemovalMethodID = 2 + UPDATE CandidateAssessments SET RemovedDate = GETUTCDATE(), RemovalMethodID = 2, + SelfAssessmentProcessAgreed = NULL WHERE ID = @candidateAssessmentsId AND RemovedDate IS NULL COMMIT TRANSACTION diff --git a/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs b/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs index dd435aa1e8..0abb090205 100644 --- a/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs @@ -1000,7 +1000,8 @@ public bool RemoveCandidateAssessment(int candidateAssessmentId) @" BEGIN TRY BEGIN TRANSACTION - UPDATE CandidateAssessments SET RemovedDate = getUTCDate(), RemovalMethodID = 2 + UPDATE CandidateAssessments SET RemovedDate = getUTCDate(), RemovalMethodID = 2, + SelfAssessmentProcessAgreed = NULL WHERE ID = @candidateAssessmentId AND RemovedDate IS NULL COMMIT TRANSACTION