Skip to content

Commit 2d8336d

Browse files
committed
Squashed commit of the following:
commit 8fcc378 Merge: b31b0f1 7a1b148 Author: kevwhitt-hee <[email protected]> Date: Tue Dec 3 07:33:34 2024 +0000 Merge pull request #3011 from TechnologyEnhancedLearning/Automatic_version_update_dependabot Automatic version update dependabot to dev branch commit b31b0f1 Merge: a375ec9 fbeaa0a Author: kevwhitt-hee <[email protected]> Date: Tue Dec 3 07:22:11 2024 +0000 Merge pull request #2981 from TechnologyEnhancedLearning/Develop/Features/TD-4889-WhenasupervisorpromotesalearnertotheNominatedsupervisorrole,assignthemtothesamecategoryasthesupervisors TD-4889 Resolving internal server error when nominating delegate to supervisor commit a375ec9 Merge: 49d6df1 0a24e3a Author: kevwhitt-hee <[email protected]> Date: Tue Dec 3 07:20:27 2024 +0000 Merge pull request #2980 from TechnologyEnhancedLearning/Develop/Features/TD-4973-LimitthelistofsupervisorsintheRequestproficiencyconfirmationviewtosupervisorswithamatchingcategories TD-4973 Limit the list of supervisors in the Request proficiency confirmation view to supervisors with a matching category commit fbeaa0a Author: Sherif Olaboye <[email protected]> Date: Wed Nov 27 17:00:29 2024 +0000 TD-4889 Resolving internal server error when nominating delegate to supervisor commit 3c09df3 Author: Sherif Olaboye <[email protected]> Date: Wed Nov 27 16:35:24 2024 +0000 TD-4889 Resolving internal server error when nominating delegate to supervisor commit 0a24e3a Author: Sherif Olaboye <[email protected]> Date: Wed Nov 27 10:40:01 2024 +0000 TD-4973 Limit the list of supervisors in the Request proficiency confirmation view to supervisors with a matching category commit 49d6df1 Merge: d9c9b6b ec7910b Author: kevwhitt-hee <[email protected]> Date: Wed Nov 27 08:55:26 2024 +0000 Merge branch 'master' into DLS-Release-v1.1.0 commit d9c9b6b Author: kevwhitt-hee <[email protected]> Date: Wed Nov 27 08:21:19 2024 +0000 Removes migration causing an error in production data during deployment
1 parent c893b10 commit 2d8336d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

DigitalLearningSolutions.Data/DataServices/RegistrationDataService.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public int RegisterAdmin(
197197
isSupervisor = registrationModel.IsSupervisor,
198198
isNominatedSupervisor = registrationModel.IsNominatedSupervisor,
199199
};
200-
200+
201201
var adminUserId = connection.QuerySingle<int>(
202202
@"INSERT INTO AdminAccounts
203203
(
@@ -219,7 +219,10 @@ OUTPUT Inserted.ID
219219
(
220220
@userId,
221221
@centreId,
222-
@categoryId,
222+
CASE
223+
WHEN @categoryID = 0 THEN NULL
224+
ELSE @categoryID
225+
END,
223226
@isCentreAdmin,
224227
@isCentreManager,
225228
@active,

DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAssessmentSupervisorDataService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ int delegateUserId
9595
WHERE (sd.Removed IS NULL) AND (cas.Removed IS NULL) AND (sd.DelegateUserID = @delegateUserId)
9696
AND (ca.SelfAssessmentID = @selfAssessmentId) AND (sd.SupervisorAdminID IS NOT NULL)
9797
AND (coalesce(sasr.ResultsReview, 1) = 1)
98-
AND au.Active = 1
98+
AND au.Active = 1
99+
AND (au.CategoryID = 0 OR au.CategoryID IN (select CategoryID from SelfAssessments where ID = @selfAssessmentId))
99100
ORDER BY SupervisorName",
100101
new { selfAssessmentId, delegateUserId }
101102
);

DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ public IActionResult ConfirmNominateSupervisor(SupervisorDelegateViewModel super
13141314
supervisorDelegateDetail.DelegateUserID,
13151315
(int)User.GetCentreId()
13161316
);
1317-
supervisorDelegate.SelfAssessmentCategory = supervisorDelegate.SelfAssessmentCategory == 0 ? adminUser.CategoryId.Value : supervisorDelegate.SelfAssessmentCategory;
1317+
supervisorDelegate.SelfAssessmentCategory = supervisorDelegate.SelfAssessmentCategory == 0 ? (adminUser.CategoryId.HasValue ? adminUser.CategoryId.Value : 0) : supervisorDelegate.SelfAssessmentCategory;
13181318
var centreName = adminUser.CentreName;
13191319

13201320
var adminRoles = new AdminRoles(false, false, true, false, false, false, false, false);

0 commit comments

Comments
 (0)