From 2bdfac0053f6494d76be489d8b5f8dd5219bb2e4 Mon Sep 17 00:00:00 2001 From: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:57:13 +0000 Subject: [PATCH 001/271] Update build-and-deploy-dev.yml to upgrade framework --- .github/workflows/build-and-deploy-dev.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-deploy-dev.yml b/.github/workflows/build-and-deploy-dev.yml index cfc4aadf96..d2667e61b6 100644 --- a/.github/workflows/build-and-deploy-dev.yml +++ b/.github/workflows/build-and-deploy-dev.yml @@ -22,10 +22,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup .NET Core SDK 6.0 + - name: Setup .NET Core SDK 8.0 uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Setup node uses: actions/setup-node@v4 with: @@ -138,4 +138,4 @@ jobs: { Remove-Item -LiteralPath 'E:/web/${{env.SitePath}}-PREVIOUS' -Force -Recurse } - Remove-Item 'E:/web/${{env.SitePath}}/app_offline.htm' -Force \ No newline at end of file + Remove-Item 'E:/web/${{env.SitePath}}/app_offline.htm' -Force From 66d3ff25ef2ec34ad03962723a7cb4c6597a5ed7 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 25 Nov 2024 10:55:01 +0000 Subject: [PATCH 002/271] Squashed commit of the following: commit 4eb3383e083ee184f46f3f2999d8e4739c9c90cf Merge: e97a907c5 f0b75fffa Author: kevwhitt-hee Date: Fri Nov 22 16:25:55 2024 +0000 Merge pull request #2970 from TechnologyEnhancedLearning/Develop/Fixes/TD-5058-FixAddSimilarCompetency TD-5058 Fix add similar competency 500 error commit f0b75fffa921bbaf989c600ffd31b0cfc5124248 Author: kevwhitt-hee Date: Fri Nov 22 16:23:37 2024 +0000 TD-5058 Fixes setting of flag IDs property when no flags are selected commit e97a907c5d6d5eed2e22f27bbabaac4219db9dac Merge: 5fbbb4ecb b86b63aec Author: kevwhitt-hee Date: Thu Nov 21 15:53:44 2024 +0000 Merge pull request #2965 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-FixSubmitResultFoDupeCompetency TD-4950 Removes link to result self assessment ID from supervisor from supervisor query commit b86b63aecc17437dab27d0b1ed1664cdddd049d3 Author: kevwhitt-hee Date: Thu Nov 21 15:50:26 2024 +0000 TD-4950 Removes link to result self assessment ID from supervisor from confirming supervisor query commit 5fbbb4ecb10eed2a95e8a1fd32f71af77e2d02fa Merge: 47e887f63 26874ef11 Author: kevwhitt-hee Date: Thu Nov 21 15:22:26 2024 +0000 Merge pull request #2963 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-FixSubmitResultFoDupeCompetency TD-4950 Removes link to result self assessment ID from supervisor commit 26874ef1130086054f22a95c1c934ce40f546be1 Author: kevwhitt-hee Date: Thu Nov 21 15:19:47 2024 +0000 TD-4950 Removes link to result self assessment ID from supervisor from missed query commit 47e887f63514e245b088aa01e8a44604545e9148 Merge: 3c5a36776 4c381f10c Author: kevwhitt-hee Date: Thu Nov 21 10:58:25 2024 +0000 Merge pull request #2960 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-FixSubmitResultFoDupeCompetency TD-4950 Fix supersisor results summary query commit 4c381f10c2db5d44a3b1a2e5d2d8b1d13d1a8e1b Author: kevwhitt-hee Date: Thu Nov 21 10:48:18 2024 +0000 TD-4950 Removes link to result self assessment ID from supervisor summary data query commit 3c5a367763b973c5be8b14dd4500c26e5b6d9827 Merge: bdd85f1b9 833431125 Author: kevwhitt-hee Date: Wed Nov 20 10:34:43 2024 +0000 Merge pull request #2957 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-FixSubmitResultFoDupeCompetency TD-4950 Removes unnecessary join in export assessment summary query and renames field commit 8334311251ea1dd29946498ce9d9980af79addb7 Author: kevwhitt-hee Date: Wed Nov 20 10:26:05 2024 +0000 TD-4950 Removes unnecessary join in export assessment summary data queries commit bdd85f1b95d827c3490f465d36e90629c5a4e0a6 Merge: bfa9282ee 9496e79e6 Author: kevwhitt-hee Date: Tue Nov 19 11:19:15 2024 +0000 Merge pull request #2952 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-FixSubmitResultFoDupeCompetency TD-4950 Fix issue with verify m,ultiple competencies button being unavailable commit 9496e79e61df3831c3d3da5419cd6d0383d513c2 Author: kevwhitt-hee Date: Tue Nov 19 09:00:37 2024 +0000 TD-4950 Corrects visibility of verify multiple results button commit bfa9282eefd512912b873ecf9fd930a5681fba0f Merge: 217631462 5fc818fdd Author: kevwhitt-hee Date: Fri Nov 15 08:59:49 2024 +0000 Merge pull request #2949 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-FixSubmitResultFoDupeCompetency TD-4950 Removes using DB name from scripts commit 5fc818fddf1016ff9d073691d95435cb463f776d Author: kevwhitt-hee Date: Fri Nov 15 08:58:33 2024 +0000 Removes using DB name from scripts commit 217631462e1b40dbaec473ae52ea11ef81105f98 Merge: a0af08d7c bc6d1329e Author: kevwhitt-hee Date: Thu Nov 14 17:18:33 2024 +0000 Merge pull request #2947 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-FixSubmitResultFoDupeCompetency TD-4950 Fixes get result by ID stored proc to avoid joining on result self assessment ID commit bc6d1329e7f346097f1c92ea0c93cbb4e5694646 Author: kevwhitt-hee Date: Thu Nov 14 17:14:47 2024 +0000 TD-4950 Fixes join in get results SP to avoid using result self assessment ID commit a0af08d7cdb8b1c6a3f4f47ebaabb48577f2f216 Merge: 8c5d66e11 5cf736ae7 Author: kevwhitt-hee Date: Thu Nov 14 11:07:07 2024 +0000 Merge pull request #2943 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-FixSubmitResultFoDupeCompetency TD-4950 Fixes to excel export and clear selection in self assessments commit 5cf736ae774616af5f9640a3f78080fb665e3ac5 Author: kevwhitt-hee Date: Thu Nov 14 09:04:24 2024 +0000 TD-4950 Fixes excel export query and reinstates clear selection JS commit 8c5d66e114bab50fdebb47c3127ac3002d58bfca Merge: caa35100d 568ed0910 Author: kevwhitt-hee Date: Wed Nov 13 07:58:58 2024 +0000 Merge pull request #2938 from TechnologyEnhancedLearning/DLS-Release-v0.0.1 Dls release v0.0.1 commit caa35100d911fa86a289b607eab67b25fdf7409a Merge: 4de14a882 09ac5a7fe Author: kevwhitt-hee Date: Tue Nov 12 14:49:01 2024 +0000 Merge pull request #2935 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-FixSubmitResultFoDupeCompetency TD-4950 Limits result sets by self assessment structure rather than self assessment ID in results table commit 09ac5a7fe132c4f53b25d19f75d48105df09356f Author: kevwhitt-hee Date: Tue Nov 12 14:37:57 2024 +0000 Removes join on result self assessment ID from GetSupervisorComments method query commit 6b93697ae26716c30bd6d8cf6e02feb79061c9ef Author: kevwhitt-hee Date: Tue Nov 12 09:26:15 2024 +0000 Removes query joins on result self assessment ID from candidate assessment data service commit c910b996d7bdf778bdade9b740908210d52e97a3 Author: kevwhitt-hee Date: Tue Nov 12 09:21:08 2024 +0000 Removes join on result self assessment ID from candidate assessment data service commit 5df757daac2733b84412aeeed627d652f2c97d82 Author: kevwhitt-hee Date: Tue Nov 12 09:11:08 2024 +0000 Makes similar changes to the report queries and adds missing function migration commit ea9a4bfef074578f2bd1b115bcf69b6f3c68ebaf Author: kevwhitt-hee Date: Mon Nov 11 15:58:03 2024 +0000 TD-4950 Uses a join to self assessment structure to limit result sets Avoids filtering result sets by the SelfAssessmentResults.SelfAssessmentID commit 4de14a8823b1d32948e39885748ca2a50469998c Merge: f2e0e884f 2f57f4381 Author: kevwhitt-hee Date: Mon Nov 11 13:58:58 2024 +0000 Merge pull request #2932 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-FixSubmitResultFoDupeCompetency TD-4950 Updates self assessment ID when updating results commit 2f57f4381308bbe9b4c380d38658e71c1ffed79b Author: kevwhitt-hee Date: Mon Nov 11 13:55:17 2024 +0000 Update CompetencyDataService.cs commit 00dd1f30892bb5b9330c4bd67b01949e7a8faf0e Author: kevwhitt-hee Date: Mon Nov 11 13:48:48 2024 +0000 Updates SelfAssessmentID when updating a self assessment result commit f2e0e884f7790cb7006a218639f1e39e57caea29 Merge: 6b72e4aef 7a480d352 Author: kevwhitt-hee Date: Mon Nov 11 13:35:45 2024 +0000 Merge pull request #2930 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-FixSubmitResultFoDupeCompetency TD-4950 Fix submit result fo duplicated competency commit 7a480d35242d6a4b664858666c490b8fcd303454 Author: kevwhitt-hee Date: Mon Nov 11 12:03:30 2024 +0000 TD-4950 Removes self assessment ID clause from existing result check commit 6b72e4aef5959845ac7f059313c1124b33b79e3c Merge: 4e46fa637 94c92fc11 Author: kevwhitt-hee Date: Mon Nov 11 08:21:56 2024 +0000 Merge pull request #2927 from TechnologyEnhancedLearning/Develop/Fixes/TD-4950-ChangedStoredProcToIncludeResultsOfProficienciesFromAnyAssessment TD-4950 Changed Stored Proc To Include Results Of Proficiencies From Any Assessment commit 568ed091002407cc8b4a6d742ea333116f70ecf3 Merge: 920fe6b83 f43f51fbc Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Fri Nov 8 16:50:19 2024 +0000 Merge pull request #2925 from TechnologyEnhancedLearning/TD-4773-GitHubActionsTargetToDotNet8 TD-4773 GitHub Actions Target To Dot Net 8 commit 4e46fa6373ce6ca90cf496c9d92aada9ba16611e Merge: a5a0c3a9d 90dd9e187 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Fri Nov 8 16:49:26 2024 +0000 Merge pull request #2871 from TechnologyEnhancedLearning/Develop/Fixes/TD-3656-Supervise-Addmyselftotryselfassessmentstaffdoesntexistwhentheeducatorisremovedfromthelearningportalself-assessment TD-3656 Supervise - "Add myself to try self assessment" staff doesn't exist when the educator is removed from the learning portal self-assessment commit 94c92fc111f34e53f52f5af8b36480dc0c7e4947 Author: Rohit Shrivastava Date: Fri Nov 8 15:05:36 2024 +0000 TD-4950 Changed Stored Proc To Include Results Of Proficiencies From Any Assessment commit f43f51fbc8a10233bb0484a68f5d79d6662156a9 Author: Rohit Shrivastava Date: Thu Nov 7 17:40:05 2024 +0000 TD-4773 GitHub Actions Target To Dot Net 8 commit a5a0c3a9dd9465d99b9062a26c11dc755945dc8d Merge: 84ed4ae13 5d3e3b448 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Thu Nov 7 14:43:42 2024 +0000 Merge pull request #2921 from TechnologyEnhancedLearning/Develop/Features/TD-4792-Warncentreadminsthatactiveadminaccountexistswheninactivatingdelegateaccount TD-4792 Write unit tests for filter added on optional competencies in the supervisor view commit 5d3e3b44848957535d9f9aa69a0403cb6de5f253 Author: Sherif Olaboye Date: Wed Nov 6 16:39:46 2024 +0000 TD-4792 Write unit tests for filter added on optional competencies in the supervisor view commit 67a9b11a89b9703bd1fb51fcfb307471596fa0cf Author: Sherif Olaboye Date: Wed Nov 6 16:21:59 2024 +0000 TD-4792 Write unit tests for filter added on optional competencies in the supervisor view commit 12676b978e9d1ae8babb6b1f8c977c4f08cedbc6 Author: Sherif Olaboye Date: Wed Nov 6 16:08:49 2024 +0000 TD-4792 Write unit tests for filter added on optional competencies in the supervisor view commit 84ed4ae1372754e9482f16083d5765efb9b04f1a Merge: d3d98e729 b277e24db Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Wed Nov 6 08:53:37 2024 +0000 Merge pull request #2918 from TechnologyEnhancedLearning/Develop/Fix/TD-4495-Issue-with-adding-the-filters TD-4495-Issue with adding the filters on 'Centre administrators' screen for 'Bedfordshire Hospitals NHS Trust' centre commit d3d98e729b283564a1d213016fb23ded44869217 Merge: 25f0913d7 23c3b6e95 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Wed Nov 6 08:43:22 2024 +0000 Merge pull request #2888 from TechnologyEnhancedLearning/Develop/Features/TD-4790-Writeunittestsfortagsaddedonoptionalcompetenciesinthesupervisorview TD-4790 Write unit tests for tags added on optional competencies in the supervisor view commit 25f0913d7cf0c1b73203b8a08d3465dbb7dec31c Merge: 4b268cb84 f8ca071a8 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Wed Nov 6 08:42:25 2024 +0000 Merge pull request #2885 from TechnologyEnhancedLearning/Develop/Features/TD-4632-Asacentremanageratanewcentre,Ishouldbeabletoregisterusingapredeterminedemailaddresswithoutadditionalapprovalsteps TD-4632 As a centre manager at a new centre, I should be able to register using a predetermined email address without additional approval steps commit b277e24dba0344900cb6eb4cb17c9217008ac87b Author: Auldrin Possa Date: Tue Nov 5 12:21:52 2024 +0000 TD-4495-filter value text trimmed commit f8ca071a83f3ac18aba69ae6e40e18bd5ee656c7 Author: Sherif Olaboye Date: Tue Nov 5 09:26:50 2024 +0000 TD-4632 Resolved git action warning commit 78b6e4a494a83c6465cb4cd76e766c2c077c7bb1 Merge: 69c5f3ae6 4b268cb84 Author: Sherif Olaboye Date: Tue Nov 5 09:14:38 2024 +0000 Merge remote-tracking branch 'origin/release-v1.0.0' into Develop/Features/TD-4632-Asacentremanageratanewcentre,Ishouldbeabletoregisterusingapredeterminedemailaddresswithoutadditionalapprovalsteps commit 920fe6b8361f51a8f56b464e22168d22b5d5f9b4 Merge: f11e88325 025fed6da Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Mon Nov 4 16:38:29 2024 +0000 Merge pull request #2915 from TechnologyEnhancedLearning/Develop/Fixes/TD-4771-UpgradingFramework TD-4771 Upgrading framework commit 69c5f3ae687a921fb6170fb825c3b1d8ed63d2f7 Author: Sherif Olaboye Date: Fri Nov 1 10:13:12 2024 +0000 TD-4632 Using of AppRootPath to replace the url of the email invite commit 4e48778fb5af12d43b591912d294a8baea12a2fd Merge: d0ed56b5e 3098eaa32 Author: Sherif Olaboye Date: Fri Nov 1 10:01:39 2024 +0000 Merge remote-tracking branch 'origin/release-v1.0.0' into Develop/Features/TD-4632-Asacentremanageratanewcentre,Ishouldbeabletoregisterusingapredeterminedemailaddresswithoutadditionalapprovalsteps commit 025fed6dae3af22cabf56d6b0ea8ccf9746c119a Author: Rohit Shrivastava Date: Fri Nov 1 09:28:32 2024 +0000 TD-4771 Upgrading framework commit 23c3b6e957c587e44115af6f2e155d47d2de5840 Author: Sherif Olaboye Date: Thu Oct 31 17:22:13 2024 +0000 TD-4790 Write unit tests for tags added on optional competencies in the supervisor view commit 4b268cb8471b93da93fa3968537608058a563996 Merge: 3098eaa32 0b9353579 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Thu Oct 31 16:34:37 2024 +0000 Merge pull request #2908 from TechnologyEnhancedLearning/Develop/Fix/TD-4946-email-address-displayed-twice TD-4946-Name property initialized from UserAccount entity commit 24a7b7bda426f48a11b1247970fa1a530fab347d Author: Sherif Olaboye Date: Thu Oct 31 16:32:03 2024 +0000 TD-4790 Write unit tests for tags added on optional competencies in the supervisor view commit 691fbe8e07fdfffb8bad2c565b8832ebaa6c0d28 Merge: 419faa7bc 3098eaa32 Author: Sherif Olaboye Date: Thu Oct 31 15:20:56 2024 +0000 Merge remote-tracking branch 'origin/release-v1.0.0' into Develop/Features/TD-4790-Writeunittestsfortagsaddedonoptionalcompetenciesinthesupervisorview commit 0b93535797636781ae32eddd48460ea36b1f5bed Author: Auldrin Possa Date: Tue Oct 29 15:49:45 2024 +0000 TD-4946-Name property initialized from UserAccount entity commit 3098eaa32e41933cfb8dcd59e43bd6a9ddb4937b Merge: edfca62dc 3e6bbbdab Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Mon Oct 28 17:07:03 2024 +0000 Merge pull request #2893 from TechnologyEnhancedLearning/Develop/Features/TD-4751-FlagSelfAssessmentNonReportable Mark the Non Reportable flag as true when the user Id of the delegate matches the user Id of the admin record of the supervisor being selected. commit edfca62dcf788c8dc9308e37abcb298bfeb5d48b Merge: dea1766d4 f88475b4d Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Mon Oct 28 16:29:41 2024 +0000 Merge pull request #2889 from TechnologyEnhancedLearning/Develop/feature/TD-4791-unit-tests-filter-added-on-optional-competencies-learner-view TD-4791-Unit tests added for filter on optional competencies in the learner view. commit 3e6bbbdabebb7de2981741e5282561407a3d3201 Author: Abhimanu Sinha Date: Mon Oct 28 12:41:08 2024 +0000 TD-4751-Resolving the code comments obtained on the existing PR commit dea1766d48906a5554aef5417ff7b1fc45dccf54 Merge: 7629b852f fa0fe0d9c Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Mon Oct 28 10:26:55 2024 +0000 Merge pull request #2891 from TechnologyEnhancedLearning/Develop/fixes/TD-4920-Fix-optional-competency-frontend TD-4920 Fix optional competency frontend commit 7629b852f0a06f2626e12177a51544ab29bab03f Merge: 841fb5fe0 000d7df27 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Fri Oct 25 11:07:07 2024 +0100 Merge pull request #2900 from TechnologyEnhancedLearning/testRohitXFrameRevert Reverting the X-Frame-Options change commit 000d7df27efd2f256c78f7807db0dab04b9b8ea6 Author: Rohit Shrivastava Date: Fri Oct 25 10:48:30 2024 +0100 reverting the change. commit 841fb5fe015b76ed7bbd509fcdd1ea7f91e3385e Merge: de21044c9 d10394047 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Fri Oct 25 10:32:35 2024 +0100 Merge pull request #2899 from TechnologyEnhancedLearning/testRohitXFrame Xframe settings test commit d10394047742d5230b58dc2b25374a319a8581a8 Author: Rohit Shrivastava Date: Fri Oct 25 10:19:45 2024 +0100 Xframe settings test commit e4eba698c22b19f8974e195cdbedfa91b8fddc92 Author: ABSINHAA Date: Tue Oct 22 11:34:43 2024 +0100 TD-4751 Mark the Non Reportable flag as true when the user Id of the delegate matches the user Id of the admin record of the supervisor being selected. commit fa0fe0d9ce327cd45c53b65841a0ea1ba4ce6784 Author: kevwhitt-hee Date: Mon Oct 21 16:06:24 2024 +0100 Fixes accessibility issues with use of multiple fieldsets for single question commit e952060d7fd18e73cfc3ecaa6eb746ec1708f28a Author: kevwhitt-hee Date: Mon Oct 21 15:15:17 2024 +0100 Fixes optional competencies page markup and styling commit 39c6442084a818e414f39739e23efe2378bd1ab3 Author: kevwhitt-hee Date: Fri Oct 18 16:09:35 2024 +0100 TD-4920 Removes the select all/deselect all checkboxes commit f88475b4daf25849a3afede039bd3d6837002fdb Author: Auldrin Possa Date: Thu Oct 17 17:16:03 2024 +0100 TD-4791-Unit tests added commit de21044c93fe0bee0ac256912aaaf6dd178934f5 Merge: c95e20d76 c4cf94d84 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Thu Oct 17 11:12:16 2024 +0100 Merge pull request #2887 from TechnologyEnhancedLearning/Develop/feature/TD-4789-unit-tests-tags-added-on-optional-competencies-learner-view TD-4789-Unit tests added for ManageOptionalCompetencies with flags and SelfAssessmentOverview with optional competencies commit c95e20d762bcebfa3c9802cdb8535373fcbfc96b Merge: 297c56ed6 2fca1551f Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Thu Oct 17 11:10:16 2024 +0100 Merge pull request #2883 from TechnologyEnhancedLearning/Develop/feature/TD-4793-unit-tests-to-deactivate-adminaccount-ifexists TD-4793-Unit tests added for deactivate delegate controller commit 297c56ed62e18df043289bfc9cab2adbaf9b78f0 Merge: 7e308b06c 2134fd996 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Thu Oct 17 11:09:20 2024 +0100 Merge pull request #2878 from TechnologyEnhancedLearning/Develop/Fix/TD-4785-Duplicates-in-Supervisor-dashboard TD-4785-Set the Removed date as the current date for old duplicate rows in the table commit 7e308b06ce589ed9436dfcef391c197d01f0c6a4 Merge: 1c6b8bd9f 1987b1e29 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Thu Oct 17 11:07:26 2024 +0100 Merge pull request #2874 from TechnologyEnhancedLearning/Develop/Fix/TD-4787-NominatedSupervisors-change-role-Assessor TD-4787-Changed role from Educator/Manager to Assessor for nominated supervisors. commit 1c6b8bd9ff50f2d6ca282c4cfe6739a6c3a78392 Merge: 7eef36083 c611e00e5 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Thu Oct 17 10:13:09 2024 +0100 Merge pull request #2862 from TechnologyEnhancedLearning/Develop/Fixes/TD-4471-Issueswith'Search'functionalitywhenJSturnedoffon'Trackingsystem-Centreadministrators'screen TD-4471 Issues with 'Search' functionality when JS turned off on 'Tracking system - Centre administrators' screen commit 419faa7bca44cfeec648e87324aa445439ca0f96 Author: Sherif Olaboye Date: Thu Oct 17 09:23:01 2024 +0100 TD-4790 Write unit tests for tags added on optional competencies in the supervisor view commit c4cf94d848b7b7e03c2645de8d7bc056a7ec18e0 Author: Auldrin Possa Date: Tue Oct 15 14:31:34 2024 +0100 TD-4789-Unit tests added for ManageOptionalCompetencies with flags and SelfAssessmentOverview with optional competencies commit 7eef36083bbed8efd8ba693ade07e40a23ee3f7f Merge: a8682c5cd f11e88325 Author: rshrirohit Date: Tue Oct 15 08:44:37 2024 +0100 Merge branch 'master' into release-v1.0.0 commit d0ed56b5ed5e060b47204d98a0235abfe2573674 Author: Sherif Olaboye Date: Mon Oct 14 11:34:36 2024 +0100 TD-4632 As a centre manager at a new centre, I should be able to register using a predetermined email address without additional approval steps commit 7d7754683d883ecb7f025ca93a949f716750f00e Author: Sherif Olaboye Date: Mon Oct 14 11:26:47 2024 +0100 TD-4632 As a centre manager at a new centre, I should be able to register using a predetermined email address without additional approval steps commit 2fca1551fda4da1d237d334d816a75cf9cc8b3fe Author: Auldrin Possa Date: Fri Oct 11 20:57:24 2024 +0100 test cases updated commit c0546aa53cbb88f7eb64ffcedac1d3c8e5ebaf90 Author: Auldrin Possa Date: Fri Oct 11 15:46:44 2024 +0100 TD-4793-unit tests added for deactivate delegate controller commit 1987b1e2953bb7479b0cd11ef5e40994d3833be8 Author: Auldrin Possa Date: Thu Oct 10 10:28:01 2024 +0100 ForwardOnlyMigration added commit ed4d1d7446176fa8d139702f7096205c16f91842 Merge: 7da62dd3b a8682c5cd Author: Auldrin Possa Date: Thu Oct 10 10:07:58 2024 +0100 Merge branch 'release-v1.0.0' into Develop/Fix/TD-4787-NominatedSupervisors-change-role-Assessor commit 2134fd996770c3cb1ece20613d49293dcc36dbd8 Author: Auldrin Possa Date: Wed Oct 9 16:04:34 2024 +0100 TD-4785-Set the Removed date as the current date for old duplicate rows in the table commit a8682c5cdd6d9f77b04667f403afd261a4d3f32c Merge: 08625bfc7 9ed7ca9fa Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Wed Oct 9 09:17:59 2024 +0100 Merge pull request #2865 from TechnologyEnhancedLearning/Develop/Fix/TD-4785-Duplicates-in-Supervisor-dashboard TD-4785- Removed date updated to CandidateAssessmentSupervisors table. commit 08625bfc75c36eb80baec0ed4f736a9f22c67193 Merge: d78d8dd60 ae399db28 Author: rshrirohit <126668828+rshrirohit@users.noreply.github.com> Date: Wed Oct 9 09:16:48 2024 +0100 Merge pull request #2864 from TechnologyEnhancedLearning/Develop/Fixes/TD-4755-MyAccount-ActivevalueislistedasoneoftheAdminroles TD-4755 My Account - Active value is listed as one of the Admin roles commit 7da62dd3bf855aa74123be43e7cfd6f13a5853c6 Author: Auldrin Possa Date: Mon Oct 7 14:22:56 2024 +0100 TD-4787-Changed role from Educator/Manager to Assessor for nominated supervisors commit 90dd9e18755ddd343059508c9dc912bbfbfea531 Author: Sherif Olaboye Date: Fri Oct 4 09:24:55 2024 +0100 TD-3656 Supervise - "Add myself to try self assessment" staff doesn't exist when the educator is removed from the learning portal self-assessment commit 9ed7ca9fa7d11ea3b305129761292137d708189d Author: Auldrin Possa Date: Tue Oct 1 16:35:22 2024 +0100 TD-4785- Removed date updated to CandidateAssessmentSupervisors table. commit ae399db28a0dbc1e8c940caa6c50fa2037a84068 Author: Sherif Olaboye Date: Tue Oct 1 16:06:48 2024 +0100 TD-4755 My Account - Active value is listed as one of the Admin roles commit c611e00e5edba0ccdcac00342d3c8d0632445dca Author: Sherif Olaboye Date: Tue Oct 1 11:48:55 2024 +0100 TD-4471 Issues with 'Search' functionality when JS turned off on 'Tracking system - Centre administrators' screen --- .../Properties/Resources.Designer.cs | 5014 ++++++++--------- .../Properties/Resources.resx | 18 +- .../DataServices/CourseDataService.cs | 2 + .../DataServices/SupervisorDataService.cs | 58 +- .../SupervisorControllerTests.cs | 10 +- .../SupervisorController/Supervisor.cs | 4 +- .../Services/SupervisorService.cs | 3 +- 7 files changed, 2560 insertions(+), 2549 deletions(-) diff --git a/DigitalLearningSolutions.Data.Migrations/Properties/Resources.Designer.cs b/DigitalLearningSolutions.Data.Migrations/Properties/Resources.Designer.cs index 5b5d5f74dd..330a60292a 100644 --- a/DigitalLearningSolutions.Data.Migrations/Properties/Resources.Designer.cs +++ b/DigitalLearningSolutions.Data.Migrations/Properties/Resources.Designer.cs @@ -1,2525 +1,2489 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace DigitalLearningSolutions.Data.Migrations.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DigitalLearningSolutions.Data.Migrations.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/10/2020 - ///-- Description: Updates a customisation based on form values - ///-- V2 Adds @CCEmail - ///-- V3 Adds ApplyLPDefaultsToSelfEnrol - ///-- ============================================= - ///CREATE PROCEDURE [dbo].[UpdateCustomisation_V3] - /// -- Add the parameters for the stored procedure here - /// @CustomisationID As Int, - /// @Active as bit, - /// @CustomisationName as nvarcha [rest of string was truncated]";. - /// - internal static string ApplyLPDefaultsSPChanges { - get { - return ResourceManager.GetString("ApplyLPDefaultsSPChanges", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <div class=nhsuk-u-reading-width><h2>What are cookies?</h2><p>Cookies are files saved on your phone, tablet or computer when you visit a website.<p>They store information about how you use the website, such as the pages you visit.<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.<h2>How we use cookies</h2><p>We only use cookies to:<ul><li>make our website work<li>measure how you use our website, such as which links you click on (analytics cookies), if you give [rest of string was truncated]";. - /// - internal static string CookiePolicy { - get { - return ResourceManager.GetString("CookiePolicy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to -- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 04/01/2021 - ///-- Description: Reorders the FrameworkCompetencyGroups in a given Framework - moving the given group up or down. - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[ReorderFrameworkCompetencyGroup] - /// -- Add the parameters for the stored procedure here - /// @FrameworkCompetencyGroupID int, - /// @Direction nvarchar(4) = '', - /// @SingleStep bit - ///AS - ///BEGIN - /// -- SET NOCOUNT ON added [rest of string was truncated]";. - /// - internal static string CreateOrAlterReorderFrameworkCompetenciesAndGroupsSPs { - get { - return ResourceManager.GetString("CreateOrAlterReorderFrameworkCompetenciesAndGroupsSPs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertCustomisation_V3] Script Date: 20/11/2020 14:12:52 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 28 February 2020 - ///-- V2 Adds @CCCompletion field - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[InsertCustomisation_V3] - /// @Active as bit, - /// @ApplicationID as int, - /// @CentreID as int, - /// @CustomisationName as nvarch [rest of string was truncated]";. - /// - internal static string DLSV2_106_CreateOrAlterInsertCustomisation_V3 { - get { - return ResourceManager.GetString("DLSV2_106_CreateOrAlterInsertCustomisation_V3", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertCustomisation_V3] Script Date: 20/11/2020 14:12:52 ******/ - ///DROP PROCEDURE [dbo].[InsertCustomisation_V3] - ///GO - /// - /// - ///. - /// - internal static string DLSV2_106_DropInsertCustomisation_V3 { - get { - return ResourceManager.GetString("DLSV2_106_DropInsertCustomisation_V3", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 22/09/2020 09:22:43 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/09/2020 - ///-- Description: Returns user self assessment responses (AVG) for Filtered competency - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] - /// -- Add t [rest of string was truncated]";. - /// - internal static string DLSV2_133_AdjustScoresForFilteredSP { - get { - return ResourceManager.GetString("DLSV2_133_AdjustScoresForFilteredSP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 22/09/2020 09:22:43 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/09/2020 - ///-- Description: Returns user self assessment responses (AVG) for Filtered competency - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] - /// -- Add t [rest of string was truncated]";. - /// - internal static string DLSV2_133_UnAdjustScoresForFilteredSP { - get { - return ResourceManager.GetString("DLSV2_133_UnAdjustScoresForFilteredSP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: UserDefinedFunction [dbo].[GetSelfAssessmentSummaryForCandidate] Script Date: 28/01/2021 07:45:22 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///CREATE OR ALTER FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] - ///( - /// @CandidateID int, - /// @SelfAssessmentID int - ///) - ///RETURNS @ResTable TABLE - ///( - /// CompetencyGroupID int, - /// Confidence float, - /// Relevance float - ///) - /// - ///AS - ///BEGIN - ///INSERT INTO @ResTable - /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance - ///FROM [rest of string was truncated]";. - /// - internal static string DLSV2_153_DropFilteredFunctionTweak { - get { - return ResourceManager.GetString("DLSV2_153_DropFilteredFunctionTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - /// - ////****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 27/01/2021 16:01:15 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/09/2020 - ///-- Description: Returns user self assessment responses (AVG) for Filtered competency - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] - /// [rest of string was truncated]";. - /// - internal static string DLSV2_153_DropFilteredSPFixes { - get { - return ResourceManager.GetString("DLSV2_153_DropFilteredSPFixes", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetSelfAssessmentSummaryForCandidate] Script Date: 28/01/2021 07:43:39 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///CREATE OR ALTER FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] - ///( - /// @CandidateID int, - /// @SelfAssessmentID int - ///) - ///RETURNS @ResTable TABLE - ///( - /// CompetencyGroupID int, - /// Confidence float, - /// Relevance float - ///) - /// - ///AS - ///BEGIN - ///INSERT INTO @ResTable - /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance - ///FROM (SELEC [rest of string was truncated]";. - /// - internal static string DLSV2_153_FilteredFunctionTweak { - get { - return ResourceManager.GetString("DLSV2_153_FilteredFunctionTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 27/01/2021 15:29:35 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/09/2020 - ///-- Description: Returns user self assessment responses (AVG) for Filtered competency - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] - /// -- Add [rest of string was truncated]";. - /// - internal static string DLSV2_153_FilteredSPFixes { - get { - return ResourceManager.GetString("DLSV2_153_FilteredSPFixes", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertUpdateCustomisationTutorials] Script Date: 21/04/2021 16:16:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 02/03/2020 - ///-- Description: Updates or inserts a CustomisationTutorials record with new values - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[InsertUpdateCustomisationTutorials] - /// -- Add the parameters for the store [rest of string was truncated]";. - /// - internal static string dlsv2_172_fixcustomisationtutorialprogressissue_down { - get { - return ResourceManager.GetString("dlsv2_172_fixcustomisationtutorialprogressissue_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertUpdateCustomisationTutorials] Script Date: 21/04/2021 16:16:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 02/03/2020 - ///-- Description: Updates or inserts a CustomisationTutorials record with new values - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[InsertUpdateCustomisationTutorials] - /// -- Add the parameters for the store [rest of string was truncated]";. - /// - internal static string dlsv2_172_fixcustomisationtutorialprogressissue_up { - get { - return ResourceManager.GetString("dlsv2_172_fixcustomisationtutorialprogressissue_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 21/06/2021 08:36:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesForCandidate] - /// -- Add the parameters for the stored procedure here - /// [rest of string was truncated]";. - /// - internal static string DLSV2_236_GetCompletedCoursesTweak_DOWN { - get { - return ResourceManager.GetString("DLSV2_236_GetCompletedCoursesTweak_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 21/06/2021 08:36:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesForCan [rest of string was truncated]";. - /// - internal static string DLSV2_236_GetCompletedCoursesTweak_UP { - get { - return ResourceManager.GetString("DLSV2_236_GetCompletedCoursesTweak_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. - /// - internal static string DLSV2_237_GetActiveAvailableTweak_DOWN { - get { - return ResourceManager.GetString("DLSV2_237_GetActiveAvailableTweak_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. - /// - internal static string DLSV2_237_GetActiveAvailableTweak_UP { - get { - return ResourceManager.GetString("DLSV2_237_GetActiveAvailableTweak_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetLinkedFieldNameForCentreByID] Script Date: 16/07/2021 09:23:22 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 12/10/2018 - ///-- Description: Return the field name for centre group linked field ID - ///-- ============================================= - ///ALTER FUNCTION [dbo].[GetLinkedFieldNameForCentreByID] - ///( - /// -- Add the parameters for the function here - /// @ [rest of string was truncated]";. - /// - internal static string DLSV2_272_AlterGetLinkedFieldNameFunction_DOWN { - get { - return ResourceManager.GetString("DLSV2_272_AlterGetLinkedFieldNameFunction_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetLinkedFieldNameForCentreByID] Script Date: 16/07/2021 09:23:22 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 12/10/2018 - ///-- Description: Return the field name for centre group linked field ID - ///-- ============================================= - ///ALTER FUNCTION [dbo].[GetLinkedFieldNameForCentreByID] - ///( - /// -- Add the parameters for the function here - /// @ [rest of string was truncated]";. - /// - internal static string DLSV2_272_AlterGetLinkedFieldNameFunction_UP { - get { - return ResourceManager.GetString("DLSV2_272_AlterGetLinkedFieldNameFunction_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[ReorderFrameworkCompetency] Script Date: 15/10/2021 08:31:18 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15/10/2021 - ///-- Description: Reorders the CompetencyAssessmentQuestions - moving the given competency question up or down. - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[ReorderCompetencyAssessmentQuestion] /// [rest of string was truncated]";. - /// - internal static string DLSV2_379_ReorderCompetencyAssessmentQuestionsSP { - get { - return ResourceManager.GetString("DLSV2_379_ReorderCompetencyAssessmentQuestionsSP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 29/09/2022 19:11:04 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Manish Agarwal - ///-- Create date: 26/09/2022 - ///-- Description: Returns active available customisations for centre v6 adds SelfAssessments. - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsFo [rest of string was truncated]";. - /// - internal static string DLSV2_581_GetActiveAvailableCustomisationsForCentreFiltered_V6 { - get { - return ResourceManager.GetString("DLSV2_581_GetActiveAvailableCustomisationsForCentreFiltered_V6", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to --DLSV2-95 Adds System Versioning to auditable tables (UP) - /// - ///--Frameworks table - ///ALTER TABLE Frameworks - /// ADD - /// SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START HIDDEN - /// CONSTRAINT DF_Frameworks_SysStart DEFAULT SYSUTCDATETIME() - /// , SysEndTime DATETIME2 GENERATED ALWAYS AS ROW END HIDDEN - /// CONSTRAINT DF_Frameworks_SysEnd DEFAULT CONVERT(DATETIME2, '9999-12-31 23:59:59.9999999'), - /// PERIOD FOR SYSTEM_TIME (SysStartTime, SysEndTime); - ///GO - /// - ///ALTER TABLE Framework [rest of string was truncated]";. - /// - internal static string DLSV2_95_AddSystemVersioning { - get { - return ResourceManager.GetString("DLSV2_95_AddSystemVersioning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to --DLSV2-95 Removes System Versioning to auditable tables (DOWN) - /// - /// - ///-- Remove versioning from FrameworkCompetencies table - ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = OFF); - ///DROP TABLE dbo.FrameworkCompetencies; - ///DROP TABLE dbo.FrameworkCompetenciesHistory; - ///GO - /// - ///-- Remove versioning from FrameworkCompetencyGroups table - ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = OFF); - ///DROP TABLE dbo.FrameworkCompetencyGroups; - ///DROP TABLE dbo.FrameworkCompetencyGroupsHistory; - ///GO - /// - ///-- [rest of string was truncated]";. - /// - internal static string DLSV2_95_RemoveSystemVersioning { - get { - return ResourceManager.GetString("DLSV2_95_RemoveSystemVersioning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 03/10/2022 06:00:00 ******/ - ///DROP PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] - ///GO - /// - ///. - /// - internal static string DropActiveAvailableV6 { - get { - return ResourceManager.GetString("DropActiveAvailableV6", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to 䕓⁔乁䥓也䱕卌传ൎ䜊൏匊呅儠何䕔彄䑉久䥔䥆剅传ൎ䜊൏ഊⴊ‭㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽ഽⴊ‭畁桴牯ऺ䬉癥湩圠楨瑴歡牥਍ⴭ䌠敲瑡⁥慤整›㔱䘠扥畲牡⁹〲㈱਍ⴭ䐠獥牣灩楴湯ऺ牃慥整⁳桴⁥牐杯敲獳愠摮愠灳牐杯敲獳爠捥牯⁤潦⁲⁡敮⁷獵牥਍ⴭ删瑥牵獮ऺ〉㨠猠捵散獳‬牰杯敲獳挠敲瑡摥਍ⴭ†††ठㄉ㨠䘠楡敬⁤‭牰杯敲獳愠牬慥祤攠楸瑳൳ⴊ‭†††उ〱‰›慆汩摥ⴠ䌠湥牴䥥⁄湡⁤畃瑳浯獩瑡潩䥮⁄潤❮⁴慭捴൨ⴊ‭†††उ〱‱›慆汩摥ⴠ䌠湥牴䥥⁄湡⁤慃摮摩瑡䥥⁄潤❮⁴慭捴൨ഊⴊ‭㍖挠慨杮獥椠据畬敤ഺഊⴊ‭桃捥獫琠慨⁴硥獩楴杮瀠潲牧獥⁳慨湳琧戠敥敒潭敶⁤牯删晥敲桳摥戠晥牯⁥敲畴楲楮杮攠牲牯മⴊ‭摁獤瀠牡浡瑥牥⁳潦⁲湅潲汬敭瑮洠瑥潨⁤湡⁤摡業䑉਍ⴭ㴠㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽਍䱁䕔⁒剐䍏䑅剕⁅摛潢⹝畛灳牃慥整牐杯敲獳敒潣摲噟崳਍䀉慃摮摩瑡䥥⁄湩ⱴ਍䀉畃瑳浯獩瑡潩䥮⁄湩ⱴ਍䀉敃瑮敲䑉椠瑮ബऊ䕀牮汯浬湥䵴瑥潨䥤⁄湩ⱴ਍䀉湅潲汬摥祂摁業䥮⁄湩൴䄊൓䈊䝅义਍ⴉ‭䕓⁔低佃乕⁔乏愠摤摥琠牰癥湥⁴硥牴⁡敲畳瑬猠瑥⁳牦浯਍ⴉ‭湩整晲牥湩⁧楷桴匠䱅䍅⁔瑳瑡浥湥獴മऊ䕓⁔低佃乕⁔乏഻ऊⴭ਍ⴉ‭桔牥⁥牡⁥慶楲畯⁳桴湩獧琠 [rest of string was truncated]";. - /// - internal static string DropApplyLPDefaultsSPChanges { - get { - return ResourceManager.GetString("DropApplyLPDefaultsSPChanges", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ///DROP PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] - ///GO - ///DROP PROCEDURE [dbo].[GetFilteredProfileForCandidate] - ///GO - ///DROP FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] - ///GO - ///DROP FUNCTION [dbo].[GetFilteredAPISeniorityID] - ///GO - /// - /// - /// - /// - /// - ///. - /// - internal static string DropFilteredSPs { - get { - return ResourceManager.GetString("DropFilteredSPs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DROP PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] - ///GO. - /// - internal static string DropGetActiveAvailableV5 { - get { - return ResourceManager.GetString("DropGetActiveAvailableV5", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[ReorderTutorial] Script Date: 04/01/2021 16:17:57 ******/ - ///DROP PROCEDURE [dbo].[ReorderFrameworkCompetency] - ///GO - ///DROP PROCEDURE [dbo].[ReorderFrameworkCompetencyGroup] - ///GO - /// - ///. - /// - internal static string DropReorderFrameworkCompetenciesAndGroupsSPs { - get { - return ResourceManager.GetString("DropReorderFrameworkCompetenciesAndGroupsSPs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ///CREATE FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] - ///( - /// @CandidateID int, - /// @SelfAssessmentID int - ///) - ///RETURNS @ResTable TABLE - ///( - /// CompetencyGroupID int, - /// Confidence float, - /// Relevance float - ///) - /// - ///AS - ///BEGIN - ///INSERT INTO @ResTable - /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance - ///FROM (SELECT comp.CompetencyGroupID, sar.AssessmentQuestionID, sar.Result*1.0 AS Result - /// FROM Competencies AS comp INNER JOIN - /// SelfAssessmentResults AS sar [rest of string was truncated]";. - /// - internal static string FilteredSPs { - get { - return ResourceManager.GetString("FilteredSPs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 14/10/2020 10:02:34 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///CREATE PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreF [rest of string was truncated]";. - /// - internal static string GetActiveAvailableV5 { - get { - return ResourceManager.GetString("GetActiveAvailableV5", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. - /// - internal static string HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_DOWN { - get { - return ResourceManager.GetString("HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 17/11/2021 16:40:41 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. - /// - internal static string HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_UP { - get { - return ResourceManager.GetString("HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 24/01/2023 15:00:41 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for cate [rest of string was truncated]";. - /// - internal static string td_1043_getactivitiesforenrolment { - get { - return ResourceManager.GetString("td_1043_getactivitiesforenrolment", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 24/01/2023 15:31:20 ******/ - ///DROP PROCEDURE [dbo].[GetActivitiesForDelegateEnrolment] - ///GO - /// - /// - ///. - /// - internal static string td_1043_getactivitiesforenrolment_down { - get { - return ResourceManager.GetString("td_1043_getactivitiesforenrolment_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: View [dbo].[Candidates] Script Date: 2/22/2023 09:29:54 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: - ///-- Modified date: 22/02/2023 - ///-- ============================================= - /// - ///ALTER VIEW [dbo].[Candidates] AS - ///SELECT dbo.DelegateAccounts.ID AS CandidateID, - /// dbo.DelegateAccounts.Active, - /// dbo.DelegateAccounts.CentreID, - /// dbo.Users.FirstName, - /// dbo.Users.LastName, - /// [rest of string was truncated]";. - /// - internal static string td_1131_alterviewcandidatesadduserid_down { - get { - return ResourceManager.GetString("td_1131_alterviewcandidatesadduserid_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: View [dbo].[Candidates] Script Date: 2/22/2023 09:29:54 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: - ///-- Modified date: 22/02/2023 - ///-- ============================================= - /// - ///ALTER VIEW [dbo].[Candidates] AS - ///SELECT dbo.DelegateAccounts.ID AS CandidateID, - /// dbo.DelegateAccounts.Active, - /// dbo.DelegateAccounts.CentreID, - /// dbo.Users.FirstName, - /// dbo.Users.LastName, - /// [rest of string was truncated]";. - /// - internal static string td_1131_alterviewcandidatesadduserid_up { - get { - return ResourceManager.GetString("td_1131_alterviewcandidatesadduserid_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to --TD-1220-AddSystemVersioning_SelfAssessmentResultSupervisorVerifications - ///--Add versioning in SelfAssessmentResultSupervisorVerifications table - ///ALTER TABLE SelfAssessmentResultSupervisorVerifications - /// ADD - /// SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START HIDDEN - /// CONSTRAINT DF_SelfAssessmentResultSupervisorVerifications_SysStart DEFAULT SYSUTCDATETIME() - /// , SysEndTime DATETIME2 GENERATED ALWAYS AS ROW END HIDDEN - /// CONSTRAINT DF_SelfAssessmentResultSupervisorVerif [rest of string was truncated]";. - /// - internal static string TD_1220_AddSystemVersioning_SelfAssessmentResultSupervisorVerifications { - get { - return ResourceManager.GetString("TD_1220_AddSystemVersioning_SelfAssessmentResultSupervisorVerifications", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to --TD-1220-AddSystemVersioning_SelfAssessmentResultSupervisorVerifications - ///-- Remove versioning from SelfAssessmentResultSupervisorVerifications table - ///ALTER TABLE SelfAssessmentResultSupervisorVerifications SET (SYSTEM_VERSIONING = OFF); - ///ALTER TABLE SelfAssessmentResultSupervisorVerifications DROP PERIOD FOR SYSTEM_TIME; - ///ALTER TABLE [dbo].SelfAssessmentResultSupervisorVerifications DROP CONSTRAINT [DF_SelfAssessmentResultSupervisorVerifications_SysEnd]; - ///ALTER TABLE [dbo].SelfAssessmentResultSupervisorVe [rest of string was truncated]";. - /// - internal static string TD_1220_RemoveSystemVersioning_SelfAssessmentResultSupervisorVerifications { - get { - return ResourceManager.GetString("TD_1220_RemoveSystemVersioning_SelfAssessmentResultSupervisorVerifications", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 22/05/2023 07:50:40 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string td_1610_update_getactivitiesfordelegateenrolment_proc_down { - get { - return ResourceManager.GetString("td_1610_update_getactivitiesfordelegateenrolment_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 19/05/2023 16:40:12 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string td_1610_update_getactivitiesfordelegateenrolment_proc_up { - get { - return ResourceManager.GetString("td_1610_update_getactivitiesfordelegateenrolment_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 01/06/2023 15:32:33 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ========= [rest of string was truncated]";. - /// - internal static string TD_1766_GetActivitiesForDelegateEnrolmentTweak { - get { - return ResourceManager.GetString("TD_1766_GetActivitiesForDelegateEnrolmentTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 01/06/2023 15:32:33 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ========= [rest of string was truncated]";. - /// - internal static string TD_1766_GetActivitiesForDelegateEnrolmentTweak_down { - get { - return ResourceManager.GetString("TD_1766_GetActivitiesForDelegateEnrolmentTweak_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 16/08/2023 12:17:34 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_1766_GetCompletedCoursesForCandidateTweak { - get { - return ResourceManager.GetString("TD_1766_GetCompletedCoursesForCandidateTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 16/08/2023 12:17:34 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_1766_GetCompletedCoursesForCandidateTweak_down { - get { - return ResourceManager.GetString("TD_1766_GetCompletedCoursesForCandidateTweak_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 26/06/2023 08:04:53 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROCEDU [rest of string was truncated]";. - /// - internal static string TD_1766_GetCurrentCoursesForCandidateTweak { - get { - return ResourceManager.GetString("TD_1766_GetCurrentCoursesForCandidateTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/06/2023 14:49:50 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROCEDURE [ [rest of string was truncated]";. - /// - internal static string TD_1766_GetCurrentCoursesForCandidateTweak_down { - get { - return ResourceManager.GetString("TD_1766_GetCurrentCoursesForCandidateTweak_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 16/06/2023 09:17:01 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the parameter [rest of string was truncated]";. - /// - internal static string TD_1913_AlterGroupCustomisation_Add_V2_DOWN { - get { - return ResourceManager.GetString("TD_1913_AlterGroupCustomisation_Add_V2_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 16/06/2023 09:17:01 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the parameter [rest of string was truncated]";. - /// - internal static string TD_1913_AlterGroupCustomisation_Add_V2_UP { - get { - return ResourceManager.GetString("TD_1913_AlterGroupCustomisation_Add_V2_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <div class=nhsuk-u-reading-width><h2>What are cookies?</h2><p>Cookies are files saved on your phone, tablet or computer when you visit a website.<p>They store information about how you use the website, such as the pages you visit.<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.<h2>How we use cookies</h2><p>We only use cookies to:<ul><li>make our website work<li>measure how you use our website, such as which links you click on (analytics cookies), if you give [rest of string was truncated]";. - /// - internal static string TD_1943_CookiePolicyContentHtmlOldRecord { - get { - return ResourceManager.GetString("TD_1943_CookiePolicyContentHtmlOldRecord", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <div class=nhsuk-u-reading-width> - ///<h2>What are cookies?</h2> - ///<p>Cookies are files saved on your phone, tablet or computer when you visit a website.</p> - ///<p>They store information about how you use the website, such as the pages you visit.</p> - ///<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.</p> - ///<h2>How we use cookies</h2><p>We only use cookies to:</p> - ///<ul> - ///<li>make our website work</li> - ///<li>measure how you use our website, such as which links you clic [rest of string was truncated]";. - /// - internal static string TD_1943_CookiesPolicy { - get { - return ResourceManager.GetString("TD_1943_CookiesPolicy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to -- Remove period field from FrameworkCompetencies table - ///ALTER TABLE FrameworkCompetencies ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); - ///GO - /// - ///-- Remove period field from FrameworkCompetencyGroups table - ///ALTER TABLE FrameworkCompetencyGroups ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); - ///GO - /// - ///-- Remove period field from Frameworks table - ///ALTER TABLE Frameworks ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); - ///GO - /// - ///-- Remove period field from Competencies table - ///ALTER TABL [rest of string was truncated]";. - /// - internal static string TD_2036_SwitchOffPeriodFields_DOWN { - get { - return ResourceManager.GetString("TD_2036_SwitchOffPeriodFields_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to -- Remove period field from FrameworkCompetencies table - ///ALTER TABLE FrameworkCompetencies DROP PERIOD FOR SYSTEM_TIME; - ///GO - /// - ///-- Remove period field from FrameworkCompetencyGroups table - ///ALTER TABLE FrameworkCompetencyGroups DROP PERIOD FOR SYSTEM_TIME; - ///GO - /// - ///-- Remove period field from Frameworks table - ///ALTER TABLE Frameworks DROP PERIOD FOR SYSTEM_TIME; - ///GO - /// - ///-- Remove period field from Competencies table - ///ALTER TABLE Competencies DROP PERIOD FOR SYSTEM_TIME; - ///GO - /// - ///-- Remove period field from Comp [rest of string was truncated]";. - /// - internal static string TD_2036_SwitchOffPeriodFields_UP { - get { - return ResourceManager.GetString("TD_2036_SwitchOffPeriodFields_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to -- Switch on versioning from FrameworkCompetencies table - ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworkCompetenciesHistory)); - ///GO - /// - ///-- Switch on versioning from FrameworkCompetencyGroups table - ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworkCompetencyGroupsHistory)); - ///GO - /// - ///-- Switch on versioning from Frameworks table - ///ALTER TABLE Frameworks SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworksHisto [rest of string was truncated]";. - /// - internal static string TD_2036_SwitchSystemVersioningOffAllTables_DOWN { - get { - return ResourceManager.GetString("TD_2036_SwitchSystemVersioningOffAllTables_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to -- Remove versioning from FrameworkCompetencies table - ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = OFF); - ///GO - /// - ///-- Remove versioning from FrameworkCompetencyGroups table - ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = OFF); - ///GO - /// - ///-- Remove versioning from Frameworks table - ///ALTER TABLE Frameworks SET (SYSTEM_VERSIONING = OFF); - ///GO - /// - ///-- Remove versioning from Competencies table - ///ALTER TABLE Competencies SET (SYSTEM_VERSIONING = OFF); - ///GO - /// - ///-- Remove versioning from Competency [rest of string was truncated]";. - /// - internal static string TD_2036_SwitchSystemVersioningOffAllTables_UP { - get { - return ResourceManager.GetString("TD_2036_SwitchSystemVersioningOffAllTables_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak { - get { - return ResourceManager.GetString("TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 09:33:56 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak_down { - get { - return ResourceManager.GetString("TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 03/07/2023 - ///-- Description: Populate the ReportSelfAssessmentActivityLog table with recent activity - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE PopulateReportSelfAssessmentActivityLog - /// - ///AS - ///BEGIN - /// -- SET NOCOUNT ON added to prevent extra result sets from - /// -- interfering with SELECT statements. - /// SET NOCOUNT ON; - /// - /// DECLARE @ [rest of string was truncated]";. - /// - internal static string TD_2117_CreatePopulateReportSelfAssessmentActivityLog_SP { - get { - return ResourceManager.GetString("TD_2117_CreatePopulateReportSelfAssessmentActivityLog_SP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspReturnSectionsForCandCust_V2] Script Date: 08/12/2023 13:33:59 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15/08/2013 - ///-- Description: Gets section table for learning menu - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspReturnSectionsForCandCust_V2] - /// -- Add the parameters for the stored procedure here - /// @ProgressID [rest of string was truncated]";. - /// - internal static string TD_2481_Update_uspReturnSectionsForCandCust_V2_down { - get { - return ResourceManager.GetString("TD_2481_Update_uspReturnSectionsForCandCust_V2_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspReturnSectionsForCandCust_V2] Script Date: 08/12/2023 13:33:59 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15/08/2013 - ///-- Description: Gets section table for learning menu - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspReturnSectionsForCandCust_V2] - /// -- Add the parameters for the stored procedure here - /// @ProgressID [rest of string was truncated]";. - /// - internal static string TD_2481_Update_uspReturnSectionsForCandCust_V2_up { - get { - return ResourceManager.GetString("TD_2481_Update_uspReturnSectionsForCandCust_V2_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak { - get { - return ResourceManager.GetString("TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak_down { - get { - return ResourceManager.GetString("TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: View [dbo].[AdminUsers] Script Date: 2/6/2023 22:11:41 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: - ///-- Modified date: 02/06/2023 - ///-- Description: Return the admin user details - ///-- ============================================= - /// - ///ALTER VIEW [dbo].[AdminUsers] AS - ///SELECT dbo.AdminAccounts.ID AS AdminID, - /// null AS Login, - /// dbo.Users.PasswordHas [rest of string was truncated]";. - /// - internal static string td_264_alterviewadminusersaddcentrename_down { - get { - return ResourceManager.GetString("td_264_alterviewadminusersaddcentrename_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: View [dbo].[AdminUsers] Script Date: 2/6/2023 22:11:41 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: - ///-- Modified date: 02/06/2023 - ///-- Description: Return the admin user details - ///-- ============================================= - /// - ///ALTER VIEW [dbo].[AdminUsers] AS - ///SELECT dbo.AdminAccounts.ID AS AdminID, - /// null AS Login, - /// dbo.Users.PasswordHas [rest of string was truncated]";. - /// - internal static string td_264_alterviewadminusersaddcentrename_up { - get { - return ResourceManager.GetString("td_264_alterviewadminusersaddcentrename_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 18/10/2023 08:05:27 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/12/2016 - ///-- Description: Checks if learner has progress record against customisation. - ///-- Returns: - ///-- 0: None - ///-- 1: Expired - ///-- 2: Complete - ///-- 3: Current - ///-- ============================================= - ///-- 18/09/2018 Adds return v [rest of string was truncated]";. - /// - internal static string TD_3000_CheckDelegateStatusForCustomisationFix_down { - get { - return ResourceManager.GetString("TD_3000_CheckDelegateStatusForCustomisationFix_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 17/10/2023 12:13:14 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/12/2016 - ///-- Description: Checks if learner has progress record against customisation. - ///-- Returns: - ///-- 0: None - ///-- 1: Expired - ///-- 2: Complete - ///-- 3: Current - ///-- ============================================= - ///-- 18/09/2018 Adds return v [rest of string was truncated]";. - /// - internal static string TD_3000_CheckDelegateStatusForCustomisationFix_up { - get { - return ResourceManager.GetString("TD_3000_CheckDelegateStatusForCustomisationFix_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns assessment results for a delegate - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] - /// @selfAssessmentId as Int = 0, - /// @delegateId as int = 0 - ///AS - ///BEGIN - /// - /// SET NOCOUNT ON; - /// - /// WITH LatestAssessmentResults AS - /// ( - /// SELECT - /// [rest of string was truncated]";. - /// - internal static string TD_3187_CreateGetAssessmentResultsByDelegate_SP { - get { - return ResourceManager.GetString("TD_3187_CreateGetAssessmentResultsByDelegate_SP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns candidate assessment results by candidateAssessmentId - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] - /// @candidateAssessmentId as Int = 0, - /// @adminId as int = 0, - /// @selfAssessmentResultId as int = NULL - ///AS - ///BEGIN - /// - /// SET NOCOUNT ON; - /// - /// WITH LatestAssessmentR [rest of string was truncated]";. - /// - internal static string TD_3187_CreateGetCandidateAssessmentResultsById_SP { - get { - return ResourceManager.GetString("TD_3187_CreateGetCandidateAssessmentResultsById_SP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendOneMonthSelfAssessmentTBCReminders] Script Date: 06/12/2023 15:54:40 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 29/11/2023 - ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[SendOneMonthSelfAssessmentTBCReminders] [rest of string was truncated]";. - /// - internal static string TD_3190_FixSelfAssessmentReminderQueriesSP_UP { - get { - return ResourceManager.GetString("TD_3190_FixSelfAssessmentReminderQueriesSP_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 29/11/2023 - ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[SendSelfAssessmentOverdueReminders] - /// -- Add the parameters for the stored procedure here - /// @EmailProfileName nvarchar(100), - /// @TestOnly bit - ///AS - ///BEGIN - /// -- [rest of string was truncated]";. - /// - internal static string TD_3190_SendOneMonthSelfAssessmentOverdueRemindersSP { - get { - return ResourceManager.GetString("TD_3190_SendOneMonthSelfAssessmentOverdueRemindersSP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 29/11/2023 - ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[SendOneMonthSelfAssessmentTBCReminders] - /// -- Add the parameters for the stored procedure here - /// @EmailProfileName nvarchar(100), - /// @TestOnly bit - ///AS - ///BEGIN /// [rest of string was truncated]";. - /// - internal static string TD_3190_SendOneMonthSelfAssessmentTBCRemindersSP { - get { - return ResourceManager.GetString("TD_3190_SendOneMonthSelfAssessmentTBCRemindersSP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendExpiredTBCReminders] Script Date: 07/12/2023 08:03:01 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 17/08/2018 - ///-- Description: Uses DB mail to send reminders to delegates on courses with a TBC date within 1 month. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[SendExpiredTBCReminders] - /// -- Add the parameters for the stored p [rest of string was truncated]";. - /// - internal static string TD_3197_FixLinksInCourseReminderEmails_DOWN { - get { - return ResourceManager.GetString("TD_3197_FixLinksInCourseReminderEmails_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendExpiredTBCReminders] Script Date: 07/12/2023 08:03:01 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 17/08/2018 - ///-- Description: Uses DB mail to send reminders to delegates on courses with a TBC date within 1 month. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[SendExpiredTBCReminders] - /// -- Add the parameters for the stored p [rest of string was truncated]";. - /// - internal static string TD_3197_FixLinksInCourseReminderEmails_UP { - get { - return ResourceManager.GetString("TD_3197_FixLinksInCourseReminderEmails_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths] Script Date: 27/02/2024 10:27:26 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 23/10/2018 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and Cust [rest of string was truncated]";. - /// - internal static string TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Down { - get { - return ResourceManager.GetString("TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths] Script Date: 27/02/2024 10:27:26 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 23/10/2018 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and Cust [rest of string was truncated]";. - /// - internal static string TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Up { - get { - return ResourceManager.GetString("TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///CREATE TABLE [dbo].[deprecated_ApplicationGroups]( - /// [AppGroupID] [int] IDENTITY(1,1) NOT NULL, - /// [ApplicationGroup] [nvarchar](100) NOT NULL, - /// CONSTRAINT [PK_ApplicationGroups] PRIMARY KEY CLUSTERED - ///( - /// [AppGroupID] ASC - ///)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - ///) ON [PRIMARY] - ///GO - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///CREATE TABLE [dbo].[deprec [rest of string was truncated]";. - /// - internal static string TD_3629_DeleteDeprecatedTables_DOWN { - get { - return ResourceManager.GetString("TD_3629_DeleteDeprecatedTables_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER OFF - ///GO - ///CREATE PROCEDURE [dbo].[aspnet_AnyDataInTables_deprecated] - /// @TablesToCheck int - ///AS - ///BEGIN - /// -- Check Membership table if (@TablesToCheck & 1) is set - /// IF ((@TablesToCheck & 1) <> 0 AND - /// (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V')))) - /// BEGIN - /// IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Membership)) - /// BEGIN - /// SELECT N'aspnet_Membership' - /// RETU [rest of string was truncated]";. - /// - internal static string TD_3664_RestoreDroppedSPs { - get { - return ResourceManager.GetString("TD_3664_RestoreDroppedSPs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 16/05/2024 09:29:31 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/12/2016 - ///-- Description: Checks if learner has progress record against customisation. - ///-- Returns: - ///-- 0: None - ///-- 1: Expired - ///-- 2: Complete - ///-- 3: Current - ///-- ============================================= - ///-- 18/09/2018 Adds re [rest of string was truncated]";. - /// - internal static string TD_3671_Alter_CheckDelegateStatusForCustomisation_func_down { - get { - return ResourceManager.GetString("TD_3671_Alter_CheckDelegateStatusForCustomisation_func_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 09/05/2024 11:41:58 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/12/2016 - ///-- Description: Checks if learner has progress record against customisation. - ///-- Returns: - ///-- 0: None - ///-- 1: Expired - ///-- 2: Complete - ///-- 3: Current - ///-- ============================================= - ///-- 18/09/2018 Adds return [rest of string was truncated]";. - /// - internal static string TD_3671_Alter_CheckDelegateStatusForCustomisation_func_up { - get { - return ResourceManager.GetString("TD_3671_Alter_CheckDelegateStatusForCustomisation_func_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 16/05/2024 09:37:05 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROCEDURE [rest of string was truncated]";. - /// - internal static string TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_down { - get { - return ResourceManager.GetString("TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 08/05/2024 10:34:29 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROCEDURE [db [rest of string was truncated]";. - /// - internal static string TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_up { - get { - return ResourceManager.GetString("TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 09/04/2024 08:39:16 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_4015_Update_GetCompletedCoursesForCandidate_proc_down { - get { - return ResourceManager.GetString("TD_4015_Update_GetCompletedCoursesForCandidate_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 09/04/2024 08:39:16 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_4015_Update_GetCompletedCoursesForCandidate_proc_up { - get { - return ResourceManager.GetString("TD_4015_Update_GetCompletedCoursesForCandidate_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 12/07/2024 17:37:50 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the paramet [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_GroupCustomisation_Add_V2_Down { - get { - return ResourceManager.GetString("TD_4223_Alter_GroupCustomisation_Add_V2_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 12/07/2024 17:37:50 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the paramet [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_GroupCustomisation_Add_V2_Up { - get { - return ResourceManager.GetString("TD_4223_Alter_GroupCustomisation_Add_V2_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 27/06/2024 09:35:55 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15 February 2012 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and CustomisationID don [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_uspCreateProgressRecord_V3_Down { - get { - return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecord_V3_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 27/06/2024 09:35:33 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15 February 2012 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and CustomisationID d [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_uspCreateProgressRecord_V3_Up { - get { - return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecord_V3_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/06/2024 09:37:38 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 11/04/2019 - ///-- Description: Creates the Progress and aspProgress record for a new user with no return value - ///-- Returns: Nothing - /// - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down { - get { - return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/06/2024 09:38:12 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 11/04/2019 - ///-- Description: Creates the Progress and aspProgress record for a new user with no return value - ///-- Returns: Nothing - /// - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspCreate [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up { - get { - return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 20/08/2024 11:57:38 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ======= [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_down { - get { - return ResourceManager.GetString("TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 20/08/2024 11:57:38 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ======= [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_up { - get { - return ResourceManager.GetString("TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 20/08/2024 11:58:45 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCourses [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetCompletedCoursesForCandidate_proc_down { - get { - return ResourceManager.GetString("TD_4243_Alter_GetCompletedCoursesForCandidate_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 20/08/2024 11:58:45 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCourses [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetCompletedCoursesForCandidate_proc_up { - get { - return ResourceManager.GetString("TD_4243_Alter_GetCompletedCoursesForCandidate_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/07/2024 10:11:35 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROCEDU [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_down { - get { - return ResourceManager.GetString("TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - /// - ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/07/2024 10:11:35 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROC [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_up { - get { - return ResourceManager.GetString("TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 27/08/2024 14:41:29 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the paramet [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Down { - get { - return ResourceManager.GetString("TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 27/08/2024 14:41:29 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the paramet [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Up { - get { - return ResourceManager.GetString("TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 14/08/2024 14:46:35 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15 February 2012 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and CustomisationID don't [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_uspCreateProgressRecord_V3_Down { - get { - return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecord_V3_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 14/08/2024 14:46:35 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15 February 2012 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and CustomisationID don't [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_uspCreateProgressRecord_V3_Up { - get { - return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecord_V3_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/08/2024 15:06:49 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 11/04/2019 - ///-- Description: Creates the Progress and aspProgress record for a new user with no return value - ///-- Returns: Nothing - /// - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down { - get { - return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/08/2024 15:06:49 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 11/04/2019 - ///-- Description: Creates the Progress and aspProgress record for a new user with no return value - ///-- Returns: Nothing - /// - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up { - get { - return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 05/09/2024 16:24:49 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_4634_Alter_GetCompletedCoursesForCandidate_DOWN { - get { - return ResourceManager.GetString("TD_4634_Alter_GetCompletedCoursesForCandidate_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 05/09/2024 16:24:49 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_4634_Alter_GetCompletedCoursesForCandidate_UP { - get { - return ResourceManager.GetString("TD_4634_Alter_GetCompletedCoursesForCandidate_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 22/10/2024 16:55:08 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ========= [rest of string was truncated]";. - /// - internal static string TD_4878_Alter_GetActivitiesForDelegateEnrolment_Down { - get { - return ResourceManager.GetString("TD_4878_Alter_GetActivitiesForDelegateEnrolment_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 22/10/2024 16:55:08 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ========= [rest of string was truncated]";. - /// - internal static string TD_4878_Alter_GetActivitiesForDelegateEnrolment_Up { - get { - return ResourceManager.GetString("TD_4878_Alter_GetActivitiesForDelegateEnrolment_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetAssessmentResultsByDelegate] Script Date: 07/11/2024 21:36:58 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns assessment results for a delegate - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] - /// @selfAssessmentId as Int = 0, - /// @delegateId as int = 0 - ///AS - ///BEGIN [rest of string was truncated]";. - /// - internal static string TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN { - get { - return ResourceManager.GetString("TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetAssessmentResultsByDelegate] Script Date: 07/11/2024 21:36:58 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns assessment results for a delegate - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] - /// @selfAssessmentId as Int = 0, - /// @delegateId as int = 0 - ///AS - ///BEGIN [rest of string was truncated]";. - /// - internal static string TD_4950_Alter_GetAssessmentResultsByDelegate_UP { - get { - return ResourceManager.GetString("TD_4950_Alter_GetAssessmentResultsByDelegate_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCandidateAssessmentResultsById] Script Date: 14/11/2024 14:31:31 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns candidate assessment results by candidateAssessmentId - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] - /// @candidateAssessmentId as Int = 0, - /// @admin [rest of string was truncated]";. - /// - internal static string TD_4950_AlterGetCandidateAssessmentResultsById_DOWN { - get { - return ResourceManager.GetString("TD_4950_AlterGetCandidateAssessmentResultsById_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCandidateAssessmentResultsById] Script Date: 14/11/2024 14:31:31 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns candidate assessment results by candidateAssessmentId - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] - /// @candidateAssessmentId as Int = 0, - /// @admin [rest of string was truncated]";. - /// - internal static string TD_4950_AlterGetCandidateAssessmentResultsById_UP { - get { - return ResourceManager.GetString("TD_4950_AlterGetCandidateAssessmentResultsById_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetOtherCentresForSelfAssessment] Script Date: 12/11/2024 08:47:08 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/01/2024 - ///-- Description: Gets a comma separated list of other centres for a user self assessment - ///-- ============================================= - ///CREATE OR ALTER FUNCTION [dbo].[GetOtherCentresForSelfAssessment] - ///( - /// -- Add the para [rest of string was truncated]";. - /// - internal static string TD_4950_dboGetOtherCentresForSelfAssessmentCreateOrAlter { - get { - return ResourceManager.GetString("TD-4950-dboGetOtherCentresForSelfAssessmentCreateOrAlter", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 29/09/2022 19:11:04 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Manish Agarwal - ///-- Create date: 26/09/2022 - ///-- Description: Returns active available customisations for centre v6 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFil [rest of string was truncated]";. - /// - internal static string TD_786_GetSelfRegisteredFlag_DOWN { - get { - return ResourceManager.GetString("TD-786-GetSelfRegisteredFlag_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 08/12/2022 13:00:15 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. - /// - internal static string TD_786_GetSelfRegisteredFlag_UP { - get { - return ResourceManager.GetString("TD-786-GetSelfRegisteredFlag_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <ol type=""1""><li><strong>About these terms and conditions</strong><ul data-list-level=""1""><li>It is your responsibility to ensure that you understand and comply with these terms and conditions. It ensures that:<ul data-list-level=""2""><li>You understand your responsibilities and what constitutes an abuse of the service</li><li>Computers and personal data are not put at risk</li></ul></li><li>If you have any questions about these terms and conditions, you should contact your Digital Learning Solutions c [rest of string was truncated]";. - /// - internal static string TermsAndConditionsOldrecord { - get { - return ResourceManager.GetString("TermsAndConditionsOldrecord", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <h1 class="policy-text-center">TERMS AND CONDITIONS</h1> - ///<h1 class="policy-text-center">PLEASE READ THESE TERMS AND CONDITIONS CAREFULLY BEFORE USING THE PLATFORM. YOUR ATTENTION IS PARTICULARLY DRAWN TO THE PROVISIONS OF CLAUSE 14 (OUR RESPONSIBILITY FOR LOSS OR DAMAGE SUFFERED BY YOU) AND CLAUSE 15 (INDEMNITIES).</h1> - ///<ol class="custom-ordered-list nhsuk-u-padding-left-0"> - /// - /// - ///<li class="h2 nhsuk-heading-l nhsuk-u-font-weight-bold nhsuk-u-margin-0">THE PLATFORM - ///<ol class [rest of string was truncated]";. - /// - internal static string TermsConditions { - get { - return ResourceManager.GetString("TermsConditions", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DROP VIEW AdminUsers - /// GO - ///DROP VIEW Candidates - /// GO - ///. - /// - internal static string UAR_831_CreateViewsForAdminUsersAndCandidatesTables_DOWN { - get { - return ResourceManager.GetString("UAR-831-CreateViewsForAdminUsersAndCandidatesTables-DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to CREATE VIEW AdminUsers AS - ///SELECT dbo.AdminAccounts.ID AS AdminID, - /// null AS Login, - /// dbo.Users.PasswordHash AS Password, - /// dbo.AdminAccounts.CentreID, - /// dbo.AdminAccounts.IsCentreAdmin AS CentreAdmin, - /// 0 AS ConfigAdmin, - /// dbo.AdminAccounts.IsReportsViewer AS SummaryReports, - /// dbo.AdminAccounts.IsSuperAdmin AS UserAdmin, - /// dbo.Us [rest of string was truncated]";. - /// - internal static string UAR_831_CreateViewsForAdminUsersAndCandidatesTables_UP { - get { - return ResourceManager.GetString("UAR-831-CreateViewsForAdminUsersAndCandidatesTables-UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DECLARE @dbName NVARCHAR(128) = DB_NAME() - ///DECLARE @defaultPath NVARCHAR(500) = CONVERT(NVARCHAR(500), SERVERPROPERTY('InstanceDefaultDataPath')) - ///DECLARE @snapshotTime NVARCHAR(12) = FORMAT(GETDATE(), 'yyyyMMddHHmm') - /// - ///DECLARE @snapSql NVARCHAR(4000) = 'CREATE DATABASE ' + @dbName + '_' + @snapshotTime + ' ON - ///( NAME = mbdbx101, FILENAME = ''' + @defaultPath + @dbName + '_' + @snapshotTime + '''), - ///( NAME = mbdbx101files, FILENAME = ''' + @defaultPath + @dbName + '_filestream1_' + @snapshotTime + ''') - ///A [rest of string was truncated]";. - /// - internal static string UAR_858_SnapshotData_UP { - get { - return ResourceManager.GetString("UAR_858_SnapshotData_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DECLARE @dbName NVARCHAR(128) = DB_NAME() - ///DECLARE @snapshotName NVARCHAR(128) = CONVERT(NVARCHAR(128), (SELECT TOP 1 name FROM sys.databases WHERE NAME LIKE @dbName + '_2%' ORDER BY create_date DESC)) - /// - ///DECLARE @adminSql NVARCHAR(4000) = 'UPDATE AdminAccounts - ///SET - /// Login_deprecated = snapAA.Login_deprecated, - /// Password_deprecated = snapAA.Password_deprecated, - /// CentreID = snapAA.CentreID, - /// IsCentreAdmin = snapAA.IsCentreAdmin, - /// ConfigAdmin_deprecated = snapAA.ConfigAdmin_deprecated, - /// [rest of string was truncated]";. - /// - internal static string UAR_859_PopulateUsersTableFromAccountsTables_DOWN { - get { - return ResourceManager.GetString("UAR_859_PopulateUsersTableFromAccountsTables_DOWN", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace DigitalLearningSolutions.Data.Migrations.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DigitalLearningSolutions.Data.Migrations.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/10/2020 + ///-- Description: Updates a customisation based on form values + ///-- V2 Adds @CCEmail + ///-- V3 Adds ApplyLPDefaultsToSelfEnrol + ///-- ============================================= + ///CREATE PROCEDURE [dbo].[UpdateCustomisation_V3] + /// -- Add the parameters for the stored procedure here + /// @CustomisationID As Int, + /// @Active as bit, + /// @CustomisationName as nvarcha [rest of string was truncated]";. + /// + internal static string ApplyLPDefaultsSPChanges { + get { + return ResourceManager.GetString("ApplyLPDefaultsSPChanges", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <div class=nhsuk-u-reading-width><h2>What are cookies?</h2><p>Cookies are files saved on your phone, tablet or computer when you visit a website.<p>They store information about how you use the website, such as the pages you visit.<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.<h2>How we use cookies</h2><p>We only use cookies to:<ul><li>make our website work<li>measure how you use our website, such as which links you click on (analytics cookies), if you give [rest of string was truncated]";. + /// + internal static string CookiePolicy { + get { + return ResourceManager.GetString("CookiePolicy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to -- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 04/01/2021 + ///-- Description: Reorders the FrameworkCompetencyGroups in a given Framework - moving the given group up or down. + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[ReorderFrameworkCompetencyGroup] + /// -- Add the parameters for the stored procedure here + /// @FrameworkCompetencyGroupID int, + /// @Direction nvarchar(4) = '', + /// @SingleStep bit + ///AS + ///BEGIN + /// -- SET NOCOUNT ON added [rest of string was truncated]";. + /// + internal static string CreateOrAlterReorderFrameworkCompetenciesAndGroupsSPs { + get { + return ResourceManager.GetString("CreateOrAlterReorderFrameworkCompetenciesAndGroupsSPs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertCustomisation_V3] Script Date: 20/11/2020 14:12:52 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 28 February 2020 + ///-- V2 Adds @CCCompletion field + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[InsertCustomisation_V3] + /// @Active as bit, + /// @ApplicationID as int, + /// @CentreID as int, + /// @CustomisationName as nvarch [rest of string was truncated]";. + /// + internal static string DLSV2_106_CreateOrAlterInsertCustomisation_V3 { + get { + return ResourceManager.GetString("DLSV2_106_CreateOrAlterInsertCustomisation_V3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertCustomisation_V3] Script Date: 20/11/2020 14:12:52 ******/ + ///DROP PROCEDURE [dbo].[InsertCustomisation_V3] + ///GO + /// + /// + ///. + /// + internal static string DLSV2_106_DropInsertCustomisation_V3 { + get { + return ResourceManager.GetString("DLSV2_106_DropInsertCustomisation_V3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 22/09/2020 09:22:43 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/09/2020 + ///-- Description: Returns user self assessment responses (AVG) for Filtered competency + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] + /// -- Add t [rest of string was truncated]";. + /// + internal static string DLSV2_133_AdjustScoresForFilteredSP { + get { + return ResourceManager.GetString("DLSV2_133_AdjustScoresForFilteredSP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 22/09/2020 09:22:43 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/09/2020 + ///-- Description: Returns user self assessment responses (AVG) for Filtered competency + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] + /// -- Add t [rest of string was truncated]";. + /// + internal static string DLSV2_133_UnAdjustScoresForFilteredSP { + get { + return ResourceManager.GetString("DLSV2_133_UnAdjustScoresForFilteredSP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: UserDefinedFunction [dbo].[GetSelfAssessmentSummaryForCandidate] Script Date: 28/01/2021 07:45:22 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///CREATE OR ALTER FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] + ///( + /// @CandidateID int, + /// @SelfAssessmentID int + ///) + ///RETURNS @ResTable TABLE + ///( + /// CompetencyGroupID int, + /// Confidence float, + /// Relevance float + ///) + /// + ///AS + ///BEGIN + ///INSERT INTO @ResTable + /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance + ///FROM [rest of string was truncated]";. + /// + internal static string DLSV2_153_DropFilteredFunctionTweak { + get { + return ResourceManager.GetString("DLSV2_153_DropFilteredFunctionTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + /// + ////****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 27/01/2021 16:01:15 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/09/2020 + ///-- Description: Returns user self assessment responses (AVG) for Filtered competency + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] + /// [rest of string was truncated]";. + /// + internal static string DLSV2_153_DropFilteredSPFixes { + get { + return ResourceManager.GetString("DLSV2_153_DropFilteredSPFixes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetSelfAssessmentSummaryForCandidate] Script Date: 28/01/2021 07:43:39 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///CREATE OR ALTER FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] + ///( + /// @CandidateID int, + /// @SelfAssessmentID int + ///) + ///RETURNS @ResTable TABLE + ///( + /// CompetencyGroupID int, + /// Confidence float, + /// Relevance float + ///) + /// + ///AS + ///BEGIN + ///INSERT INTO @ResTable + /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance + ///FROM (SELEC [rest of string was truncated]";. + /// + internal static string DLSV2_153_FilteredFunctionTweak { + get { + return ResourceManager.GetString("DLSV2_153_FilteredFunctionTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 27/01/2021 15:29:35 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/09/2020 + ///-- Description: Returns user self assessment responses (AVG) for Filtered competency + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] + /// -- Add [rest of string was truncated]";. + /// + internal static string DLSV2_153_FilteredSPFixes { + get { + return ResourceManager.GetString("DLSV2_153_FilteredSPFixes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertUpdateCustomisationTutorials] Script Date: 21/04/2021 16:16:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 02/03/2020 + ///-- Description: Updates or inserts a CustomisationTutorials record with new values + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[InsertUpdateCustomisationTutorials] + /// -- Add the parameters for the store [rest of string was truncated]";. + /// + internal static string dlsv2_172_fixcustomisationtutorialprogressissue_down { + get { + return ResourceManager.GetString("dlsv2_172_fixcustomisationtutorialprogressissue_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertUpdateCustomisationTutorials] Script Date: 21/04/2021 16:16:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 02/03/2020 + ///-- Description: Updates or inserts a CustomisationTutorials record with new values + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[InsertUpdateCustomisationTutorials] + /// -- Add the parameters for the store [rest of string was truncated]";. + /// + internal static string dlsv2_172_fixcustomisationtutorialprogressissue_up { + get { + return ResourceManager.GetString("dlsv2_172_fixcustomisationtutorialprogressissue_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 21/06/2021 08:36:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesForCandidate] + /// -- Add the parameters for the stored procedure here + /// [rest of string was truncated]";. + /// + internal static string DLSV2_236_GetCompletedCoursesTweak_DOWN { + get { + return ResourceManager.GetString("DLSV2_236_GetCompletedCoursesTweak_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 21/06/2021 08:36:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesForCan [rest of string was truncated]";. + /// + internal static string DLSV2_236_GetCompletedCoursesTweak_UP { + get { + return ResourceManager.GetString("DLSV2_236_GetCompletedCoursesTweak_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. + /// + internal static string DLSV2_237_GetActiveAvailableTweak_DOWN { + get { + return ResourceManager.GetString("DLSV2_237_GetActiveAvailableTweak_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. + /// + internal static string DLSV2_237_GetActiveAvailableTweak_UP { + get { + return ResourceManager.GetString("DLSV2_237_GetActiveAvailableTweak_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetLinkedFieldNameForCentreByID] Script Date: 16/07/2021 09:23:22 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 12/10/2018 + ///-- Description: Return the field name for centre group linked field ID + ///-- ============================================= + ///ALTER FUNCTION [dbo].[GetLinkedFieldNameForCentreByID] + ///( + /// -- Add the parameters for the function here + /// @ [rest of string was truncated]";. + /// + internal static string DLSV2_272_AlterGetLinkedFieldNameFunction_DOWN { + get { + return ResourceManager.GetString("DLSV2_272_AlterGetLinkedFieldNameFunction_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetLinkedFieldNameForCentreByID] Script Date: 16/07/2021 09:23:22 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 12/10/2018 + ///-- Description: Return the field name for centre group linked field ID + ///-- ============================================= + ///ALTER FUNCTION [dbo].[GetLinkedFieldNameForCentreByID] + ///( + /// -- Add the parameters for the function here + /// @ [rest of string was truncated]";. + /// + internal static string DLSV2_272_AlterGetLinkedFieldNameFunction_UP { + get { + return ResourceManager.GetString("DLSV2_272_AlterGetLinkedFieldNameFunction_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[ReorderFrameworkCompetency] Script Date: 15/10/2021 08:31:18 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15/10/2021 + ///-- Description: Reorders the CompetencyAssessmentQuestions - moving the given competency question up or down. + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[ReorderCompetencyAssessmentQuestion] + /// [rest of string was truncated]";. + /// + internal static string DLSV2_379_ReorderCompetencyAssessmentQuestionsSP { + get { + return ResourceManager.GetString("DLSV2_379_ReorderCompetencyAssessmentQuestionsSP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 29/09/2022 19:11:04 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Manish Agarwal + ///-- Create date: 26/09/2022 + ///-- Description: Returns active available customisations for centre v6 adds SelfAssessments. + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsFo [rest of string was truncated]";. + /// + internal static string DLSV2_581_GetActiveAvailableCustomisationsForCentreFiltered_V6 { + get { + return ResourceManager.GetString("DLSV2_581_GetActiveAvailableCustomisationsForCentreFiltered_V6", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to --DLSV2-95 Adds System Versioning to auditable tables (UP) + /// + ///--Frameworks table + ///ALTER TABLE Frameworks + /// ADD + /// SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START HIDDEN + /// CONSTRAINT DF_Frameworks_SysStart DEFAULT SYSUTCDATETIME() + /// , SysEndTime DATETIME2 GENERATED ALWAYS AS ROW END HIDDEN + /// CONSTRAINT DF_Frameworks_SysEnd DEFAULT CONVERT(DATETIME2, '9999-12-31 23:59:59.9999999'), + /// PERIOD FOR SYSTEM_TIME (SysStartTime, SysEndTime); + ///GO + /// + ///ALTER TABLE Framework [rest of string was truncated]";. + /// + internal static string DLSV2_95_AddSystemVersioning { + get { + return ResourceManager.GetString("DLSV2_95_AddSystemVersioning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to --DLSV2-95 Removes System Versioning to auditable tables (DOWN) + /// + /// + ///-- Remove versioning from FrameworkCompetencies table + ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = OFF); + ///DROP TABLE dbo.FrameworkCompetencies; + ///DROP TABLE dbo.FrameworkCompetenciesHistory; + ///GO + /// + ///-- Remove versioning from FrameworkCompetencyGroups table + ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = OFF); + ///DROP TABLE dbo.FrameworkCompetencyGroups; + ///DROP TABLE dbo.FrameworkCompetencyGroupsHistory; + ///GO + /// + ///-- [rest of string was truncated]";. + /// + internal static string DLSV2_95_RemoveSystemVersioning { + get { + return ResourceManager.GetString("DLSV2_95_RemoveSystemVersioning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 03/10/2022 06:00:00 ******/ + ///DROP PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] + ///GO + /// + ///. + /// + internal static string DropActiveAvailableV6 { + get { + return ResourceManager.GetString("DropActiveAvailableV6", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 䕓⁔乁䥓也䱕卌传ൎ䜊൏匊呅儠何䕔彄䑉久䥔䥆剅传ൎ䜊൏ഊⴊ‭㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽ഽⴊ‭畁桴牯ऺ䬉癥湩圠楨瑴歡牥਍ⴭ䌠敲瑡⁥慤整›㔱䘠扥畲牡⁹〲㈱਍ⴭ䐠獥牣灩楴湯ऺ牃慥整⁳桴⁥牐杯敲獳愠摮愠灳牐杯敲獳爠捥牯⁤潦⁲⁡敮⁷獵牥਍ⴭ删瑥牵獮ऺ〉㨠猠捵散獳‬牰杯敲獳挠敲瑡摥਍ⴭ†††ठㄉ㨠䘠楡敬⁤‭牰杯敲獳愠牬慥祤攠楸瑳൳ⴊ‭†††उ〱‰›慆汩摥ⴠ䌠湥牴䥥⁄湡⁤畃瑳浯獩瑡潩䥮⁄潤❮⁴慭捴൨ⴊ‭†††उ〱‱›慆汩摥ⴠ䌠湥牴䥥⁄湡⁤慃摮摩瑡䥥⁄潤❮⁴慭捴൨ഊⴊ‭㍖挠慨杮獥椠据畬敤ഺഊⴊ‭桃捥獫琠慨⁴硥獩楴杮瀠潲牧獥⁳慨湳琧戠敥敒潭敶⁤牯删晥敲桳摥戠晥牯⁥敲畴楲楮杮攠牲牯മⴊ‭摁獤瀠牡浡瑥牥⁳潦⁲湅潲汬敭瑮洠瑥潨⁤湡⁤摡業䑉਍ⴭ㴠㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽਍䱁䕔⁒剐䍏䑅剕⁅摛潢⹝畛灳牃慥整牐杯敲獳敒潣摲噟崳਍䀉慃摮摩瑡䥥⁄湩ⱴ਍䀉畃瑳浯獩瑡潩䥮⁄湩ⱴ਍䀉敃瑮敲䑉椠瑮ബऊ䕀牮汯浬湥䵴瑥潨䥤⁄湩ⱴ਍䀉湅潲汬摥祂摁業䥮⁄湩൴䄊൓䈊䝅义਍ⴉ‭䕓⁔低佃乕⁔乏愠摤摥琠牰癥湥⁴硥牴⁡敲畳瑬猠瑥⁳牦浯਍ⴉ‭湩整晲牥湩⁧楷桴匠䱅䍅⁔瑳瑡浥湥獴മऊ䕓⁔低佃乕⁔乏഻ऊⴭ਍ⴉ‭桔牥⁥牡⁥慶楲畯⁳桴湩獧琠 [rest of string was truncated]";. + /// + internal static string DropApplyLPDefaultsSPChanges { + get { + return ResourceManager.GetString("DropApplyLPDefaultsSPChanges", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ///DROP PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] + ///GO + ///DROP PROCEDURE [dbo].[GetFilteredProfileForCandidate] + ///GO + ///DROP FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] + ///GO + ///DROP FUNCTION [dbo].[GetFilteredAPISeniorityID] + ///GO + /// + /// + /// + /// + /// + ///. + /// + internal static string DropFilteredSPs { + get { + return ResourceManager.GetString("DropFilteredSPs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DROP PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] + ///GO. + /// + internal static string DropGetActiveAvailableV5 { + get { + return ResourceManager.GetString("DropGetActiveAvailableV5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[ReorderTutorial] Script Date: 04/01/2021 16:17:57 ******/ + ///DROP PROCEDURE [dbo].[ReorderFrameworkCompetency] + ///GO + ///DROP PROCEDURE [dbo].[ReorderFrameworkCompetencyGroup] + ///GO + /// + ///. + /// + internal static string DropReorderFrameworkCompetenciesAndGroupsSPs { + get { + return ResourceManager.GetString("DropReorderFrameworkCompetenciesAndGroupsSPs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ///CREATE FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] + ///( + /// @CandidateID int, + /// @SelfAssessmentID int + ///) + ///RETURNS @ResTable TABLE + ///( + /// CompetencyGroupID int, + /// Confidence float, + /// Relevance float + ///) + /// + ///AS + ///BEGIN + ///INSERT INTO @ResTable + /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance + ///FROM (SELECT comp.CompetencyGroupID, sar.AssessmentQuestionID, sar.Result*1.0 AS Result + /// FROM Competencies AS comp INNER JOIN + /// SelfAssessmentResults AS sar [rest of string was truncated]";. + /// + internal static string FilteredSPs { + get { + return ResourceManager.GetString("FilteredSPs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 14/10/2020 10:02:34 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///CREATE PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreF [rest of string was truncated]";. + /// + internal static string GetActiveAvailableV5 { + get { + return ResourceManager.GetString("GetActiveAvailableV5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. + /// + internal static string HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_DOWN { + get { + return ResourceManager.GetString("HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 17/11/2021 16:40:41 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. + /// + internal static string HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_UP { + get { + return ResourceManager.GetString("HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 24/01/2023 15:00:41 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for cate [rest of string was truncated]";. + /// + internal static string td_1043_getactivitiesforenrolment { + get { + return ResourceManager.GetString("td_1043_getactivitiesforenrolment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 24/01/2023 15:31:20 ******/ + ///DROP PROCEDURE [dbo].[GetActivitiesForDelegateEnrolment] + ///GO + /// + /// + ///. + /// + internal static string td_1043_getactivitiesforenrolment_down { + get { + return ResourceManager.GetString("td_1043_getactivitiesforenrolment_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: View [dbo].[Candidates] Script Date: 2/22/2023 09:29:54 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: + ///-- Modified date: 22/02/2023 + ///-- ============================================= + /// + ///ALTER VIEW [dbo].[Candidates] AS + ///SELECT dbo.DelegateAccounts.ID AS CandidateID, + /// dbo.DelegateAccounts.Active, + /// dbo.DelegateAccounts.CentreID, + /// dbo.Users.FirstName, + /// dbo.Users.LastName, + /// [rest of string was truncated]";. + /// + internal static string td_1131_alterviewcandidatesadduserid_down { + get { + return ResourceManager.GetString("td_1131_alterviewcandidatesadduserid_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: View [dbo].[Candidates] Script Date: 2/22/2023 09:29:54 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: + ///-- Modified date: 22/02/2023 + ///-- ============================================= + /// + ///ALTER VIEW [dbo].[Candidates] AS + ///SELECT dbo.DelegateAccounts.ID AS CandidateID, + /// dbo.DelegateAccounts.Active, + /// dbo.DelegateAccounts.CentreID, + /// dbo.Users.FirstName, + /// dbo.Users.LastName, + /// [rest of string was truncated]";. + /// + internal static string td_1131_alterviewcandidatesadduserid_up { + get { + return ResourceManager.GetString("td_1131_alterviewcandidatesadduserid_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to --TD-1220-AddSystemVersioning_SelfAssessmentResultSupervisorVerifications + ///--Add versioning in SelfAssessmentResultSupervisorVerifications table + ///ALTER TABLE SelfAssessmentResultSupervisorVerifications + /// ADD + /// SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START HIDDEN + /// CONSTRAINT DF_SelfAssessmentResultSupervisorVerifications_SysStart DEFAULT SYSUTCDATETIME() + /// , SysEndTime DATETIME2 GENERATED ALWAYS AS ROW END HIDDEN + /// CONSTRAINT DF_SelfAssessmentResultSupervisorVerif [rest of string was truncated]";. + /// + internal static string TD_1220_AddSystemVersioning_SelfAssessmentResultSupervisorVerifications { + get { + return ResourceManager.GetString("TD_1220_AddSystemVersioning_SelfAssessmentResultSupervisorVerifications", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to --TD-1220-AddSystemVersioning_SelfAssessmentResultSupervisorVerifications + ///-- Remove versioning from SelfAssessmentResultSupervisorVerifications table + ///ALTER TABLE SelfAssessmentResultSupervisorVerifications SET (SYSTEM_VERSIONING = OFF); + ///ALTER TABLE SelfAssessmentResultSupervisorVerifications DROP PERIOD FOR SYSTEM_TIME; + ///ALTER TABLE [dbo].SelfAssessmentResultSupervisorVerifications DROP CONSTRAINT [DF_SelfAssessmentResultSupervisorVerifications_SysEnd]; + ///ALTER TABLE [dbo].SelfAssessmentResultSupervisorVe [rest of string was truncated]";. + /// + internal static string TD_1220_RemoveSystemVersioning_SelfAssessmentResultSupervisorVerifications { + get { + return ResourceManager.GetString("TD_1220_RemoveSystemVersioning_SelfAssessmentResultSupervisorVerifications", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 22/05/2023 07:50:40 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string td_1610_update_getactivitiesfordelegateenrolment_proc_down { + get { + return ResourceManager.GetString("td_1610_update_getactivitiesfordelegateenrolment_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 19/05/2023 16:40:12 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string td_1610_update_getactivitiesfordelegateenrolment_proc_up { + get { + return ResourceManager.GetString("td_1610_update_getactivitiesfordelegateenrolment_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 01/06/2023 15:32:33 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ========= [rest of string was truncated]";. + /// + internal static string TD_1766_GetActivitiesForDelegateEnrolmentTweak { + get { + return ResourceManager.GetString("TD_1766_GetActivitiesForDelegateEnrolmentTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 01/06/2023 15:32:33 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ========= [rest of string was truncated]";. + /// + internal static string TD_1766_GetActivitiesForDelegateEnrolmentTweak_down { + get { + return ResourceManager.GetString("TD_1766_GetActivitiesForDelegateEnrolmentTweak_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 16/08/2023 12:17:34 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_1766_GetCompletedCoursesForCandidateTweak { + get { + return ResourceManager.GetString("TD_1766_GetCompletedCoursesForCandidateTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 16/08/2023 12:17:34 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_1766_GetCompletedCoursesForCandidateTweak_down { + get { + return ResourceManager.GetString("TD_1766_GetCompletedCoursesForCandidateTweak_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 26/06/2023 08:04:53 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROCEDU [rest of string was truncated]";. + /// + internal static string TD_1766_GetCurrentCoursesForCandidateTweak { + get { + return ResourceManager.GetString("TD_1766_GetCurrentCoursesForCandidateTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/06/2023 14:49:50 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROCEDURE [ [rest of string was truncated]";. + /// + internal static string TD_1766_GetCurrentCoursesForCandidateTweak_down { + get { + return ResourceManager.GetString("TD_1766_GetCurrentCoursesForCandidateTweak_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 16/06/2023 09:17:01 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the parameter [rest of string was truncated]";. + /// + internal static string TD_1913_AlterGroupCustomisation_Add_V2_DOWN { + get { + return ResourceManager.GetString("TD_1913_AlterGroupCustomisation_Add_V2_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 16/06/2023 09:17:01 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the parameter [rest of string was truncated]";. + /// + internal static string TD_1913_AlterGroupCustomisation_Add_V2_UP { + get { + return ResourceManager.GetString("TD_1913_AlterGroupCustomisation_Add_V2_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <div class=nhsuk-u-reading-width><h2>What are cookies?</h2><p>Cookies are files saved on your phone, tablet or computer when you visit a website.<p>They store information about how you use the website, such as the pages you visit.<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.<h2>How we use cookies</h2><p>We only use cookies to:<ul><li>make our website work<li>measure how you use our website, such as which links you click on (analytics cookies), if you give [rest of string was truncated]";. + /// + internal static string TD_1943_CookiePolicyContentHtmlOldRecord { + get { + return ResourceManager.GetString("TD_1943_CookiePolicyContentHtmlOldRecord", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <div class=nhsuk-u-reading-width> + ///<h2>What are cookies?</h2> + ///<p>Cookies are files saved on your phone, tablet or computer when you visit a website.</p> + ///<p>They store information about how you use the website, such as the pages you visit.</p> + ///<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.</p> + ///<h2>How we use cookies</h2><p>We only use cookies to:</p> + ///<ul> + ///<li>make our website work</li> + ///<li>measure how you use our website, such as which links you clic [rest of string was truncated]";. + /// + internal static string TD_1943_CookiesPolicy { + get { + return ResourceManager.GetString("TD_1943_CookiesPolicy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to -- Remove period field from FrameworkCompetencies table + ///ALTER TABLE FrameworkCompetencies ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); + ///GO + /// + ///-- Remove period field from FrameworkCompetencyGroups table + ///ALTER TABLE FrameworkCompetencyGroups ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); + ///GO + /// + ///-- Remove period field from Frameworks table + ///ALTER TABLE Frameworks ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); + ///GO + /// + ///-- Remove period field from Competencies table + ///ALTER TABL [rest of string was truncated]";. + /// + internal static string TD_2036_SwitchOffPeriodFields_DOWN { + get { + return ResourceManager.GetString("TD_2036_SwitchOffPeriodFields_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to -- Remove period field from FrameworkCompetencies table + ///ALTER TABLE FrameworkCompetencies DROP PERIOD FOR SYSTEM_TIME; + ///GO + /// + ///-- Remove period field from FrameworkCompetencyGroups table + ///ALTER TABLE FrameworkCompetencyGroups DROP PERIOD FOR SYSTEM_TIME; + ///GO + /// + ///-- Remove period field from Frameworks table + ///ALTER TABLE Frameworks DROP PERIOD FOR SYSTEM_TIME; + ///GO + /// + ///-- Remove period field from Competencies table + ///ALTER TABLE Competencies DROP PERIOD FOR SYSTEM_TIME; + ///GO + /// + ///-- Remove period field from Comp [rest of string was truncated]";. + /// + internal static string TD_2036_SwitchOffPeriodFields_UP { + get { + return ResourceManager.GetString("TD_2036_SwitchOffPeriodFields_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to -- Switch on versioning from FrameworkCompetencies table + ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworkCompetenciesHistory)); + ///GO + /// + ///-- Switch on versioning from FrameworkCompetencyGroups table + ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworkCompetencyGroupsHistory)); + ///GO + /// + ///-- Switch on versioning from Frameworks table + ///ALTER TABLE Frameworks SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworksHisto [rest of string was truncated]";. + /// + internal static string TD_2036_SwitchSystemVersioningOffAllTables_DOWN { + get { + return ResourceManager.GetString("TD_2036_SwitchSystemVersioningOffAllTables_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to -- Remove versioning from FrameworkCompetencies table + ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = OFF); + ///GO + /// + ///-- Remove versioning from FrameworkCompetencyGroups table + ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = OFF); + ///GO + /// + ///-- Remove versioning from Frameworks table + ///ALTER TABLE Frameworks SET (SYSTEM_VERSIONING = OFF); + ///GO + /// + ///-- Remove versioning from Competencies table + ///ALTER TABLE Competencies SET (SYSTEM_VERSIONING = OFF); + ///GO + /// + ///-- Remove versioning from Competency [rest of string was truncated]";. + /// + internal static string TD_2036_SwitchSystemVersioningOffAllTables_UP { + get { + return ResourceManager.GetString("TD_2036_SwitchSystemVersioningOffAllTables_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak { + get { + return ResourceManager.GetString("TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 09:33:56 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak_down { + get { + return ResourceManager.GetString("TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 03/07/2023 + ///-- Description: Populate the ReportSelfAssessmentActivityLog table with recent activity + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE PopulateReportSelfAssessmentActivityLog + /// + ///AS + ///BEGIN + /// -- SET NOCOUNT ON added to prevent extra result sets from + /// -- interfering with SELECT statements. + /// SET NOCOUNT ON; + /// + /// DECLARE @ [rest of string was truncated]";. + /// + internal static string TD_2117_CreatePopulateReportSelfAssessmentActivityLog_SP { + get { + return ResourceManager.GetString("TD_2117_CreatePopulateReportSelfAssessmentActivityLog_SP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspReturnSectionsForCandCust_V2] Script Date: 08/12/2023 13:33:59 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15/08/2013 + ///-- Description: Gets section table for learning menu + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspReturnSectionsForCandCust_V2] + /// -- Add the parameters for the stored procedure here + /// @ProgressID [rest of string was truncated]";. + /// + internal static string TD_2481_Update_uspReturnSectionsForCandCust_V2_down { + get { + return ResourceManager.GetString("TD_2481_Update_uspReturnSectionsForCandCust_V2_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspReturnSectionsForCandCust_V2] Script Date: 08/12/2023 13:33:59 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15/08/2013 + ///-- Description: Gets section table for learning menu + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspReturnSectionsForCandCust_V2] + /// -- Add the parameters for the stored procedure here + /// @ProgressID [rest of string was truncated]";. + /// + internal static string TD_2481_Update_uspReturnSectionsForCandCust_V2_up { + get { + return ResourceManager.GetString("TD_2481_Update_uspReturnSectionsForCandCust_V2_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak { + get { + return ResourceManager.GetString("TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak_down { + get { + return ResourceManager.GetString("TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: View [dbo].[AdminUsers] Script Date: 2/6/2023 22:11:41 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: + ///-- Modified date: 02/06/2023 + ///-- Description: Return the admin user details + ///-- ============================================= + /// + ///ALTER VIEW [dbo].[AdminUsers] AS + ///SELECT dbo.AdminAccounts.ID AS AdminID, + /// null AS Login, + /// dbo.Users.PasswordHas [rest of string was truncated]";. + /// + internal static string td_264_alterviewadminusersaddcentrename_down { + get { + return ResourceManager.GetString("td_264_alterviewadminusersaddcentrename_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: View [dbo].[AdminUsers] Script Date: 2/6/2023 22:11:41 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: + ///-- Modified date: 02/06/2023 + ///-- Description: Return the admin user details + ///-- ============================================= + /// + ///ALTER VIEW [dbo].[AdminUsers] AS + ///SELECT dbo.AdminAccounts.ID AS AdminID, + /// null AS Login, + /// dbo.Users.PasswordHas [rest of string was truncated]";. + /// + internal static string td_264_alterviewadminusersaddcentrename_up { + get { + return ResourceManager.GetString("td_264_alterviewadminusersaddcentrename_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 18/10/2023 08:05:27 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/12/2016 + ///-- Description: Checks if learner has progress record against customisation. + ///-- Returns: + ///-- 0: None + ///-- 1: Expired + ///-- 2: Complete + ///-- 3: Current + ///-- ============================================= + ///-- 18/09/2018 Adds return v [rest of string was truncated]";. + /// + internal static string TD_3000_CheckDelegateStatusForCustomisationFix_down { + get { + return ResourceManager.GetString("TD_3000_CheckDelegateStatusForCustomisationFix_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 17/10/2023 12:13:14 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/12/2016 + ///-- Description: Checks if learner has progress record against customisation. + ///-- Returns: + ///-- 0: None + ///-- 1: Expired + ///-- 2: Complete + ///-- 3: Current + ///-- ============================================= + ///-- 18/09/2018 Adds return v [rest of string was truncated]";. + /// + internal static string TD_3000_CheckDelegateStatusForCustomisationFix_up { + get { + return ResourceManager.GetString("TD_3000_CheckDelegateStatusForCustomisationFix_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns assessment results for a delegate + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] + /// @selfAssessmentId as Int = 0, + /// @delegateId as int = 0 + ///AS + ///BEGIN + /// + /// SET NOCOUNT ON; + /// + /// WITH LatestAssessmentResults AS + /// ( + /// SELECT + /// [rest of string was truncated]";. + /// + internal static string TD_3187_CreateGetAssessmentResultsByDelegate_SP { + get { + return ResourceManager.GetString("TD_3187_CreateGetAssessmentResultsByDelegate_SP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns candidate assessment results by candidateAssessmentId + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] + /// @candidateAssessmentId as Int = 0, + /// @adminId as int = 0, + /// @selfAssessmentResultId as int = NULL + ///AS + ///BEGIN + /// + /// SET NOCOUNT ON; + /// + /// WITH LatestAssessmentR [rest of string was truncated]";. + /// + internal static string TD_3187_CreateGetCandidateAssessmentResultsById_SP { + get { + return ResourceManager.GetString("TD_3187_CreateGetCandidateAssessmentResultsById_SP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendOneMonthSelfAssessmentTBCReminders] Script Date: 06/12/2023 15:54:40 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 29/11/2023 + ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[SendOneMonthSelfAssessmentTBCReminders] [rest of string was truncated]";. + /// + internal static string TD_3190_FixSelfAssessmentReminderQueriesSP_UP { + get { + return ResourceManager.GetString("TD_3190_FixSelfAssessmentReminderQueriesSP_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 29/11/2023 + ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[SendSelfAssessmentOverdueReminders] + /// -- Add the parameters for the stored procedure here + /// @EmailProfileName nvarchar(100), + /// @TestOnly bit + ///AS + ///BEGIN + /// -- [rest of string was truncated]";. + /// + internal static string TD_3190_SendOneMonthSelfAssessmentOverdueRemindersSP { + get { + return ResourceManager.GetString("TD_3190_SendOneMonthSelfAssessmentOverdueRemindersSP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 29/11/2023 + ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[SendOneMonthSelfAssessmentTBCReminders] + /// -- Add the parameters for the stored procedure here + /// @EmailProfileName nvarchar(100), + /// @TestOnly bit + ///AS + ///BEGIN + /// [rest of string was truncated]";. + /// + internal static string TD_3190_SendOneMonthSelfAssessmentTBCRemindersSP { + get { + return ResourceManager.GetString("TD_3190_SendOneMonthSelfAssessmentTBCRemindersSP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendExpiredTBCReminders] Script Date: 07/12/2023 08:03:01 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 17/08/2018 + ///-- Description: Uses DB mail to send reminders to delegates on courses with a TBC date within 1 month. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[SendExpiredTBCReminders] + /// -- Add the parameters for the stored p [rest of string was truncated]";. + /// + internal static string TD_3197_FixLinksInCourseReminderEmails_DOWN { + get { + return ResourceManager.GetString("TD_3197_FixLinksInCourseReminderEmails_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendExpiredTBCReminders] Script Date: 07/12/2023 08:03:01 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 17/08/2018 + ///-- Description: Uses DB mail to send reminders to delegates on courses with a TBC date within 1 month. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[SendExpiredTBCReminders] + /// -- Add the parameters for the stored p [rest of string was truncated]";. + /// + internal static string TD_3197_FixLinksInCourseReminderEmails_UP { + get { + return ResourceManager.GetString("TD_3197_FixLinksInCourseReminderEmails_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths] Script Date: 27/02/2024 10:27:26 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 23/10/2018 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and Cust [rest of string was truncated]";. + /// + internal static string TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Down { + get { + return ResourceManager.GetString("TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths] Script Date: 27/02/2024 10:27:26 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 23/10/2018 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and Cust [rest of string was truncated]";. + /// + internal static string TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Up { + get { + return ResourceManager.GetString("TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///CREATE TABLE [dbo].[deprecated_ApplicationGroups]( + /// [AppGroupID] [int] IDENTITY(1,1) NOT NULL, + /// [ApplicationGroup] [nvarchar](100) NOT NULL, + /// CONSTRAINT [PK_ApplicationGroups] PRIMARY KEY CLUSTERED + ///( + /// [AppGroupID] ASC + ///)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + ///) ON [PRIMARY] + ///GO + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///CREATE TABLE [dbo].[deprec [rest of string was truncated]";. + /// + internal static string TD_3629_DeleteDeprecatedTables_DOWN { + get { + return ResourceManager.GetString("TD_3629_DeleteDeprecatedTables_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER OFF + ///GO + ///CREATE PROCEDURE [dbo].[aspnet_AnyDataInTables_deprecated] + /// @TablesToCheck int + ///AS + ///BEGIN + /// -- Check Membership table if (@TablesToCheck & 1) is set + /// IF ((@TablesToCheck & 1) <> 0 AND + /// (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V')))) + /// BEGIN + /// IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Membership)) + /// BEGIN + /// SELECT N'aspnet_Membership' + /// RETU [rest of string was truncated]";. + /// + internal static string TD_3664_RestoreDroppedSPs { + get { + return ResourceManager.GetString("TD_3664_RestoreDroppedSPs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 16/05/2024 09:29:31 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/12/2016 + ///-- Description: Checks if learner has progress record against customisation. + ///-- Returns: + ///-- 0: None + ///-- 1: Expired + ///-- 2: Complete + ///-- 3: Current + ///-- ============================================= + ///-- 18/09/2018 Adds re [rest of string was truncated]";. + /// + internal static string TD_3671_Alter_CheckDelegateStatusForCustomisation_func_down { + get { + return ResourceManager.GetString("TD_3671_Alter_CheckDelegateStatusForCustomisation_func_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 09/05/2024 11:41:58 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/12/2016 + ///-- Description: Checks if learner has progress record against customisation. + ///-- Returns: + ///-- 0: None + ///-- 1: Expired + ///-- 2: Complete + ///-- 3: Current + ///-- ============================================= + ///-- 18/09/2018 Adds return [rest of string was truncated]";. + /// + internal static string TD_3671_Alter_CheckDelegateStatusForCustomisation_func_up { + get { + return ResourceManager.GetString("TD_3671_Alter_CheckDelegateStatusForCustomisation_func_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 16/05/2024 09:37:05 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROCEDURE [rest of string was truncated]";. + /// + internal static string TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_down { + get { + return ResourceManager.GetString("TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 08/05/2024 10:34:29 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROCEDURE [db [rest of string was truncated]";. + /// + internal static string TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_up { + get { + return ResourceManager.GetString("TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 09/04/2024 08:39:16 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_4015_Update_GetCompletedCoursesForCandidate_proc_down { + get { + return ResourceManager.GetString("TD_4015_Update_GetCompletedCoursesForCandidate_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 09/04/2024 08:39:16 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_4015_Update_GetCompletedCoursesForCandidate_proc_up { + get { + return ResourceManager.GetString("TD_4015_Update_GetCompletedCoursesForCandidate_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 12/07/2024 17:37:50 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the paramet [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_GroupCustomisation_Add_V2_Down { + get { + return ResourceManager.GetString("TD_4223_Alter_GroupCustomisation_Add_V2_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 12/07/2024 17:37:50 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the paramet [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_GroupCustomisation_Add_V2_Up { + get { + return ResourceManager.GetString("TD_4223_Alter_GroupCustomisation_Add_V2_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 27/06/2024 09:35:55 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15 February 2012 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and CustomisationID don [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_uspCreateProgressRecord_V3_Down { + get { + return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecord_V3_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 27/06/2024 09:35:33 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15 February 2012 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and CustomisationID d [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_uspCreateProgressRecord_V3_Up { + get { + return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecord_V3_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/06/2024 09:37:38 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 11/04/2019 + ///-- Description: Creates the Progress and aspProgress record for a new user with no return value + ///-- Returns: Nothing + /// + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down { + get { + return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/06/2024 09:38:12 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 11/04/2019 + ///-- Description: Creates the Progress and aspProgress record for a new user with no return value + ///-- Returns: Nothing + /// + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspCreate [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up { + get { + return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 20/08/2024 11:57:38 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ======= [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_down { + get { + return ResourceManager.GetString("TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 20/08/2024 11:57:38 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ======= [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_up { + get { + return ResourceManager.GetString("TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 20/08/2024 11:58:45 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCourses [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetCompletedCoursesForCandidate_proc_down { + get { + return ResourceManager.GetString("TD_4243_Alter_GetCompletedCoursesForCandidate_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 20/08/2024 11:58:45 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCourses [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetCompletedCoursesForCandidate_proc_up { + get { + return ResourceManager.GetString("TD_4243_Alter_GetCompletedCoursesForCandidate_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/07/2024 10:11:35 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROCEDU [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_down { + get { + return ResourceManager.GetString("TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + /// + ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/07/2024 10:11:35 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROC [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_up { + get { + return ResourceManager.GetString("TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 27/08/2024 14:41:29 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the paramet [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Down { + get { + return ResourceManager.GetString("TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 27/08/2024 14:41:29 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the paramet [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Up { + get { + return ResourceManager.GetString("TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 14/08/2024 14:46:35 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15 February 2012 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and CustomisationID don't [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_uspCreateProgressRecord_V3_Down { + get { + return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecord_V3_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 14/08/2024 14:46:35 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15 February 2012 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and CustomisationID don't [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_uspCreateProgressRecord_V3_Up { + get { + return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecord_V3_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/08/2024 15:06:49 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 11/04/2019 + ///-- Description: Creates the Progress and aspProgress record for a new user with no return value + ///-- Returns: Nothing + /// + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down { + get { + return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/08/2024 15:06:49 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 11/04/2019 + ///-- Description: Creates the Progress and aspProgress record for a new user with no return value + ///-- Returns: Nothing + /// + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up { + get { + return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 05/09/2024 16:24:49 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_4634_Alter_GetCompletedCoursesForCandidate_DOWN { + get { + return ResourceManager.GetString("TD_4634_Alter_GetCompletedCoursesForCandidate_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 05/09/2024 16:24:49 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_4634_Alter_GetCompletedCoursesForCandidate_UP { + get { + return ResourceManager.GetString("TD_4634_Alter_GetCompletedCoursesForCandidate_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetAssessmentResultsByDelegate] Script Date: 07/11/2024 21:36:58 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns assessment results for a delegate + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] + /// @selfAssessmentId as Int = 0, + /// @delegateId as int = 0 + ///AS + ///BEGIN [rest of string was truncated]";. + /// + internal static string TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN { + get { + return ResourceManager.GetString("TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetAssessmentResultsByDelegate] Script Date: 07/11/2024 21:36:58 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns assessment results for a delegate + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] + /// @selfAssessmentId as Int = 0, + /// @delegateId as int = 0 + ///AS + ///BEGIN [rest of string was truncated]";. + /// + internal static string TD_4950_Alter_GetAssessmentResultsByDelegate_UP { + get { + return ResourceManager.GetString("TD_4950_Alter_GetAssessmentResultsByDelegate_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to USE [mbdbx101_uar] + ///GO + ////****** Object: StoredProcedure [dbo].[GetCandidateAssessmentResultsById] Script Date: 14/11/2024 14:31:31 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns candidate assessment results by candidateAssessmentId + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] + /// @candidateAssessmen [rest of string was truncated]";. + /// + internal static string TD_4950_AlterGetCandidateAssessmentResultsById_DOWN { + get { + return ResourceManager.GetString("TD_4950_AlterGetCandidateAssessmentResultsById_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to USE [mbdbx101_uar] + ///GO + ////****** Object: StoredProcedure [dbo].[GetCandidateAssessmentResultsById] Script Date: 14/11/2024 14:31:31 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns candidate assessment results by candidateAssessmentId + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] + /// @candidateAssessmen [rest of string was truncated]";. + /// + internal static string TD_4950_AlterGetCandidateAssessmentResultsById_UP { + get { + return ResourceManager.GetString("TD_4950_AlterGetCandidateAssessmentResultsById_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetOtherCentresForSelfAssessment] Script Date: 12/11/2024 08:47:08 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/01/2024 + ///-- Description: Gets a comma separated list of other centres for a user self assessment + ///-- ============================================= + ///CREATE OR ALTER FUNCTION [dbo].[GetOtherCentresForSelfAssessment] + ///( + /// -- Add the para [rest of string was truncated]";. + /// + internal static string TD_4950_dboGetOtherCentresForSelfAssessmentCreateOrAlter { + get { + return ResourceManager.GetString("TD-4950-dboGetOtherCentresForSelfAssessmentCreateOrAlter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 29/09/2022 19:11:04 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Manish Agarwal + ///-- Create date: 26/09/2022 + ///-- Description: Returns active available customisations for centre v6 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFil [rest of string was truncated]";. + /// + internal static string TD_786_GetSelfRegisteredFlag_DOWN { + get { + return ResourceManager.GetString("TD-786-GetSelfRegisteredFlag_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 08/12/2022 13:00:15 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. + /// + internal static string TD_786_GetSelfRegisteredFlag_UP { + get { + return ResourceManager.GetString("TD-786-GetSelfRegisteredFlag_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <ol type=""1""><li><strong>About these terms and conditions</strong><ul data-list-level=""1""><li>It is your responsibility to ensure that you understand and comply with these terms and conditions. It ensures that:<ul data-list-level=""2""><li>You understand your responsibilities and what constitutes an abuse of the service</li><li>Computers and personal data are not put at risk</li></ul></li><li>If you have any questions about these terms and conditions, you should contact your Digital Learning Solutions c [rest of string was truncated]";. + /// + internal static string TermsAndConditionsOldrecord { + get { + return ResourceManager.GetString("TermsAndConditionsOldrecord", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <h1 class="policy-text-center">TERMS AND CONDITIONS</h1> + ///<h1 class="policy-text-center">PLEASE READ THESE TERMS AND CONDITIONS CAREFULLY BEFORE USING THE PLATFORM. YOUR ATTENTION IS PARTICULARLY DRAWN TO THE PROVISIONS OF CLAUSE 14 (OUR RESPONSIBILITY FOR LOSS OR DAMAGE SUFFERED BY YOU) AND CLAUSE 15 (INDEMNITIES).</h1> + ///<ol class="custom-ordered-list nhsuk-u-padding-left-0"> + /// + /// + ///<li class="h2 nhsuk-heading-l nhsuk-u-font-weight-bold nhsuk-u-margin-0">THE PLATFORM + ///<ol class [rest of string was truncated]";. + /// + internal static string TermsConditions { + get { + return ResourceManager.GetString("TermsConditions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DROP VIEW AdminUsers + /// GO + ///DROP VIEW Candidates + /// GO + ///. + /// + internal static string UAR_831_CreateViewsForAdminUsersAndCandidatesTables_DOWN { + get { + return ResourceManager.GetString("UAR-831-CreateViewsForAdminUsersAndCandidatesTables-DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CREATE VIEW AdminUsers AS + ///SELECT dbo.AdminAccounts.ID AS AdminID, + /// null AS Login, + /// dbo.Users.PasswordHash AS Password, + /// dbo.AdminAccounts.CentreID, + /// dbo.AdminAccounts.IsCentreAdmin AS CentreAdmin, + /// 0 AS ConfigAdmin, + /// dbo.AdminAccounts.IsReportsViewer AS SummaryReports, + /// dbo.AdminAccounts.IsSuperAdmin AS UserAdmin, + /// dbo.Us [rest of string was truncated]";. + /// + internal static string UAR_831_CreateViewsForAdminUsersAndCandidatesTables_UP { + get { + return ResourceManager.GetString("UAR-831-CreateViewsForAdminUsersAndCandidatesTables-UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DECLARE @dbName NVARCHAR(128) = DB_NAME() + ///DECLARE @defaultPath NVARCHAR(500) = CONVERT(NVARCHAR(500), SERVERPROPERTY('InstanceDefaultDataPath')) + ///DECLARE @snapshotTime NVARCHAR(12) = FORMAT(GETDATE(), 'yyyyMMddHHmm') + /// + ///DECLARE @snapSql NVARCHAR(4000) = 'CREATE DATABASE ' + @dbName + '_' + @snapshotTime + ' ON + ///( NAME = mbdbx101, FILENAME = ''' + @defaultPath + @dbName + '_' + @snapshotTime + '''), + ///( NAME = mbdbx101files, FILENAME = ''' + @defaultPath + @dbName + '_filestream1_' + @snapshotTime + ''') + ///A [rest of string was truncated]";. + /// + internal static string UAR_858_SnapshotData_UP { + get { + return ResourceManager.GetString("UAR_858_SnapshotData_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DECLARE @dbName NVARCHAR(128) = DB_NAME() + ///DECLARE @snapshotName NVARCHAR(128) = CONVERT(NVARCHAR(128), (SELECT TOP 1 name FROM sys.databases WHERE NAME LIKE @dbName + '_2%' ORDER BY create_date DESC)) + /// + ///DECLARE @adminSql NVARCHAR(4000) = 'UPDATE AdminAccounts + ///SET + /// Login_deprecated = snapAA.Login_deprecated, + /// Password_deprecated = snapAA.Password_deprecated, + /// CentreID = snapAA.CentreID, + /// IsCentreAdmin = snapAA.IsCentreAdmin, + /// ConfigAdmin_deprecated = snapAA.ConfigAdmin_deprecated, + /// [rest of string was truncated]";. + /// + internal static string UAR_859_PopulateUsersTableFromAccountsTables_DOWN { + get { + return ResourceManager.GetString("UAR_859_PopulateUsersTableFromAccountsTables_DOWN", resourceCulture); + } + } + } +} diff --git a/DigitalLearningSolutions.Data.Migrations/Properties/Resources.resx b/DigitalLearningSolutions.Data.Migrations/Properties/Resources.resx index 677aa02999..7265178a91 100644 --- a/DigitalLearningSolutions.Data.Migrations/Properties/Resources.resx +++ b/DigitalLearningSolutions.Data.Migrations/Properties/Resources.resx @@ -448,14 +448,14 @@ ..\Scripts\TD_4634_Alter_GetCompletedCoursesForCandidate_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 - - ..\Resources\TD-4950-dboGetOtherCentresForSelfAssessmentCreateOrAlter.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + ..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 - - ..\Scripts\TD-4878-Alter_GetActivitiesForDelegateEnrolment_Down.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 + + ..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 - - ..\Scripts\TD-4878-Alter_GetActivitiesForDelegateEnrolment_Up.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 + + ..\Resources\TD-4950-dboGetOtherCentresForSelfAssessmentCreateOrAlter.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 ..\Resources\TD-4950-AlterGetCandidateAssessmentResultsById_DOWN.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 @@ -463,10 +463,4 @@ ..\Resources\TD-4950-AlterGetCandidateAssessmentResultsById_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 - - ..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 - - - ..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 - \ No newline at end of file diff --git a/DigitalLearningSolutions.Data/DataServices/CourseDataService.cs b/DigitalLearningSolutions.Data/DataServices/CourseDataService.cs index 9f0ab58aec..364b640a95 100644 --- a/DigitalLearningSolutions.Data/DataServices/CourseDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/CourseDataService.cs @@ -542,7 +542,9 @@ LEFT OUTER JOIN UserCentreDetails AS UCD ON new { candidateAssessmentId, enrolmentMethodId, completeByDateDynamic } ); } + if (candidateAssessmentId > 1 && supervisorDelegateId !=0) + { string sqlQuery = $@" BEGIN TRANSACTION diff --git a/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs b/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs index e06de8deb1..2ed662f6f2 100644 --- a/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs @@ -35,7 +35,7 @@ public interface ISupervisorDataService CandidateAssessmentSupervisor? GetCandidateAssessmentSupervisor(int candidateAssessmentID, int supervisorDelegateId, int selfAssessmentSupervisorRoleId); SelfAssessmentResultSummary? GetSelfAssessmentResultSummary(int candidateAssessmentId, int supervisorDelegateId); IEnumerable GetCandidateAssessmentSupervisorVerificationSummaries(int candidateAssessmentId); - IEnumerable GetSupervisorForEnrolDelegate(int CentreID, int CategoryID); + IEnumerable GetSupervisorForEnrolDelegate(int CustomisationID, int CentreID); IEnumerable GetSupervisorDelegateDetailsForAdminIdWithoutRemovedClause(int adminId); SupervisorDelegateDetail GetSupervisorDelegateDetailsByIdWithoutRemoveClause(int supervisorDelegateId, int adminId, int delegateUserId); //UPDATE DATA @@ -218,6 +218,62 @@ LEFT OUTER JOIN AdminAccounts AS au2 ); } + public IEnumerable GetSupervisorDelegateDetailsForAdminIdWithoutRemovedClause(int adminId) + { + return connection.Query( + $@"SELECT sd.ID, + sd.SupervisorEmail, sd.SupervisorAdminID, sd.DelegateEmail, sd.DelegateUserID,da.Active, + sd.Added, sd.AddedByDelegate, sd.NotificationSent, sd.Removed, sd.InviteHash, + u.FirstName, u.LastName, u.ProfessionalRegistrationNumber, u.PrimaryEmail AS CandidateEmail, + jg.JobGroupName, + da.Answer1, da.Answer2, da.Answer3, da.Answer4, da.Answer5, da.Answer6, da.CandidateNumber, + cp1.CustomPrompt AS CustomPrompt1, cp2.CustomPrompt AS CustomPrompt2, + cp3.CustomPrompt AS CustomPrompt3, cp4.CustomPrompt AS CustomPrompt4, + cp5.CustomPrompt AS CustomPrompt5, cp6.CustomPrompt AS CustomPrompt6, + COALESCE (au.CentreID, da.CentreID) AS CentreID, + au.Forename + ' ' + au.Surname AS SupervisorName, + (SELECT COUNT(ca.ID) AS Expr1 + FROM CandidateAssessments AS ca LEFT JOIN + CandidateAssessmentSupervisors AS cas ON cas.CandidateAssessmentID = ca.ID AND cas.Removed IS NULL AND cas.SupervisorDelegateId = sd.ID INNER JOIN + SelfAssessments AS sa ON sa.ID = ca.SelfAssessmentID + WHERE (ca.RemovedDate IS NULL) AND (ca.DelegateUserID=sd.DelegateUserID) AND (cas.SupervisorDelegateId = sd.ID OR (cas.CandidateAssessmentID IS NULL) + AND ((sa.SupervisorSelfAssessmentReview = 1) OR (sa.SupervisorResultsReview = 1)))) AS CandidateAssessmentCount, + CAST(COALESCE (au2.IsNominatedSupervisor, 0) AS Bit) AS DelegateIsNominatedSupervisor, + CAST(COALESCE (au2.IsSupervisor, 0) AS Bit) AS DelegateIsSupervisor, + da.ID AS Expr1 + FROM CustomPrompts AS cp6 + RIGHT OUTER JOIN CustomPrompts AS cp5 + RIGHT OUTER JOIN DelegateAccounts AS da + RIGHT OUTER JOIN SupervisorDelegates AS sd + INNER JOIN AdminUsers AS au + ON sd.SupervisorAdminID = au.AdminID + INNER JOIN Centres AS ct + ON au.CentreID = ct.CentreID + ON da.CentreID = ct.CentreID + AND da.UserID = sd.DelegateUserID + LEFT OUTER JOIN Users AS u + LEFT OUTER JOIN JobGroups AS jg + ON u.JobGroupID = jg.JobGroupID + ON da.UserID = u.ID + LEFT OUTER JOIN CustomPrompts AS cp1 + ON ct.CustomField1PromptID = cp1.CustomPromptID + LEFT OUTER JOIN CustomPrompts AS cp2 + ON ct.CustomField2PromptID = cp2.CustomPromptID + LEFT OUTER JOIN CustomPrompts AS cp3 + ON ct.CustomField3PromptID = cp3.CustomPromptID + LEFT OUTER JOIN CustomPrompts AS cp4 + ON ct.CustomField4PromptID = cp4.CustomPromptID + ON cp5.CustomPromptID = ct.CustomField5PromptID + ON cp6.CustomPromptID = ct.CustomField6PromptID + LEFT OUTER JOIN AdminAccounts AS au2 + ON da.UserID = au2.UserID AND da.CentreID = au2.CentreID + WHERE (sd.SupervisorAdminID = @adminId) AND + (u.ID = da.UserID OR sd.DelegateUserID IS NULL) + ORDER BY u.LastName, COALESCE (u.FirstName, sd.DelegateEmail) + ", new { adminId } + ); + } + public IEnumerable GetSupervisorDelegateDetailsForAdminIdWithoutRemovedClause(int adminId) { return connection.Query( diff --git a/DigitalLearningSolutions.Web.Tests/Controllers/SupervisorController/SupervisorControllerTests.cs b/DigitalLearningSolutions.Web.Tests/Controllers/SupervisorController/SupervisorControllerTests.cs index 0581361535..0185928855 100644 --- a/DigitalLearningSolutions.Web.Tests/Controllers/SupervisorController/SupervisorControllerTests.cs +++ b/DigitalLearningSolutions.Web.Tests/Controllers/SupervisorController/SupervisorControllerTests.cs @@ -48,7 +48,6 @@ public class SupervisorControllerTests private ICandidateAssessmentDownloadFileService candidateAssessmentDownloadFileService = null!; private IPdfService pdfService = null!; private SupervisorController controller = null!; - private ICourseCategoriesService courseCategoriesService = null!; [SetUp] public void Setup() @@ -107,8 +106,7 @@ public void Setup() emailService, candidateAssessmentDownloadFileService, clockUtility, - pdfService, - courseCategoriesService + pdfService ); controller.ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { User = user } }; @@ -162,7 +160,6 @@ public void ReviewDelegateSelfAssessment_Should_Return_View_With_Optional_Compet // Given int candidateAssessmentId = 1; int supervisorDelegateId = 2; - int? adminIdCategoryId = 0; var superviseDelegate = SupervisorTagTestHelper.CreateDefaultSupervisorDelegateDetail(); var delegateSelfAssessment = SupervisorTagTestHelper.CreateDefaultDelegateSelfAssessment(); var appliedFilterViewModel = new List(); @@ -192,7 +189,7 @@ public void ReviewDelegateSelfAssessment_Should_Return_View_With_Optional_Compet A.CallTo(() => supervisorService.GetSupervisorDelegateDetailsById(supervisorDelegateId, AdminId, 0)) .Returns(superviseDelegate); - A.CallTo(() => supervisorService.GetSelfAssessmentByCandidateAssessmentId(candidateAssessmentId, AdminId, adminIdCategoryId)) + A.CallTo(() => supervisorService.GetSelfAssessmentByCandidateAssessmentId(candidateAssessmentId, AdminId)) .Returns(delegateSelfAssessment); A.CallTo(() => selfAssessmentService.GetMostRecentResults(SelfAssessmentId, DelegateUserId)) .Returns(competencies); @@ -218,7 +215,6 @@ public void ReviewDelegateSelfAssessment_Should_Return_View_With_Optional_Filter // Given int candidateAssessmentId = 1; int supervisorDelegateId = 2; - int? adminIdCategoryId = 0; var superviseDelegate = SupervisorTagTestHelper.CreateDefaultSupervisorDelegateDetail(); var delegateSelfAssessment = SupervisorTagTestHelper.CreateDefaultDelegateSelfAssessment(); SearchSupervisorCompetencyViewModel searchModel = null!; @@ -254,7 +250,7 @@ public void ReviewDelegateSelfAssessment_Should_Return_View_With_Optional_Filter A.CallTo(() => supervisorService.GetSupervisorDelegateDetailsById(supervisorDelegateId, AdminId, 0)) .Returns(superviseDelegate); - A.CallTo(() => supervisorService.GetSelfAssessmentByCandidateAssessmentId(candidateAssessmentId, AdminId, adminIdCategoryId)) + A.CallTo(() => supervisorService.GetSelfAssessmentByCandidateAssessmentId(candidateAssessmentId, AdminId)) .Returns(delegateSelfAssessment); A.CallTo(() => selfAssessmentService.GetMostRecentResults(SelfAssessmentId, DelegateUserId)) .Returns(competencies); diff --git a/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs b/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs index e051d12737..7424e62878 100644 --- a/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs +++ b/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs @@ -59,7 +59,7 @@ public IActionResult MyStaffList( var supervisorEmail = GetUserEmail(); var loggedInAdminUser = userService.GetAdminUserById(adminId); var centreRegistrationPrompts = centreRegistrationPromptsService.GetCentreRegistrationPromptsByCentreId(centreId); - var supervisorDelegateDetails = supervisorService.GetSupervisorDelegateDetailsForAdminId(adminId, loggedInAdminUser.CategoryId); + var supervisorDelegateDetails = supervisorService.GetSupervisorDelegateDetailsForAdminId(adminId); if (!supervisorDelegateDetails.Any()) { supervisorDelegateDetails = supervisorService.GetSupervisorDelegateDetailsForAdminIdWithoutRemovedClause(adminId); @@ -1440,7 +1440,7 @@ public async Task DownloadCertificate(int candidateAssessmentId) { return RedirectToAction("StatusCode", "LearningSolutions", new { code = 403 }); } - var supervisorDelegateDetails = supervisorService.GetSupervisorDelegateDetailsForAdminId(adminId.Value, loggedInAdminUser.CategoryId); + var supervisorDelegateDetails = supervisorService.GetSupervisorDelegateDetailsForAdminId(adminId.Value); var checkSupervisorDelegate = supervisorDelegateDetails.Where(x => x.DelegateUserID == competencymaindata.LearnerId).FirstOrDefault(); if (checkSupervisorDelegate == null) return RedirectToAction("StatusCode", "LearningSolutions", new { code = 403 }); var delegateUserId = competencymaindata.LearnerId; diff --git a/DigitalLearningSolutions.Web/Services/SupervisorService.cs b/DigitalLearningSolutions.Web/Services/SupervisorService.cs index a8afcff576..174c9ae778 100644 --- a/DigitalLearningSolutions.Web/Services/SupervisorService.cs +++ b/DigitalLearningSolutions.Web/Services/SupervisorService.cs @@ -32,10 +32,9 @@ public interface ISupervisorService CandidateAssessmentSupervisor? GetCandidateAssessmentSupervisor(int candidateAssessmentID, int supervisorDelegateId, int selfAssessmentSupervisorRoleId); SelfAssessmentResultSummary? GetSelfAssessmentResultSummary(int candidateAssessmentId, int supervisorDelegateId); IEnumerable GetCandidateAssessmentSupervisorVerificationSummaries(int candidateAssessmentId); - IEnumerable GetSupervisorForEnrolDelegate(int CentreID, int CategoryID); + IEnumerable GetSupervisorForEnrolDelegate(int CustomisationID, int CentreID); IEnumerable GetSupervisorDelegateDetailsForAdminIdWithoutRemovedClause(int adminId); SupervisorDelegateDetail GetSupervisorDelegateDetailsByIdWithoutRemoveClause(int supervisorDelegateId, int adminId, int delegateUserId); - //UPDATE DATA bool ConfirmSupervisorDelegateById(int supervisorDelegateId, int candidateId, int adminId); bool RemoveSupervisorDelegateById(int supervisorDelegateId, int delegateUserId, int adminId); From f4fa6d08a2dc35a6ce12ccc191947956b56dffb3 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 3 Dec 2024 08:42:27 +0000 Subject: [PATCH 003/271] Revert "Merge branch 'master' into Automatic_version_update_dependabot" This reverts commit 209b2b29fb0f50f574561edc426125f01b8a5cd4, reversing changes made to 66d3ff25ef2ec34ad03962723a7cb4c6597a5ed7. --- .../workflows/build-and-deploy-production.yml | 4 ++-- .github/workflows/build-and-deploy-uat.yml | 4 ++-- .../continuous-integration-workflow.yml | 4 ++-- ...pdateCandidateAssessmentSupervisorsTabl.cs | 21 +++++++++++++++++++ 4 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 DigitalLearningSolutions.Data.Migrations/202410071401_UpdateCandidateAssessmentSupervisorsTabl.cs diff --git a/.github/workflows/build-and-deploy-production.yml b/.github/workflows/build-and-deploy-production.yml index b1579fb2d1..38d34a51c2 100644 --- a/.github/workflows/build-and-deploy-production.yml +++ b/.github/workflows/build-and-deploy-production.yml @@ -19,10 +19,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup .NET Core SDK 8.0 + - name: Setup .NET Core SDK 6.0 uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 6.0.x - name: Setup node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/build-and-deploy-uat.yml b/.github/workflows/build-and-deploy-uat.yml index e06b88c727..9a82da00a9 100644 --- a/.github/workflows/build-and-deploy-uat.yml +++ b/.github/workflows/build-and-deploy-uat.yml @@ -22,10 +22,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup .NET Core SDK 8.0 + - name: Setup .NET Core SDK 6.0 uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 6.0.x - name: Setup node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 3b0ed25380..d0019ac854 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -12,10 +12,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup .NET Core SDK 8.0 + - name: Setup .NET Core SDK 6.0 uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 6.0.x - name: Add TechnologyEnhancedLearning as nuget package source run: dotnet nuget add source https://pkgs.dev.azure.com/e-LfH/_packaging/LearningHubFeed/nuget/v3/index.json --name TechnologyEnhancedLearning --username 'kevin.whittaker' --password ${{ secrets.AZURE_DEVOPS_PAT }} --store-password-in-clear-text diff --git a/DigitalLearningSolutions.Data.Migrations/202410071401_UpdateCandidateAssessmentSupervisorsTabl.cs b/DigitalLearningSolutions.Data.Migrations/202410071401_UpdateCandidateAssessmentSupervisorsTabl.cs new file mode 100644 index 0000000000..de95a04841 --- /dev/null +++ b/DigitalLearningSolutions.Data.Migrations/202410071401_UpdateCandidateAssessmentSupervisorsTabl.cs @@ -0,0 +1,21 @@ + +namespace DigitalLearningSolutions.Data.Migrations +{ + using FluentMigrator; + + [Migration(202410071401)] + public class UpdateCandidateAssessmentSupervisorsTabl : ForwardOnlyMigration + { + public override void Up() + { + Execute.Sql($@"UPDATE cas + SET SelfAssessmentSupervisorRoleID = (SELECT ID FROM SelfAssessmentSupervisorRoles + WHERE SelfAssessmentID = ssr.SelfAssessmentID and AllowDelegateNomination = 1) + FROM CandidateAssessmentSupervisors cas INNER JOIN + SelfAssessmentSupervisorRoles ssr ON cas.SelfAssessmentSupervisorRoleID = ssr.ID + AND cas.Removed IS NULL AND ssr.AllowDelegateNomination = 0 INNER JOIN + SupervisorDelegates sd ON cas.SupervisorDelegateId = sd.ID INNER JOIN + AdminAccounts aa ON sd.SupervisorAdminID = aa.ID WHERE aa.IsSupervisor = 0 AND aa.IsNominatedSupervisor = 1"); + } + } +} From c893b1071e9eb5da673b467802819a97117f73e0 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 3 Dec 2024 08:43:40 +0000 Subject: [PATCH 004/271] Revert "Squashed commit of the following:" This reverts commit 66d3ff25ef2ec34ad03962723a7cb4c6597a5ed7. --- .../Properties/Resources.Designer.cs | 5014 +++++++++-------- .../Properties/Resources.resx | 18 +- .../DataServices/CourseDataService.cs | 2 - .../DataServices/SupervisorDataService.cs | 58 +- .../SupervisorControllerTests.cs | 10 +- .../SupervisorController/Supervisor.cs | 4 +- .../Services/SupervisorService.cs | 3 +- 7 files changed, 2549 insertions(+), 2560 deletions(-) diff --git a/DigitalLearningSolutions.Data.Migrations/Properties/Resources.Designer.cs b/DigitalLearningSolutions.Data.Migrations/Properties/Resources.Designer.cs index 330a60292a..5b5d5f74dd 100644 --- a/DigitalLearningSolutions.Data.Migrations/Properties/Resources.Designer.cs +++ b/DigitalLearningSolutions.Data.Migrations/Properties/Resources.Designer.cs @@ -1,2489 +1,2525 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace DigitalLearningSolutions.Data.Migrations.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DigitalLearningSolutions.Data.Migrations.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/10/2020 - ///-- Description: Updates a customisation based on form values - ///-- V2 Adds @CCEmail - ///-- V3 Adds ApplyLPDefaultsToSelfEnrol - ///-- ============================================= - ///CREATE PROCEDURE [dbo].[UpdateCustomisation_V3] - /// -- Add the parameters for the stored procedure here - /// @CustomisationID As Int, - /// @Active as bit, - /// @CustomisationName as nvarcha [rest of string was truncated]";. - /// - internal static string ApplyLPDefaultsSPChanges { - get { - return ResourceManager.GetString("ApplyLPDefaultsSPChanges", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <div class=nhsuk-u-reading-width><h2>What are cookies?</h2><p>Cookies are files saved on your phone, tablet or computer when you visit a website.<p>They store information about how you use the website, such as the pages you visit.<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.<h2>How we use cookies</h2><p>We only use cookies to:<ul><li>make our website work<li>measure how you use our website, such as which links you click on (analytics cookies), if you give [rest of string was truncated]";. - /// - internal static string CookiePolicy { - get { - return ResourceManager.GetString("CookiePolicy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to -- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 04/01/2021 - ///-- Description: Reorders the FrameworkCompetencyGroups in a given Framework - moving the given group up or down. - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[ReorderFrameworkCompetencyGroup] - /// -- Add the parameters for the stored procedure here - /// @FrameworkCompetencyGroupID int, - /// @Direction nvarchar(4) = '', - /// @SingleStep bit - ///AS - ///BEGIN - /// -- SET NOCOUNT ON added [rest of string was truncated]";. - /// - internal static string CreateOrAlterReorderFrameworkCompetenciesAndGroupsSPs { - get { - return ResourceManager.GetString("CreateOrAlterReorderFrameworkCompetenciesAndGroupsSPs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertCustomisation_V3] Script Date: 20/11/2020 14:12:52 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 28 February 2020 - ///-- V2 Adds @CCCompletion field - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[InsertCustomisation_V3] - /// @Active as bit, - /// @ApplicationID as int, - /// @CentreID as int, - /// @CustomisationName as nvarch [rest of string was truncated]";. - /// - internal static string DLSV2_106_CreateOrAlterInsertCustomisation_V3 { - get { - return ResourceManager.GetString("DLSV2_106_CreateOrAlterInsertCustomisation_V3", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertCustomisation_V3] Script Date: 20/11/2020 14:12:52 ******/ - ///DROP PROCEDURE [dbo].[InsertCustomisation_V3] - ///GO - /// - /// - ///. - /// - internal static string DLSV2_106_DropInsertCustomisation_V3 { - get { - return ResourceManager.GetString("DLSV2_106_DropInsertCustomisation_V3", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 22/09/2020 09:22:43 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/09/2020 - ///-- Description: Returns user self assessment responses (AVG) for Filtered competency - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] - /// -- Add t [rest of string was truncated]";. - /// - internal static string DLSV2_133_AdjustScoresForFilteredSP { - get { - return ResourceManager.GetString("DLSV2_133_AdjustScoresForFilteredSP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 22/09/2020 09:22:43 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/09/2020 - ///-- Description: Returns user self assessment responses (AVG) for Filtered competency - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] - /// -- Add t [rest of string was truncated]";. - /// - internal static string DLSV2_133_UnAdjustScoresForFilteredSP { - get { - return ResourceManager.GetString("DLSV2_133_UnAdjustScoresForFilteredSP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: UserDefinedFunction [dbo].[GetSelfAssessmentSummaryForCandidate] Script Date: 28/01/2021 07:45:22 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///CREATE OR ALTER FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] - ///( - /// @CandidateID int, - /// @SelfAssessmentID int - ///) - ///RETURNS @ResTable TABLE - ///( - /// CompetencyGroupID int, - /// Confidence float, - /// Relevance float - ///) - /// - ///AS - ///BEGIN - ///INSERT INTO @ResTable - /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance - ///FROM [rest of string was truncated]";. - /// - internal static string DLSV2_153_DropFilteredFunctionTweak { - get { - return ResourceManager.GetString("DLSV2_153_DropFilteredFunctionTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - /// - ////****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 27/01/2021 16:01:15 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/09/2020 - ///-- Description: Returns user self assessment responses (AVG) for Filtered competency - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] - /// [rest of string was truncated]";. - /// - internal static string DLSV2_153_DropFilteredSPFixes { - get { - return ResourceManager.GetString("DLSV2_153_DropFilteredSPFixes", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetSelfAssessmentSummaryForCandidate] Script Date: 28/01/2021 07:43:39 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///CREATE OR ALTER FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] - ///( - /// @CandidateID int, - /// @SelfAssessmentID int - ///) - ///RETURNS @ResTable TABLE - ///( - /// CompetencyGroupID int, - /// Confidence float, - /// Relevance float - ///) - /// - ///AS - ///BEGIN - ///INSERT INTO @ResTable - /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance - ///FROM (SELEC [rest of string was truncated]";. - /// - internal static string DLSV2_153_FilteredFunctionTweak { - get { - return ResourceManager.GetString("DLSV2_153_FilteredFunctionTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 27/01/2021 15:29:35 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/09/2020 - ///-- Description: Returns user self assessment responses (AVG) for Filtered competency - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] - /// -- Add [rest of string was truncated]";. - /// - internal static string DLSV2_153_FilteredSPFixes { - get { - return ResourceManager.GetString("DLSV2_153_FilteredSPFixes", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertUpdateCustomisationTutorials] Script Date: 21/04/2021 16:16:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 02/03/2020 - ///-- Description: Updates or inserts a CustomisationTutorials record with new values - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[InsertUpdateCustomisationTutorials] - /// -- Add the parameters for the store [rest of string was truncated]";. - /// - internal static string dlsv2_172_fixcustomisationtutorialprogressissue_down { - get { - return ResourceManager.GetString("dlsv2_172_fixcustomisationtutorialprogressissue_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertUpdateCustomisationTutorials] Script Date: 21/04/2021 16:16:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 02/03/2020 - ///-- Description: Updates or inserts a CustomisationTutorials record with new values - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[InsertUpdateCustomisationTutorials] - /// -- Add the parameters for the store [rest of string was truncated]";. - /// - internal static string dlsv2_172_fixcustomisationtutorialprogressissue_up { - get { - return ResourceManager.GetString("dlsv2_172_fixcustomisationtutorialprogressissue_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 21/06/2021 08:36:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesForCandidate] - /// -- Add the parameters for the stored procedure here - /// [rest of string was truncated]";. - /// - internal static string DLSV2_236_GetCompletedCoursesTweak_DOWN { - get { - return ResourceManager.GetString("DLSV2_236_GetCompletedCoursesTweak_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 21/06/2021 08:36:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesForCan [rest of string was truncated]";. - /// - internal static string DLSV2_236_GetCompletedCoursesTweak_UP { - get { - return ResourceManager.GetString("DLSV2_236_GetCompletedCoursesTweak_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. - /// - internal static string DLSV2_237_GetActiveAvailableTweak_DOWN { - get { - return ResourceManager.GetString("DLSV2_237_GetActiveAvailableTweak_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. - /// - internal static string DLSV2_237_GetActiveAvailableTweak_UP { - get { - return ResourceManager.GetString("DLSV2_237_GetActiveAvailableTweak_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetLinkedFieldNameForCentreByID] Script Date: 16/07/2021 09:23:22 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 12/10/2018 - ///-- Description: Return the field name for centre group linked field ID - ///-- ============================================= - ///ALTER FUNCTION [dbo].[GetLinkedFieldNameForCentreByID] - ///( - /// -- Add the parameters for the function here - /// @ [rest of string was truncated]";. - /// - internal static string DLSV2_272_AlterGetLinkedFieldNameFunction_DOWN { - get { - return ResourceManager.GetString("DLSV2_272_AlterGetLinkedFieldNameFunction_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetLinkedFieldNameForCentreByID] Script Date: 16/07/2021 09:23:22 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 12/10/2018 - ///-- Description: Return the field name for centre group linked field ID - ///-- ============================================= - ///ALTER FUNCTION [dbo].[GetLinkedFieldNameForCentreByID] - ///( - /// -- Add the parameters for the function here - /// @ [rest of string was truncated]";. - /// - internal static string DLSV2_272_AlterGetLinkedFieldNameFunction_UP { - get { - return ResourceManager.GetString("DLSV2_272_AlterGetLinkedFieldNameFunction_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[ReorderFrameworkCompetency] Script Date: 15/10/2021 08:31:18 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15/10/2021 - ///-- Description: Reorders the CompetencyAssessmentQuestions - moving the given competency question up or down. - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[ReorderCompetencyAssessmentQuestion] - /// [rest of string was truncated]";. - /// - internal static string DLSV2_379_ReorderCompetencyAssessmentQuestionsSP { - get { - return ResourceManager.GetString("DLSV2_379_ReorderCompetencyAssessmentQuestionsSP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 29/09/2022 19:11:04 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Manish Agarwal - ///-- Create date: 26/09/2022 - ///-- Description: Returns active available customisations for centre v6 adds SelfAssessments. - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsFo [rest of string was truncated]";. - /// - internal static string DLSV2_581_GetActiveAvailableCustomisationsForCentreFiltered_V6 { - get { - return ResourceManager.GetString("DLSV2_581_GetActiveAvailableCustomisationsForCentreFiltered_V6", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to --DLSV2-95 Adds System Versioning to auditable tables (UP) - /// - ///--Frameworks table - ///ALTER TABLE Frameworks - /// ADD - /// SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START HIDDEN - /// CONSTRAINT DF_Frameworks_SysStart DEFAULT SYSUTCDATETIME() - /// , SysEndTime DATETIME2 GENERATED ALWAYS AS ROW END HIDDEN - /// CONSTRAINT DF_Frameworks_SysEnd DEFAULT CONVERT(DATETIME2, '9999-12-31 23:59:59.9999999'), - /// PERIOD FOR SYSTEM_TIME (SysStartTime, SysEndTime); - ///GO - /// - ///ALTER TABLE Framework [rest of string was truncated]";. - /// - internal static string DLSV2_95_AddSystemVersioning { - get { - return ResourceManager.GetString("DLSV2_95_AddSystemVersioning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to --DLSV2-95 Removes System Versioning to auditable tables (DOWN) - /// - /// - ///-- Remove versioning from FrameworkCompetencies table - ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = OFF); - ///DROP TABLE dbo.FrameworkCompetencies; - ///DROP TABLE dbo.FrameworkCompetenciesHistory; - ///GO - /// - ///-- Remove versioning from FrameworkCompetencyGroups table - ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = OFF); - ///DROP TABLE dbo.FrameworkCompetencyGroups; - ///DROP TABLE dbo.FrameworkCompetencyGroupsHistory; - ///GO - /// - ///-- [rest of string was truncated]";. - /// - internal static string DLSV2_95_RemoveSystemVersioning { - get { - return ResourceManager.GetString("DLSV2_95_RemoveSystemVersioning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 03/10/2022 06:00:00 ******/ - ///DROP PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] - ///GO - /// - ///. - /// - internal static string DropActiveAvailableV6 { - get { - return ResourceManager.GetString("DropActiveAvailableV6", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to 䕓⁔乁䥓也䱕卌传ൎ䜊൏匊呅儠何䕔彄䑉久䥔䥆剅传ൎ䜊൏ഊⴊ‭㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽ഽⴊ‭畁桴牯ऺ䬉癥湩圠楨瑴歡牥਍ⴭ䌠敲瑡⁥慤整›㔱䘠扥畲牡⁹〲㈱਍ⴭ䐠獥牣灩楴湯ऺ牃慥整⁳桴⁥牐杯敲獳愠摮愠灳牐杯敲獳爠捥牯⁤潦⁲⁡敮⁷獵牥਍ⴭ删瑥牵獮ऺ〉㨠猠捵散獳‬牰杯敲獳挠敲瑡摥਍ⴭ†††ठㄉ㨠䘠楡敬⁤‭牰杯敲獳愠牬慥祤攠楸瑳൳ⴊ‭†††उ〱‰›慆汩摥ⴠ䌠湥牴䥥⁄湡⁤畃瑳浯獩瑡潩䥮⁄潤❮⁴慭捴൨ⴊ‭†††उ〱‱›慆汩摥ⴠ䌠湥牴䥥⁄湡⁤慃摮摩瑡䥥⁄潤❮⁴慭捴൨ഊⴊ‭㍖挠慨杮獥椠据畬敤ഺഊⴊ‭桃捥獫琠慨⁴硥獩楴杮瀠潲牧獥⁳慨湳琧戠敥敒潭敶⁤牯删晥敲桳摥戠晥牯⁥敲畴楲楮杮攠牲牯മⴊ‭摁獤瀠牡浡瑥牥⁳潦⁲湅潲汬敭瑮洠瑥潨⁤湡⁤摡業䑉਍ⴭ㴠㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽਍䱁䕔⁒剐䍏䑅剕⁅摛潢⹝畛灳牃慥整牐杯敲獳敒潣摲噟崳਍䀉慃摮摩瑡䥥⁄湩ⱴ਍䀉畃瑳浯獩瑡潩䥮⁄湩ⱴ਍䀉敃瑮敲䑉椠瑮ബऊ䕀牮汯浬湥䵴瑥潨䥤⁄湩ⱴ਍䀉湅潲汬摥祂摁業䥮⁄湩൴䄊൓䈊䝅义਍ⴉ‭䕓⁔低佃乕⁔乏愠摤摥琠牰癥湥⁴硥牴⁡敲畳瑬猠瑥⁳牦浯਍ⴉ‭湩整晲牥湩⁧楷桴匠䱅䍅⁔瑳瑡浥湥獴മऊ䕓⁔低佃乕⁔乏഻ऊⴭ਍ⴉ‭桔牥⁥牡⁥慶楲畯⁳桴湩獧琠 [rest of string was truncated]";. - /// - internal static string DropApplyLPDefaultsSPChanges { - get { - return ResourceManager.GetString("DropApplyLPDefaultsSPChanges", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ///DROP PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] - ///GO - ///DROP PROCEDURE [dbo].[GetFilteredProfileForCandidate] - ///GO - ///DROP FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] - ///GO - ///DROP FUNCTION [dbo].[GetFilteredAPISeniorityID] - ///GO - /// - /// - /// - /// - /// - ///. - /// - internal static string DropFilteredSPs { - get { - return ResourceManager.GetString("DropFilteredSPs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DROP PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] - ///GO. - /// - internal static string DropGetActiveAvailableV5 { - get { - return ResourceManager.GetString("DropGetActiveAvailableV5", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[ReorderTutorial] Script Date: 04/01/2021 16:17:57 ******/ - ///DROP PROCEDURE [dbo].[ReorderFrameworkCompetency] - ///GO - ///DROP PROCEDURE [dbo].[ReorderFrameworkCompetencyGroup] - ///GO - /// - ///. - /// - internal static string DropReorderFrameworkCompetenciesAndGroupsSPs { - get { - return ResourceManager.GetString("DropReorderFrameworkCompetenciesAndGroupsSPs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ///CREATE FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] - ///( - /// @CandidateID int, - /// @SelfAssessmentID int - ///) - ///RETURNS @ResTable TABLE - ///( - /// CompetencyGroupID int, - /// Confidence float, - /// Relevance float - ///) - /// - ///AS - ///BEGIN - ///INSERT INTO @ResTable - /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance - ///FROM (SELECT comp.CompetencyGroupID, sar.AssessmentQuestionID, sar.Result*1.0 AS Result - /// FROM Competencies AS comp INNER JOIN - /// SelfAssessmentResults AS sar [rest of string was truncated]";. - /// - internal static string FilteredSPs { - get { - return ResourceManager.GetString("FilteredSPs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 14/10/2020 10:02:34 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///CREATE PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreF [rest of string was truncated]";. - /// - internal static string GetActiveAvailableV5 { - get { - return ResourceManager.GetString("GetActiveAvailableV5", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. - /// - internal static string HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_DOWN { - get { - return ResourceManager.GetString("HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 17/11/2021 16:40:41 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. - /// - internal static string HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_UP { - get { - return ResourceManager.GetString("HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 24/01/2023 15:00:41 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for cate [rest of string was truncated]";. - /// - internal static string td_1043_getactivitiesforenrolment { - get { - return ResourceManager.GetString("td_1043_getactivitiesforenrolment", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 24/01/2023 15:31:20 ******/ - ///DROP PROCEDURE [dbo].[GetActivitiesForDelegateEnrolment] - ///GO - /// - /// - ///. - /// - internal static string td_1043_getactivitiesforenrolment_down { - get { - return ResourceManager.GetString("td_1043_getactivitiesforenrolment_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: View [dbo].[Candidates] Script Date: 2/22/2023 09:29:54 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: - ///-- Modified date: 22/02/2023 - ///-- ============================================= - /// - ///ALTER VIEW [dbo].[Candidates] AS - ///SELECT dbo.DelegateAccounts.ID AS CandidateID, - /// dbo.DelegateAccounts.Active, - /// dbo.DelegateAccounts.CentreID, - /// dbo.Users.FirstName, - /// dbo.Users.LastName, - /// [rest of string was truncated]";. - /// - internal static string td_1131_alterviewcandidatesadduserid_down { - get { - return ResourceManager.GetString("td_1131_alterviewcandidatesadduserid_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: View [dbo].[Candidates] Script Date: 2/22/2023 09:29:54 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: - ///-- Modified date: 22/02/2023 - ///-- ============================================= - /// - ///ALTER VIEW [dbo].[Candidates] AS - ///SELECT dbo.DelegateAccounts.ID AS CandidateID, - /// dbo.DelegateAccounts.Active, - /// dbo.DelegateAccounts.CentreID, - /// dbo.Users.FirstName, - /// dbo.Users.LastName, - /// [rest of string was truncated]";. - /// - internal static string td_1131_alterviewcandidatesadduserid_up { - get { - return ResourceManager.GetString("td_1131_alterviewcandidatesadduserid_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to --TD-1220-AddSystemVersioning_SelfAssessmentResultSupervisorVerifications - ///--Add versioning in SelfAssessmentResultSupervisorVerifications table - ///ALTER TABLE SelfAssessmentResultSupervisorVerifications - /// ADD - /// SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START HIDDEN - /// CONSTRAINT DF_SelfAssessmentResultSupervisorVerifications_SysStart DEFAULT SYSUTCDATETIME() - /// , SysEndTime DATETIME2 GENERATED ALWAYS AS ROW END HIDDEN - /// CONSTRAINT DF_SelfAssessmentResultSupervisorVerif [rest of string was truncated]";. - /// - internal static string TD_1220_AddSystemVersioning_SelfAssessmentResultSupervisorVerifications { - get { - return ResourceManager.GetString("TD_1220_AddSystemVersioning_SelfAssessmentResultSupervisorVerifications", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to --TD-1220-AddSystemVersioning_SelfAssessmentResultSupervisorVerifications - ///-- Remove versioning from SelfAssessmentResultSupervisorVerifications table - ///ALTER TABLE SelfAssessmentResultSupervisorVerifications SET (SYSTEM_VERSIONING = OFF); - ///ALTER TABLE SelfAssessmentResultSupervisorVerifications DROP PERIOD FOR SYSTEM_TIME; - ///ALTER TABLE [dbo].SelfAssessmentResultSupervisorVerifications DROP CONSTRAINT [DF_SelfAssessmentResultSupervisorVerifications_SysEnd]; - ///ALTER TABLE [dbo].SelfAssessmentResultSupervisorVe [rest of string was truncated]";. - /// - internal static string TD_1220_RemoveSystemVersioning_SelfAssessmentResultSupervisorVerifications { - get { - return ResourceManager.GetString("TD_1220_RemoveSystemVersioning_SelfAssessmentResultSupervisorVerifications", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 22/05/2023 07:50:40 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string td_1610_update_getactivitiesfordelegateenrolment_proc_down { - get { - return ResourceManager.GetString("td_1610_update_getactivitiesfordelegateenrolment_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 19/05/2023 16:40:12 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string td_1610_update_getactivitiesfordelegateenrolment_proc_up { - get { - return ResourceManager.GetString("td_1610_update_getactivitiesfordelegateenrolment_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 01/06/2023 15:32:33 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ========= [rest of string was truncated]";. - /// - internal static string TD_1766_GetActivitiesForDelegateEnrolmentTweak { - get { - return ResourceManager.GetString("TD_1766_GetActivitiesForDelegateEnrolmentTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 01/06/2023 15:32:33 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ========= [rest of string was truncated]";. - /// - internal static string TD_1766_GetActivitiesForDelegateEnrolmentTweak_down { - get { - return ResourceManager.GetString("TD_1766_GetActivitiesForDelegateEnrolmentTweak_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 16/08/2023 12:17:34 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_1766_GetCompletedCoursesForCandidateTweak { - get { - return ResourceManager.GetString("TD_1766_GetCompletedCoursesForCandidateTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 16/08/2023 12:17:34 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_1766_GetCompletedCoursesForCandidateTweak_down { - get { - return ResourceManager.GetString("TD_1766_GetCompletedCoursesForCandidateTweak_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 26/06/2023 08:04:53 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROCEDU [rest of string was truncated]";. - /// - internal static string TD_1766_GetCurrentCoursesForCandidateTweak { - get { - return ResourceManager.GetString("TD_1766_GetCurrentCoursesForCandidateTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/06/2023 14:49:50 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROCEDURE [ [rest of string was truncated]";. - /// - internal static string TD_1766_GetCurrentCoursesForCandidateTweak_down { - get { - return ResourceManager.GetString("TD_1766_GetCurrentCoursesForCandidateTweak_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 16/06/2023 09:17:01 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the parameter [rest of string was truncated]";. - /// - internal static string TD_1913_AlterGroupCustomisation_Add_V2_DOWN { - get { - return ResourceManager.GetString("TD_1913_AlterGroupCustomisation_Add_V2_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 16/06/2023 09:17:01 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the parameter [rest of string was truncated]";. - /// - internal static string TD_1913_AlterGroupCustomisation_Add_V2_UP { - get { - return ResourceManager.GetString("TD_1913_AlterGroupCustomisation_Add_V2_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <div class=nhsuk-u-reading-width><h2>What are cookies?</h2><p>Cookies are files saved on your phone, tablet or computer when you visit a website.<p>They store information about how you use the website, such as the pages you visit.<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.<h2>How we use cookies</h2><p>We only use cookies to:<ul><li>make our website work<li>measure how you use our website, such as which links you click on (analytics cookies), if you give [rest of string was truncated]";. - /// - internal static string TD_1943_CookiePolicyContentHtmlOldRecord { - get { - return ResourceManager.GetString("TD_1943_CookiePolicyContentHtmlOldRecord", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <div class=nhsuk-u-reading-width> - ///<h2>What are cookies?</h2> - ///<p>Cookies are files saved on your phone, tablet or computer when you visit a website.</p> - ///<p>They store information about how you use the website, such as the pages you visit.</p> - ///<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.</p> - ///<h2>How we use cookies</h2><p>We only use cookies to:</p> - ///<ul> - ///<li>make our website work</li> - ///<li>measure how you use our website, such as which links you clic [rest of string was truncated]";. - /// - internal static string TD_1943_CookiesPolicy { - get { - return ResourceManager.GetString("TD_1943_CookiesPolicy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to -- Remove period field from FrameworkCompetencies table - ///ALTER TABLE FrameworkCompetencies ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); - ///GO - /// - ///-- Remove period field from FrameworkCompetencyGroups table - ///ALTER TABLE FrameworkCompetencyGroups ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); - ///GO - /// - ///-- Remove period field from Frameworks table - ///ALTER TABLE Frameworks ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); - ///GO - /// - ///-- Remove period field from Competencies table - ///ALTER TABL [rest of string was truncated]";. - /// - internal static string TD_2036_SwitchOffPeriodFields_DOWN { - get { - return ResourceManager.GetString("TD_2036_SwitchOffPeriodFields_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to -- Remove period field from FrameworkCompetencies table - ///ALTER TABLE FrameworkCompetencies DROP PERIOD FOR SYSTEM_TIME; - ///GO - /// - ///-- Remove period field from FrameworkCompetencyGroups table - ///ALTER TABLE FrameworkCompetencyGroups DROP PERIOD FOR SYSTEM_TIME; - ///GO - /// - ///-- Remove period field from Frameworks table - ///ALTER TABLE Frameworks DROP PERIOD FOR SYSTEM_TIME; - ///GO - /// - ///-- Remove period field from Competencies table - ///ALTER TABLE Competencies DROP PERIOD FOR SYSTEM_TIME; - ///GO - /// - ///-- Remove period field from Comp [rest of string was truncated]";. - /// - internal static string TD_2036_SwitchOffPeriodFields_UP { - get { - return ResourceManager.GetString("TD_2036_SwitchOffPeriodFields_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to -- Switch on versioning from FrameworkCompetencies table - ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworkCompetenciesHistory)); - ///GO - /// - ///-- Switch on versioning from FrameworkCompetencyGroups table - ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworkCompetencyGroupsHistory)); - ///GO - /// - ///-- Switch on versioning from Frameworks table - ///ALTER TABLE Frameworks SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworksHisto [rest of string was truncated]";. - /// - internal static string TD_2036_SwitchSystemVersioningOffAllTables_DOWN { - get { - return ResourceManager.GetString("TD_2036_SwitchSystemVersioningOffAllTables_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to -- Remove versioning from FrameworkCompetencies table - ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = OFF); - ///GO - /// - ///-- Remove versioning from FrameworkCompetencyGroups table - ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = OFF); - ///GO - /// - ///-- Remove versioning from Frameworks table - ///ALTER TABLE Frameworks SET (SYSTEM_VERSIONING = OFF); - ///GO - /// - ///-- Remove versioning from Competencies table - ///ALTER TABLE Competencies SET (SYSTEM_VERSIONING = OFF); - ///GO - /// - ///-- Remove versioning from Competency [rest of string was truncated]";. - /// - internal static string TD_2036_SwitchSystemVersioningOffAllTables_UP { - get { - return ResourceManager.GetString("TD_2036_SwitchSystemVersioningOffAllTables_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak { - get { - return ResourceManager.GetString("TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 09:33:56 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak_down { - get { - return ResourceManager.GetString("TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 03/07/2023 - ///-- Description: Populate the ReportSelfAssessmentActivityLog table with recent activity - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE PopulateReportSelfAssessmentActivityLog - /// - ///AS - ///BEGIN - /// -- SET NOCOUNT ON added to prevent extra result sets from - /// -- interfering with SELECT statements. - /// SET NOCOUNT ON; - /// - /// DECLARE @ [rest of string was truncated]";. - /// - internal static string TD_2117_CreatePopulateReportSelfAssessmentActivityLog_SP { - get { - return ResourceManager.GetString("TD_2117_CreatePopulateReportSelfAssessmentActivityLog_SP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspReturnSectionsForCandCust_V2] Script Date: 08/12/2023 13:33:59 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15/08/2013 - ///-- Description: Gets section table for learning menu - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspReturnSectionsForCandCust_V2] - /// -- Add the parameters for the stored procedure here - /// @ProgressID [rest of string was truncated]";. - /// - internal static string TD_2481_Update_uspReturnSectionsForCandCust_V2_down { - get { - return ResourceManager.GetString("TD_2481_Update_uspReturnSectionsForCandCust_V2_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspReturnSectionsForCandCust_V2] Script Date: 08/12/2023 13:33:59 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15/08/2013 - ///-- Description: Gets section table for learning menu - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspReturnSectionsForCandCust_V2] - /// -- Add the parameters for the stored procedure here - /// @ProgressID [rest of string was truncated]";. - /// - internal static string TD_2481_Update_uspReturnSectionsForCandCust_V2_up { - get { - return ResourceManager.GetString("TD_2481_Update_uspReturnSectionsForCandCust_V2_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak { - get { - return ResourceManager.GetString("TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ============= [rest of string was truncated]";. - /// - internal static string TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak_down { - get { - return ResourceManager.GetString("TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: View [dbo].[AdminUsers] Script Date: 2/6/2023 22:11:41 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: - ///-- Modified date: 02/06/2023 - ///-- Description: Return the admin user details - ///-- ============================================= - /// - ///ALTER VIEW [dbo].[AdminUsers] AS - ///SELECT dbo.AdminAccounts.ID AS AdminID, - /// null AS Login, - /// dbo.Users.PasswordHas [rest of string was truncated]";. - /// - internal static string td_264_alterviewadminusersaddcentrename_down { - get { - return ResourceManager.GetString("td_264_alterviewadminusersaddcentrename_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: View [dbo].[AdminUsers] Script Date: 2/6/2023 22:11:41 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: - ///-- Modified date: 02/06/2023 - ///-- Description: Return the admin user details - ///-- ============================================= - /// - ///ALTER VIEW [dbo].[AdminUsers] AS - ///SELECT dbo.AdminAccounts.ID AS AdminID, - /// null AS Login, - /// dbo.Users.PasswordHas [rest of string was truncated]";. - /// - internal static string td_264_alterviewadminusersaddcentrename_up { - get { - return ResourceManager.GetString("td_264_alterviewadminusersaddcentrename_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 18/10/2023 08:05:27 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/12/2016 - ///-- Description: Checks if learner has progress record against customisation. - ///-- Returns: - ///-- 0: None - ///-- 1: Expired - ///-- 2: Complete - ///-- 3: Current - ///-- ============================================= - ///-- 18/09/2018 Adds return v [rest of string was truncated]";. - /// - internal static string TD_3000_CheckDelegateStatusForCustomisationFix_down { - get { - return ResourceManager.GetString("TD_3000_CheckDelegateStatusForCustomisationFix_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 17/10/2023 12:13:14 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/12/2016 - ///-- Description: Checks if learner has progress record against customisation. - ///-- Returns: - ///-- 0: None - ///-- 1: Expired - ///-- 2: Complete - ///-- 3: Current - ///-- ============================================= - ///-- 18/09/2018 Adds return v [rest of string was truncated]";. - /// - internal static string TD_3000_CheckDelegateStatusForCustomisationFix_up { - get { - return ResourceManager.GetString("TD_3000_CheckDelegateStatusForCustomisationFix_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns assessment results for a delegate - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] - /// @selfAssessmentId as Int = 0, - /// @delegateId as int = 0 - ///AS - ///BEGIN - /// - /// SET NOCOUNT ON; - /// - /// WITH LatestAssessmentResults AS - /// ( - /// SELECT - /// [rest of string was truncated]";. - /// - internal static string TD_3187_CreateGetAssessmentResultsByDelegate_SP { - get { - return ResourceManager.GetString("TD_3187_CreateGetAssessmentResultsByDelegate_SP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns candidate assessment results by candidateAssessmentId - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] - /// @candidateAssessmentId as Int = 0, - /// @adminId as int = 0, - /// @selfAssessmentResultId as int = NULL - ///AS - ///BEGIN - /// - /// SET NOCOUNT ON; - /// - /// WITH LatestAssessmentR [rest of string was truncated]";. - /// - internal static string TD_3187_CreateGetCandidateAssessmentResultsById_SP { - get { - return ResourceManager.GetString("TD_3187_CreateGetCandidateAssessmentResultsById_SP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendOneMonthSelfAssessmentTBCReminders] Script Date: 06/12/2023 15:54:40 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 29/11/2023 - ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[SendOneMonthSelfAssessmentTBCReminders] [rest of string was truncated]";. - /// - internal static string TD_3190_FixSelfAssessmentReminderQueriesSP_UP { - get { - return ResourceManager.GetString("TD_3190_FixSelfAssessmentReminderQueriesSP_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 29/11/2023 - ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[SendSelfAssessmentOverdueReminders] - /// -- Add the parameters for the stored procedure here - /// @EmailProfileName nvarchar(100), - /// @TestOnly bit - ///AS - ///BEGIN - /// -- [rest of string was truncated]";. - /// - internal static string TD_3190_SendOneMonthSelfAssessmentOverdueRemindersSP { - get { - return ResourceManager.GetString("TD_3190_SendOneMonthSelfAssessmentOverdueRemindersSP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 29/11/2023 - ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. - ///-- ============================================= - ///CREATE OR ALTER PROCEDURE [dbo].[SendOneMonthSelfAssessmentTBCReminders] - /// -- Add the parameters for the stored procedure here - /// @EmailProfileName nvarchar(100), - /// @TestOnly bit - ///AS - ///BEGIN - /// [rest of string was truncated]";. - /// - internal static string TD_3190_SendOneMonthSelfAssessmentTBCRemindersSP { - get { - return ResourceManager.GetString("TD_3190_SendOneMonthSelfAssessmentTBCRemindersSP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendExpiredTBCReminders] Script Date: 07/12/2023 08:03:01 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 17/08/2018 - ///-- Description: Uses DB mail to send reminders to delegates on courses with a TBC date within 1 month. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[SendExpiredTBCReminders] - /// -- Add the parameters for the stored p [rest of string was truncated]";. - /// - internal static string TD_3197_FixLinksInCourseReminderEmails_DOWN { - get { - return ResourceManager.GetString("TD_3197_FixLinksInCourseReminderEmails_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendExpiredTBCReminders] Script Date: 07/12/2023 08:03:01 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 17/08/2018 - ///-- Description: Uses DB mail to send reminders to delegates on courses with a TBC date within 1 month. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[SendExpiredTBCReminders] - /// -- Add the parameters for the stored p [rest of string was truncated]";. - /// - internal static string TD_3197_FixLinksInCourseReminderEmails_UP { - get { - return ResourceManager.GetString("TD_3197_FixLinksInCourseReminderEmails_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths] Script Date: 27/02/2024 10:27:26 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 23/10/2018 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and Cust [rest of string was truncated]";. - /// - internal static string TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Down { - get { - return ResourceManager.GetString("TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths] Script Date: 27/02/2024 10:27:26 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 23/10/2018 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and Cust [rest of string was truncated]";. - /// - internal static string TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Up { - get { - return ResourceManager.GetString("TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///CREATE TABLE [dbo].[deprecated_ApplicationGroups]( - /// [AppGroupID] [int] IDENTITY(1,1) NOT NULL, - /// [ApplicationGroup] [nvarchar](100) NOT NULL, - /// CONSTRAINT [PK_ApplicationGroups] PRIMARY KEY CLUSTERED - ///( - /// [AppGroupID] ASC - ///)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - ///) ON [PRIMARY] - ///GO - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///CREATE TABLE [dbo].[deprec [rest of string was truncated]";. - /// - internal static string TD_3629_DeleteDeprecatedTables_DOWN { - get { - return ResourceManager.GetString("TD_3629_DeleteDeprecatedTables_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER OFF - ///GO - ///CREATE PROCEDURE [dbo].[aspnet_AnyDataInTables_deprecated] - /// @TablesToCheck int - ///AS - ///BEGIN - /// -- Check Membership table if (@TablesToCheck & 1) is set - /// IF ((@TablesToCheck & 1) <> 0 AND - /// (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V')))) - /// BEGIN - /// IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Membership)) - /// BEGIN - /// SELECT N'aspnet_Membership' - /// RETU [rest of string was truncated]";. - /// - internal static string TD_3664_RestoreDroppedSPs { - get { - return ResourceManager.GetString("TD_3664_RestoreDroppedSPs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 16/05/2024 09:29:31 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/12/2016 - ///-- Description: Checks if learner has progress record against customisation. - ///-- Returns: - ///-- 0: None - ///-- 1: Expired - ///-- 2: Complete - ///-- 3: Current - ///-- ============================================= - ///-- 18/09/2018 Adds re [rest of string was truncated]";. - /// - internal static string TD_3671_Alter_CheckDelegateStatusForCustomisation_func_down { - get { - return ResourceManager.GetString("TD_3671_Alter_CheckDelegateStatusForCustomisation_func_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 09/05/2024 11:41:58 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/12/2016 - ///-- Description: Checks if learner has progress record against customisation. - ///-- Returns: - ///-- 0: None - ///-- 1: Expired - ///-- 2: Complete - ///-- 3: Current - ///-- ============================================= - ///-- 18/09/2018 Adds return [rest of string was truncated]";. - /// - internal static string TD_3671_Alter_CheckDelegateStatusForCustomisation_func_up { - get { - return ResourceManager.GetString("TD_3671_Alter_CheckDelegateStatusForCustomisation_func_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 16/05/2024 09:37:05 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROCEDURE [rest of string was truncated]";. - /// - internal static string TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_down { - get { - return ResourceManager.GetString("TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 08/05/2024 10:34:29 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROCEDURE [db [rest of string was truncated]";. - /// - internal static string TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_up { - get { - return ResourceManager.GetString("TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 09/04/2024 08:39:16 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_4015_Update_GetCompletedCoursesForCandidate_proc_down { - get { - return ResourceManager.GetString("TD_4015_Update_GetCompletedCoursesForCandidate_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 09/04/2024 08:39:16 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_4015_Update_GetCompletedCoursesForCandidate_proc_up { - get { - return ResourceManager.GetString("TD_4015_Update_GetCompletedCoursesForCandidate_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 12/07/2024 17:37:50 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the paramet [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_GroupCustomisation_Add_V2_Down { - get { - return ResourceManager.GetString("TD_4223_Alter_GroupCustomisation_Add_V2_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 12/07/2024 17:37:50 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the paramet [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_GroupCustomisation_Add_V2_Up { - get { - return ResourceManager.GetString("TD_4223_Alter_GroupCustomisation_Add_V2_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 27/06/2024 09:35:55 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15 February 2012 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and CustomisationID don [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_uspCreateProgressRecord_V3_Down { - get { - return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecord_V3_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 27/06/2024 09:35:33 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15 February 2012 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and CustomisationID d [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_uspCreateProgressRecord_V3_Up { - get { - return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecord_V3_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/06/2024 09:37:38 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 11/04/2019 - ///-- Description: Creates the Progress and aspProgress record for a new user with no return value - ///-- Returns: Nothing - /// - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down { - get { - return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/06/2024 09:38:12 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 11/04/2019 - ///-- Description: Creates the Progress and aspProgress record for a new user with no return value - ///-- Returns: Nothing - /// - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspCreate [rest of string was truncated]";. - /// - internal static string TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up { - get { - return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 20/08/2024 11:57:38 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ======= [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_down { - get { - return ResourceManager.GetString("TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 20/08/2024 11:57:38 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 24/01/2023 - ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. - ///-- ======= [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_up { - get { - return ResourceManager.GetString("TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 20/08/2024 11:58:45 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCourses [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetCompletedCoursesForCandidate_proc_down { - get { - return ResourceManager.GetString("TD_4243_Alter_GetCompletedCoursesForCandidate_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 20/08/2024 11:58:45 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCourses [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetCompletedCoursesForCandidate_proc_up { - get { - return ResourceManager.GetString("TD_4243_Alter_GetCompletedCoursesForCandidate_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/07/2024 10:11:35 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROCEDU [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_down { - get { - return ResourceManager.GetString("TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - /// - ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/07/2024 10:11:35 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of active progress records for the candidate. - ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. - ///-- ============================================= - ///ALTER PROC [rest of string was truncated]";. - /// - internal static string TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_up { - get { - return ResourceManager.GetString("TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 27/08/2024 14:41:29 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the paramet [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Down { - get { - return ResourceManager.GetString("TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 27/08/2024 14:41:29 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/10/2018 - ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] - /// -- Add the paramet [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Up { - get { - return ResourceManager.GetString("TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 14/08/2024 14:46:35 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15 February 2012 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and CustomisationID don't [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_uspCreateProgressRecord_V3_Down { - get { - return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecord_V3_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 14/08/2024 14:46:35 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 15 February 2012 - ///-- Description: Creates the Progress and aspProgress record for a new user - ///-- Returns: 0 : success, progress created - ///-- 1 : Failed - progress already exists - ///-- 100 : Failed - CentreID and CustomisationID don't [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_uspCreateProgressRecord_V3_Up { - get { - return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecord_V3_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/08/2024 15:06:49 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 11/04/2019 - ///-- Description: Creates the Progress and aspProgress record for a new user with no return value - ///-- Returns: Nothing - /// - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down { - get { - return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/08/2024 15:06:49 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 11/04/2019 - ///-- Description: Creates the Progress and aspProgress record for a new user with no return value - ///-- Returns: Nothing - /// - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. - /// - internal static string TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up { - get { - return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 05/09/2024 16:24:49 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_4634_Alter_GetCompletedCoursesForCandidate_DOWN { - get { - return ResourceManager.GetString("TD_4634_Alter_GetCompletedCoursesForCandidate_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 05/09/2024 16:24:49 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 16/12/2016 - ///-- Description: Returns a list of completed courses for the candidate. - ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. - /// - internal static string TD_4634_Alter_GetCompletedCoursesForCandidate_UP { - get { - return ResourceManager.GetString("TD_4634_Alter_GetCompletedCoursesForCandidate_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetAssessmentResultsByDelegate] Script Date: 07/11/2024 21:36:58 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns assessment results for a delegate - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] - /// @selfAssessmentId as Int = 0, - /// @delegateId as int = 0 - ///AS - ///BEGIN [rest of string was truncated]";. - /// - internal static string TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN { - get { - return ResourceManager.GetString("TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetAssessmentResultsByDelegate] Script Date: 07/11/2024 21:36:58 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns assessment results for a delegate - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] - /// @selfAssessmentId as Int = 0, - /// @delegateId as int = 0 - ///AS - ///BEGIN [rest of string was truncated]";. - /// - internal static string TD_4950_Alter_GetAssessmentResultsByDelegate_UP { - get { - return ResourceManager.GetString("TD_4950_Alter_GetAssessmentResultsByDelegate_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to USE [mbdbx101_uar] - ///GO - ////****** Object: StoredProcedure [dbo].[GetCandidateAssessmentResultsById] Script Date: 14/11/2024 14:31:31 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns candidate assessment results by candidateAssessmentId - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] - /// @candidateAssessmen [rest of string was truncated]";. - /// - internal static string TD_4950_AlterGetCandidateAssessmentResultsById_DOWN { - get { - return ResourceManager.GetString("TD_4950_AlterGetCandidateAssessmentResultsById_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to USE [mbdbx101_uar] - ///GO - ////****** Object: StoredProcedure [dbo].[GetCandidateAssessmentResultsById] Script Date: 14/11/2024 14:31:31 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Auldrin Possa - ///-- Create date: 30/11/2023 - ///-- Description: Returns candidate assessment results by candidateAssessmentId - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] - /// @candidateAssessmen [rest of string was truncated]";. - /// - internal static string TD_4950_AlterGetCandidateAssessmentResultsById_UP { - get { - return ResourceManager.GetString("TD_4950_AlterGetCandidateAssessmentResultsById_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetOtherCentresForSelfAssessment] Script Date: 12/11/2024 08:47:08 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 22/01/2024 - ///-- Description: Gets a comma separated list of other centres for a user self assessment - ///-- ============================================= - ///CREATE OR ALTER FUNCTION [dbo].[GetOtherCentresForSelfAssessment] - ///( - /// -- Add the para [rest of string was truncated]";. - /// - internal static string TD_4950_dboGetOtherCentresForSelfAssessmentCreateOrAlter { - get { - return ResourceManager.GetString("TD-4950-dboGetOtherCentresForSelfAssessmentCreateOrAlter", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 29/09/2022 19:11:04 ******/ - ///SET ANSI_NULLS ON - ///GO - /// - ///SET QUOTED_IDENTIFIER ON - ///GO - /// - ///-- ============================================= - ///-- Author: Manish Agarwal - ///-- Create date: 26/09/2022 - ///-- Description: Returns active available customisations for centre v6 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFil [rest of string was truncated]";. - /// - internal static string TD_786_GetSelfRegisteredFlag_DOWN { - get { - return ResourceManager.GetString("TD-786-GetSelfRegisteredFlag_DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 08/12/2022 13:00:15 ******/ - ///SET ANSI_NULLS ON - ///GO - ///SET QUOTED_IDENTIFIER ON - ///GO - ///-- ============================================= - ///-- Author: Kevin Whittaker - ///-- Create date: 05/10/2020 - ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. - ///-- ============================================= - ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. - /// - internal static string TD_786_GetSelfRegisteredFlag_UP { - get { - return ResourceManager.GetString("TD-786-GetSelfRegisteredFlag_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <ol type=""1""><li><strong>About these terms and conditions</strong><ul data-list-level=""1""><li>It is your responsibility to ensure that you understand and comply with these terms and conditions. It ensures that:<ul data-list-level=""2""><li>You understand your responsibilities and what constitutes an abuse of the service</li><li>Computers and personal data are not put at risk</li></ul></li><li>If you have any questions about these terms and conditions, you should contact your Digital Learning Solutions c [rest of string was truncated]";. - /// - internal static string TermsAndConditionsOldrecord { - get { - return ResourceManager.GetString("TermsAndConditionsOldrecord", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <h1 class="policy-text-center">TERMS AND CONDITIONS</h1> - ///<h1 class="policy-text-center">PLEASE READ THESE TERMS AND CONDITIONS CAREFULLY BEFORE USING THE PLATFORM. YOUR ATTENTION IS PARTICULARLY DRAWN TO THE PROVISIONS OF CLAUSE 14 (OUR RESPONSIBILITY FOR LOSS OR DAMAGE SUFFERED BY YOU) AND CLAUSE 15 (INDEMNITIES).</h1> - ///<ol class="custom-ordered-list nhsuk-u-padding-left-0"> - /// - /// - ///<li class="h2 nhsuk-heading-l nhsuk-u-font-weight-bold nhsuk-u-margin-0">THE PLATFORM - ///<ol class [rest of string was truncated]";. - /// - internal static string TermsConditions { - get { - return ResourceManager.GetString("TermsConditions", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DROP VIEW AdminUsers - /// GO - ///DROP VIEW Candidates - /// GO - ///. - /// - internal static string UAR_831_CreateViewsForAdminUsersAndCandidatesTables_DOWN { - get { - return ResourceManager.GetString("UAR-831-CreateViewsForAdminUsersAndCandidatesTables-DOWN", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to CREATE VIEW AdminUsers AS - ///SELECT dbo.AdminAccounts.ID AS AdminID, - /// null AS Login, - /// dbo.Users.PasswordHash AS Password, - /// dbo.AdminAccounts.CentreID, - /// dbo.AdminAccounts.IsCentreAdmin AS CentreAdmin, - /// 0 AS ConfigAdmin, - /// dbo.AdminAccounts.IsReportsViewer AS SummaryReports, - /// dbo.AdminAccounts.IsSuperAdmin AS UserAdmin, - /// dbo.Us [rest of string was truncated]";. - /// - internal static string UAR_831_CreateViewsForAdminUsersAndCandidatesTables_UP { - get { - return ResourceManager.GetString("UAR-831-CreateViewsForAdminUsersAndCandidatesTables-UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DECLARE @dbName NVARCHAR(128) = DB_NAME() - ///DECLARE @defaultPath NVARCHAR(500) = CONVERT(NVARCHAR(500), SERVERPROPERTY('InstanceDefaultDataPath')) - ///DECLARE @snapshotTime NVARCHAR(12) = FORMAT(GETDATE(), 'yyyyMMddHHmm') - /// - ///DECLARE @snapSql NVARCHAR(4000) = 'CREATE DATABASE ' + @dbName + '_' + @snapshotTime + ' ON - ///( NAME = mbdbx101, FILENAME = ''' + @defaultPath + @dbName + '_' + @snapshotTime + '''), - ///( NAME = mbdbx101files, FILENAME = ''' + @defaultPath + @dbName + '_filestream1_' + @snapshotTime + ''') - ///A [rest of string was truncated]";. - /// - internal static string UAR_858_SnapshotData_UP { - get { - return ResourceManager.GetString("UAR_858_SnapshotData_UP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DECLARE @dbName NVARCHAR(128) = DB_NAME() - ///DECLARE @snapshotName NVARCHAR(128) = CONVERT(NVARCHAR(128), (SELECT TOP 1 name FROM sys.databases WHERE NAME LIKE @dbName + '_2%' ORDER BY create_date DESC)) - /// - ///DECLARE @adminSql NVARCHAR(4000) = 'UPDATE AdminAccounts - ///SET - /// Login_deprecated = snapAA.Login_deprecated, - /// Password_deprecated = snapAA.Password_deprecated, - /// CentreID = snapAA.CentreID, - /// IsCentreAdmin = snapAA.IsCentreAdmin, - /// ConfigAdmin_deprecated = snapAA.ConfigAdmin_deprecated, - /// [rest of string was truncated]";. - /// - internal static string UAR_859_PopulateUsersTableFromAccountsTables_DOWN { - get { - return ResourceManager.GetString("UAR_859_PopulateUsersTableFromAccountsTables_DOWN", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace DigitalLearningSolutions.Data.Migrations.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DigitalLearningSolutions.Data.Migrations.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/10/2020 + ///-- Description: Updates a customisation based on form values + ///-- V2 Adds @CCEmail + ///-- V3 Adds ApplyLPDefaultsToSelfEnrol + ///-- ============================================= + ///CREATE PROCEDURE [dbo].[UpdateCustomisation_V3] + /// -- Add the parameters for the stored procedure here + /// @CustomisationID As Int, + /// @Active as bit, + /// @CustomisationName as nvarcha [rest of string was truncated]";. + /// + internal static string ApplyLPDefaultsSPChanges { + get { + return ResourceManager.GetString("ApplyLPDefaultsSPChanges", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <div class=nhsuk-u-reading-width><h2>What are cookies?</h2><p>Cookies are files saved on your phone, tablet or computer when you visit a website.<p>They store information about how you use the website, such as the pages you visit.<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.<h2>How we use cookies</h2><p>We only use cookies to:<ul><li>make our website work<li>measure how you use our website, such as which links you click on (analytics cookies), if you give [rest of string was truncated]";. + /// + internal static string CookiePolicy { + get { + return ResourceManager.GetString("CookiePolicy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to -- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 04/01/2021 + ///-- Description: Reorders the FrameworkCompetencyGroups in a given Framework - moving the given group up or down. + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[ReorderFrameworkCompetencyGroup] + /// -- Add the parameters for the stored procedure here + /// @FrameworkCompetencyGroupID int, + /// @Direction nvarchar(4) = '', + /// @SingleStep bit + ///AS + ///BEGIN + /// -- SET NOCOUNT ON added [rest of string was truncated]";. + /// + internal static string CreateOrAlterReorderFrameworkCompetenciesAndGroupsSPs { + get { + return ResourceManager.GetString("CreateOrAlterReorderFrameworkCompetenciesAndGroupsSPs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertCustomisation_V3] Script Date: 20/11/2020 14:12:52 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 28 February 2020 + ///-- V2 Adds @CCCompletion field + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[InsertCustomisation_V3] + /// @Active as bit, + /// @ApplicationID as int, + /// @CentreID as int, + /// @CustomisationName as nvarch [rest of string was truncated]";. + /// + internal static string DLSV2_106_CreateOrAlterInsertCustomisation_V3 { + get { + return ResourceManager.GetString("DLSV2_106_CreateOrAlterInsertCustomisation_V3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertCustomisation_V3] Script Date: 20/11/2020 14:12:52 ******/ + ///DROP PROCEDURE [dbo].[InsertCustomisation_V3] + ///GO + /// + /// + ///. + /// + internal static string DLSV2_106_DropInsertCustomisation_V3 { + get { + return ResourceManager.GetString("DLSV2_106_DropInsertCustomisation_V3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 22/09/2020 09:22:43 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/09/2020 + ///-- Description: Returns user self assessment responses (AVG) for Filtered competency + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] + /// -- Add t [rest of string was truncated]";. + /// + internal static string DLSV2_133_AdjustScoresForFilteredSP { + get { + return ResourceManager.GetString("DLSV2_133_AdjustScoresForFilteredSP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 22/09/2020 09:22:43 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/09/2020 + ///-- Description: Returns user self assessment responses (AVG) for Filtered competency + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] + /// -- Add t [rest of string was truncated]";. + /// + internal static string DLSV2_133_UnAdjustScoresForFilteredSP { + get { + return ResourceManager.GetString("DLSV2_133_UnAdjustScoresForFilteredSP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: UserDefinedFunction [dbo].[GetSelfAssessmentSummaryForCandidate] Script Date: 28/01/2021 07:45:22 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///CREATE OR ALTER FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] + ///( + /// @CandidateID int, + /// @SelfAssessmentID int + ///) + ///RETURNS @ResTable TABLE + ///( + /// CompetencyGroupID int, + /// Confidence float, + /// Relevance float + ///) + /// + ///AS + ///BEGIN + ///INSERT INTO @ResTable + /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance + ///FROM [rest of string was truncated]";. + /// + internal static string DLSV2_153_DropFilteredFunctionTweak { + get { + return ResourceManager.GetString("DLSV2_153_DropFilteredFunctionTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + /// + ////****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 27/01/2021 16:01:15 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/09/2020 + ///-- Description: Returns user self assessment responses (AVG) for Filtered competency + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] + /// [rest of string was truncated]";. + /// + internal static string DLSV2_153_DropFilteredSPFixes { + get { + return ResourceManager.GetString("DLSV2_153_DropFilteredSPFixes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetSelfAssessmentSummaryForCandidate] Script Date: 28/01/2021 07:43:39 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///CREATE OR ALTER FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] + ///( + /// @CandidateID int, + /// @SelfAssessmentID int + ///) + ///RETURNS @ResTable TABLE + ///( + /// CompetencyGroupID int, + /// Confidence float, + /// Relevance float + ///) + /// + ///AS + ///BEGIN + ///INSERT INTO @ResTable + /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance + ///FROM (SELEC [rest of string was truncated]";. + /// + internal static string DLSV2_153_FilteredFunctionTweak { + get { + return ResourceManager.GetString("DLSV2_153_FilteredFunctionTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetFilteredCompetencyResponsesForCandidate] Script Date: 27/01/2021 15:29:35 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/09/2020 + ///-- Description: Returns user self assessment responses (AVG) for Filtered competency + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] + /// -- Add [rest of string was truncated]";. + /// + internal static string DLSV2_153_FilteredSPFixes { + get { + return ResourceManager.GetString("DLSV2_153_FilteredSPFixes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertUpdateCustomisationTutorials] Script Date: 21/04/2021 16:16:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 02/03/2020 + ///-- Description: Updates or inserts a CustomisationTutorials record with new values + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[InsertUpdateCustomisationTutorials] + /// -- Add the parameters for the store [rest of string was truncated]";. + /// + internal static string dlsv2_172_fixcustomisationtutorialprogressissue_down { + get { + return ResourceManager.GetString("dlsv2_172_fixcustomisationtutorialprogressissue_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[InsertUpdateCustomisationTutorials] Script Date: 21/04/2021 16:16:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 02/03/2020 + ///-- Description: Updates or inserts a CustomisationTutorials record with new values + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[InsertUpdateCustomisationTutorials] + /// -- Add the parameters for the store [rest of string was truncated]";. + /// + internal static string dlsv2_172_fixcustomisationtutorialprogressissue_up { + get { + return ResourceManager.GetString("dlsv2_172_fixcustomisationtutorialprogressissue_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 21/06/2021 08:36:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesForCandidate] + /// -- Add the parameters for the stored procedure here + /// [rest of string was truncated]";. + /// + internal static string DLSV2_236_GetCompletedCoursesTweak_DOWN { + get { + return ResourceManager.GetString("DLSV2_236_GetCompletedCoursesTweak_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 21/06/2021 08:36:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesForCan [rest of string was truncated]";. + /// + internal static string DLSV2_236_GetCompletedCoursesTweak_UP { + get { + return ResourceManager.GetString("DLSV2_236_GetCompletedCoursesTweak_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. + /// + internal static string DLSV2_237_GetActiveAvailableTweak_DOWN { + get { + return ResourceManager.GetString("DLSV2_237_GetActiveAvailableTweak_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. + /// + internal static string DLSV2_237_GetActiveAvailableTweak_UP { + get { + return ResourceManager.GetString("DLSV2_237_GetActiveAvailableTweak_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetLinkedFieldNameForCentreByID] Script Date: 16/07/2021 09:23:22 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 12/10/2018 + ///-- Description: Return the field name for centre group linked field ID + ///-- ============================================= + ///ALTER FUNCTION [dbo].[GetLinkedFieldNameForCentreByID] + ///( + /// -- Add the parameters for the function here + /// @ [rest of string was truncated]";. + /// + internal static string DLSV2_272_AlterGetLinkedFieldNameFunction_DOWN { + get { + return ResourceManager.GetString("DLSV2_272_AlterGetLinkedFieldNameFunction_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetLinkedFieldNameForCentreByID] Script Date: 16/07/2021 09:23:22 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 12/10/2018 + ///-- Description: Return the field name for centre group linked field ID + ///-- ============================================= + ///ALTER FUNCTION [dbo].[GetLinkedFieldNameForCentreByID] + ///( + /// -- Add the parameters for the function here + /// @ [rest of string was truncated]";. + /// + internal static string DLSV2_272_AlterGetLinkedFieldNameFunction_UP { + get { + return ResourceManager.GetString("DLSV2_272_AlterGetLinkedFieldNameFunction_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[ReorderFrameworkCompetency] Script Date: 15/10/2021 08:31:18 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15/10/2021 + ///-- Description: Reorders the CompetencyAssessmentQuestions - moving the given competency question up or down. + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[ReorderCompetencyAssessmentQuestion] /// [rest of string was truncated]";. + /// + internal static string DLSV2_379_ReorderCompetencyAssessmentQuestionsSP { + get { + return ResourceManager.GetString("DLSV2_379_ReorderCompetencyAssessmentQuestionsSP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 29/09/2022 19:11:04 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Manish Agarwal + ///-- Create date: 26/09/2022 + ///-- Description: Returns active available customisations for centre v6 adds SelfAssessments. + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsFo [rest of string was truncated]";. + /// + internal static string DLSV2_581_GetActiveAvailableCustomisationsForCentreFiltered_V6 { + get { + return ResourceManager.GetString("DLSV2_581_GetActiveAvailableCustomisationsForCentreFiltered_V6", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to --DLSV2-95 Adds System Versioning to auditable tables (UP) + /// + ///--Frameworks table + ///ALTER TABLE Frameworks + /// ADD + /// SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START HIDDEN + /// CONSTRAINT DF_Frameworks_SysStart DEFAULT SYSUTCDATETIME() + /// , SysEndTime DATETIME2 GENERATED ALWAYS AS ROW END HIDDEN + /// CONSTRAINT DF_Frameworks_SysEnd DEFAULT CONVERT(DATETIME2, '9999-12-31 23:59:59.9999999'), + /// PERIOD FOR SYSTEM_TIME (SysStartTime, SysEndTime); + ///GO + /// + ///ALTER TABLE Framework [rest of string was truncated]";. + /// + internal static string DLSV2_95_AddSystemVersioning { + get { + return ResourceManager.GetString("DLSV2_95_AddSystemVersioning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to --DLSV2-95 Removes System Versioning to auditable tables (DOWN) + /// + /// + ///-- Remove versioning from FrameworkCompetencies table + ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = OFF); + ///DROP TABLE dbo.FrameworkCompetencies; + ///DROP TABLE dbo.FrameworkCompetenciesHistory; + ///GO + /// + ///-- Remove versioning from FrameworkCompetencyGroups table + ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = OFF); + ///DROP TABLE dbo.FrameworkCompetencyGroups; + ///DROP TABLE dbo.FrameworkCompetencyGroupsHistory; + ///GO + /// + ///-- [rest of string was truncated]";. + /// + internal static string DLSV2_95_RemoveSystemVersioning { + get { + return ResourceManager.GetString("DLSV2_95_RemoveSystemVersioning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 03/10/2022 06:00:00 ******/ + ///DROP PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] + ///GO + /// + ///. + /// + internal static string DropActiveAvailableV6 { + get { + return ResourceManager.GetString("DropActiveAvailableV6", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 䕓⁔乁䥓也䱕卌传ൎ䜊൏匊呅儠何䕔彄䑉久䥔䥆剅传ൎ䜊൏ഊⴊ‭㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽ഽⴊ‭畁桴牯ऺ䬉癥湩圠楨瑴歡牥਍ⴭ䌠敲瑡⁥慤整›㔱䘠扥畲牡⁹〲㈱਍ⴭ䐠獥牣灩楴湯ऺ牃慥整⁳桴⁥牐杯敲獳愠摮愠灳牐杯敲獳爠捥牯⁤潦⁲⁡敮⁷獵牥਍ⴭ删瑥牵獮ऺ〉㨠猠捵散獳‬牰杯敲獳挠敲瑡摥਍ⴭ†††ठㄉ㨠䘠楡敬⁤‭牰杯敲獳愠牬慥祤攠楸瑳൳ⴊ‭†††उ〱‰›慆汩摥ⴠ䌠湥牴䥥⁄湡⁤畃瑳浯獩瑡潩䥮⁄潤❮⁴慭捴൨ⴊ‭†††उ〱‱›慆汩摥ⴠ䌠湥牴䥥⁄湡⁤慃摮摩瑡䥥⁄潤❮⁴慭捴൨ഊⴊ‭㍖挠慨杮獥椠据畬敤ഺഊⴊ‭桃捥獫琠慨⁴硥獩楴杮瀠潲牧獥⁳慨湳琧戠敥敒潭敶⁤牯删晥敲桳摥戠晥牯⁥敲畴楲楮杮攠牲牯മⴊ‭摁獤瀠牡浡瑥牥⁳潦⁲湅潲汬敭瑮洠瑥潨⁤湡⁤摡業䑉਍ⴭ㴠㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽㴽਍䱁䕔⁒剐䍏䑅剕⁅摛潢⹝畛灳牃慥整牐杯敲獳敒潣摲噟崳਍䀉慃摮摩瑡䥥⁄湩ⱴ਍䀉畃瑳浯獩瑡潩䥮⁄湩ⱴ਍䀉敃瑮敲䑉椠瑮ബऊ䕀牮汯浬湥䵴瑥潨䥤⁄湩ⱴ਍䀉湅潲汬摥祂摁業䥮⁄湩൴䄊൓䈊䝅义਍ⴉ‭䕓⁔低佃乕⁔乏愠摤摥琠牰癥湥⁴硥牴⁡敲畳瑬猠瑥⁳牦浯਍ⴉ‭湩整晲牥湩⁧楷桴匠䱅䍅⁔瑳瑡浥湥獴മऊ䕓⁔低佃乕⁔乏഻ऊⴭ਍ⴉ‭桔牥⁥牡⁥慶楲畯⁳桴湩獧琠 [rest of string was truncated]";. + /// + internal static string DropApplyLPDefaultsSPChanges { + get { + return ResourceManager.GetString("DropApplyLPDefaultsSPChanges", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ///DROP PROCEDURE [dbo].[GetFilteredCompetencyResponsesForCandidate] + ///GO + ///DROP PROCEDURE [dbo].[GetFilteredProfileForCandidate] + ///GO + ///DROP FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] + ///GO + ///DROP FUNCTION [dbo].[GetFilteredAPISeniorityID] + ///GO + /// + /// + /// + /// + /// + ///. + /// + internal static string DropFilteredSPs { + get { + return ResourceManager.GetString("DropFilteredSPs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DROP PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] + ///GO. + /// + internal static string DropGetActiveAvailableV5 { + get { + return ResourceManager.GetString("DropGetActiveAvailableV5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[ReorderTutorial] Script Date: 04/01/2021 16:17:57 ******/ + ///DROP PROCEDURE [dbo].[ReorderFrameworkCompetency] + ///GO + ///DROP PROCEDURE [dbo].[ReorderFrameworkCompetencyGroup] + ///GO + /// + ///. + /// + internal static string DropReorderFrameworkCompetenciesAndGroupsSPs { + get { + return ResourceManager.GetString("DropReorderFrameworkCompetenciesAndGroupsSPs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ///CREATE FUNCTION [dbo].[GetSelfAssessmentSummaryForCandidate] + ///( + /// @CandidateID int, + /// @SelfAssessmentID int + ///) + ///RETURNS @ResTable TABLE + ///( + /// CompetencyGroupID int, + /// Confidence float, + /// Relevance float + ///) + /// + ///AS + ///BEGIN + ///INSERT INTO @ResTable + /// SELECT CompetencyGroupID, [1] AS Confidence, [2] AS Relevance + ///FROM (SELECT comp.CompetencyGroupID, sar.AssessmentQuestionID, sar.Result*1.0 AS Result + /// FROM Competencies AS comp INNER JOIN + /// SelfAssessmentResults AS sar [rest of string was truncated]";. + /// + internal static string FilteredSPs { + get { + return ResourceManager.GetString("FilteredSPs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 14/10/2020 10:02:34 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///CREATE PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreF [rest of string was truncated]";. + /// + internal static string GetActiveAvailableV5 { + get { + return ResourceManager.GetString("GetActiveAvailableV5", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 22/06/2021 09:46:28 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. + /// + internal static string HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_DOWN { + get { + return ResourceManager.GetString("HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 17/11/2021 16:40:41 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. + /// + internal static string HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_UP { + get { + return ResourceManager.GetString("HEEDLS_667_GetActiveAvailableCustomisationsForCentreFiltered_V5_Signposting_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 24/01/2023 15:00:41 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for cate [rest of string was truncated]";. + /// + internal static string td_1043_getactivitiesforenrolment { + get { + return ResourceManager.GetString("td_1043_getactivitiesforenrolment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 24/01/2023 15:31:20 ******/ + ///DROP PROCEDURE [dbo].[GetActivitiesForDelegateEnrolment] + ///GO + /// + /// + ///. + /// + internal static string td_1043_getactivitiesforenrolment_down { + get { + return ResourceManager.GetString("td_1043_getactivitiesforenrolment_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: View [dbo].[Candidates] Script Date: 2/22/2023 09:29:54 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: + ///-- Modified date: 22/02/2023 + ///-- ============================================= + /// + ///ALTER VIEW [dbo].[Candidates] AS + ///SELECT dbo.DelegateAccounts.ID AS CandidateID, + /// dbo.DelegateAccounts.Active, + /// dbo.DelegateAccounts.CentreID, + /// dbo.Users.FirstName, + /// dbo.Users.LastName, + /// [rest of string was truncated]";. + /// + internal static string td_1131_alterviewcandidatesadduserid_down { + get { + return ResourceManager.GetString("td_1131_alterviewcandidatesadduserid_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: View [dbo].[Candidates] Script Date: 2/22/2023 09:29:54 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: + ///-- Modified date: 22/02/2023 + ///-- ============================================= + /// + ///ALTER VIEW [dbo].[Candidates] AS + ///SELECT dbo.DelegateAccounts.ID AS CandidateID, + /// dbo.DelegateAccounts.Active, + /// dbo.DelegateAccounts.CentreID, + /// dbo.Users.FirstName, + /// dbo.Users.LastName, + /// [rest of string was truncated]";. + /// + internal static string td_1131_alterviewcandidatesadduserid_up { + get { + return ResourceManager.GetString("td_1131_alterviewcandidatesadduserid_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to --TD-1220-AddSystemVersioning_SelfAssessmentResultSupervisorVerifications + ///--Add versioning in SelfAssessmentResultSupervisorVerifications table + ///ALTER TABLE SelfAssessmentResultSupervisorVerifications + /// ADD + /// SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START HIDDEN + /// CONSTRAINT DF_SelfAssessmentResultSupervisorVerifications_SysStart DEFAULT SYSUTCDATETIME() + /// , SysEndTime DATETIME2 GENERATED ALWAYS AS ROW END HIDDEN + /// CONSTRAINT DF_SelfAssessmentResultSupervisorVerif [rest of string was truncated]";. + /// + internal static string TD_1220_AddSystemVersioning_SelfAssessmentResultSupervisorVerifications { + get { + return ResourceManager.GetString("TD_1220_AddSystemVersioning_SelfAssessmentResultSupervisorVerifications", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to --TD-1220-AddSystemVersioning_SelfAssessmentResultSupervisorVerifications + ///-- Remove versioning from SelfAssessmentResultSupervisorVerifications table + ///ALTER TABLE SelfAssessmentResultSupervisorVerifications SET (SYSTEM_VERSIONING = OFF); + ///ALTER TABLE SelfAssessmentResultSupervisorVerifications DROP PERIOD FOR SYSTEM_TIME; + ///ALTER TABLE [dbo].SelfAssessmentResultSupervisorVerifications DROP CONSTRAINT [DF_SelfAssessmentResultSupervisorVerifications_SysEnd]; + ///ALTER TABLE [dbo].SelfAssessmentResultSupervisorVe [rest of string was truncated]";. + /// + internal static string TD_1220_RemoveSystemVersioning_SelfAssessmentResultSupervisorVerifications { + get { + return ResourceManager.GetString("TD_1220_RemoveSystemVersioning_SelfAssessmentResultSupervisorVerifications", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 22/05/2023 07:50:40 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string td_1610_update_getactivitiesfordelegateenrolment_proc_down { + get { + return ResourceManager.GetString("td_1610_update_getactivitiesfordelegateenrolment_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 19/05/2023 16:40:12 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string td_1610_update_getactivitiesfordelegateenrolment_proc_up { + get { + return ResourceManager.GetString("td_1610_update_getactivitiesfordelegateenrolment_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 01/06/2023 15:32:33 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ========= [rest of string was truncated]";. + /// + internal static string TD_1766_GetActivitiesForDelegateEnrolmentTweak { + get { + return ResourceManager.GetString("TD_1766_GetActivitiesForDelegateEnrolmentTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 01/06/2023 15:32:33 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ========= [rest of string was truncated]";. + /// + internal static string TD_1766_GetActivitiesForDelegateEnrolmentTweak_down { + get { + return ResourceManager.GetString("TD_1766_GetActivitiesForDelegateEnrolmentTweak_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 16/08/2023 12:17:34 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_1766_GetCompletedCoursesForCandidateTweak { + get { + return ResourceManager.GetString("TD_1766_GetCompletedCoursesForCandidateTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 16/08/2023 12:17:34 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_1766_GetCompletedCoursesForCandidateTweak_down { + get { + return ResourceManager.GetString("TD_1766_GetCompletedCoursesForCandidateTweak_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 26/06/2023 08:04:53 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROCEDU [rest of string was truncated]";. + /// + internal static string TD_1766_GetCurrentCoursesForCandidateTweak { + get { + return ResourceManager.GetString("TD_1766_GetCurrentCoursesForCandidateTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/06/2023 14:49:50 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROCEDURE [ [rest of string was truncated]";. + /// + internal static string TD_1766_GetCurrentCoursesForCandidateTweak_down { + get { + return ResourceManager.GetString("TD_1766_GetCurrentCoursesForCandidateTweak_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 16/06/2023 09:17:01 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the parameter [rest of string was truncated]";. + /// + internal static string TD_1913_AlterGroupCustomisation_Add_V2_DOWN { + get { + return ResourceManager.GetString("TD_1913_AlterGroupCustomisation_Add_V2_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 16/06/2023 09:17:01 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the parameter [rest of string was truncated]";. + /// + internal static string TD_1913_AlterGroupCustomisation_Add_V2_UP { + get { + return ResourceManager.GetString("TD_1913_AlterGroupCustomisation_Add_V2_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <div class=nhsuk-u-reading-width><h2>What are cookies?</h2><p>Cookies are files saved on your phone, tablet or computer when you visit a website.<p>They store information about how you use the website, such as the pages you visit.<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.<h2>How we use cookies</h2><p>We only use cookies to:<ul><li>make our website work<li>measure how you use our website, such as which links you click on (analytics cookies), if you give [rest of string was truncated]";. + /// + internal static string TD_1943_CookiePolicyContentHtmlOldRecord { + get { + return ResourceManager.GetString("TD_1943_CookiePolicyContentHtmlOldRecord", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <div class=nhsuk-u-reading-width> + ///<h2>What are cookies?</h2> + ///<p>Cookies are files saved on your phone, tablet or computer when you visit a website.</p> + ///<p>They store information about how you use the website, such as the pages you visit.</p> + ///<p>Cookies are not viruses or computer programs. They are very small so do not take up much space.</p> + ///<h2>How we use cookies</h2><p>We only use cookies to:</p> + ///<ul> + ///<li>make our website work</li> + ///<li>measure how you use our website, such as which links you clic [rest of string was truncated]";. + /// + internal static string TD_1943_CookiesPolicy { + get { + return ResourceManager.GetString("TD_1943_CookiesPolicy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to -- Remove period field from FrameworkCompetencies table + ///ALTER TABLE FrameworkCompetencies ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); + ///GO + /// + ///-- Remove period field from FrameworkCompetencyGroups table + ///ALTER TABLE FrameworkCompetencyGroups ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); + ///GO + /// + ///-- Remove period field from Frameworks table + ///ALTER TABLE Frameworks ADD PERIOD FOR SYSTEM_TIME ( SysStartTime, SysEndTime ); + ///GO + /// + ///-- Remove period field from Competencies table + ///ALTER TABL [rest of string was truncated]";. + /// + internal static string TD_2036_SwitchOffPeriodFields_DOWN { + get { + return ResourceManager.GetString("TD_2036_SwitchOffPeriodFields_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to -- Remove period field from FrameworkCompetencies table + ///ALTER TABLE FrameworkCompetencies DROP PERIOD FOR SYSTEM_TIME; + ///GO + /// + ///-- Remove period field from FrameworkCompetencyGroups table + ///ALTER TABLE FrameworkCompetencyGroups DROP PERIOD FOR SYSTEM_TIME; + ///GO + /// + ///-- Remove period field from Frameworks table + ///ALTER TABLE Frameworks DROP PERIOD FOR SYSTEM_TIME; + ///GO + /// + ///-- Remove period field from Competencies table + ///ALTER TABLE Competencies DROP PERIOD FOR SYSTEM_TIME; + ///GO + /// + ///-- Remove period field from Comp [rest of string was truncated]";. + /// + internal static string TD_2036_SwitchOffPeriodFields_UP { + get { + return ResourceManager.GetString("TD_2036_SwitchOffPeriodFields_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to -- Switch on versioning from FrameworkCompetencies table + ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworkCompetenciesHistory)); + ///GO + /// + ///-- Switch on versioning from FrameworkCompetencyGroups table + ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworkCompetencyGroupsHistory)); + ///GO + /// + ///-- Switch on versioning from Frameworks table + ///ALTER TABLE Frameworks SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].FrameworksHisto [rest of string was truncated]";. + /// + internal static string TD_2036_SwitchSystemVersioningOffAllTables_DOWN { + get { + return ResourceManager.GetString("TD_2036_SwitchSystemVersioningOffAllTables_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to -- Remove versioning from FrameworkCompetencies table + ///ALTER TABLE FrameworkCompetencies SET (SYSTEM_VERSIONING = OFF); + ///GO + /// + ///-- Remove versioning from FrameworkCompetencyGroups table + ///ALTER TABLE FrameworkCompetencyGroups SET (SYSTEM_VERSIONING = OFF); + ///GO + /// + ///-- Remove versioning from Frameworks table + ///ALTER TABLE Frameworks SET (SYSTEM_VERSIONING = OFF); + ///GO + /// + ///-- Remove versioning from Competencies table + ///ALTER TABLE Competencies SET (SYSTEM_VERSIONING = OFF); + ///GO + /// + ///-- Remove versioning from Competency [rest of string was truncated]";. + /// + internal static string TD_2036_SwitchSystemVersioningOffAllTables_UP { + get { + return ResourceManager.GetString("TD_2036_SwitchSystemVersioningOffAllTables_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak { + get { + return ResourceManager.GetString("TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 09:33:56 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak_down { + get { + return ResourceManager.GetString("TD_2094_GetActivitiesForDelegateEnrolmentDelegateStatusPropertyTweak_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 03/07/2023 + ///-- Description: Populate the ReportSelfAssessmentActivityLog table with recent activity + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE PopulateReportSelfAssessmentActivityLog + /// + ///AS + ///BEGIN + /// -- SET NOCOUNT ON added to prevent extra result sets from + /// -- interfering with SELECT statements. + /// SET NOCOUNT ON; + /// + /// DECLARE @ [rest of string was truncated]";. + /// + internal static string TD_2117_CreatePopulateReportSelfAssessmentActivityLog_SP { + get { + return ResourceManager.GetString("TD_2117_CreatePopulateReportSelfAssessmentActivityLog_SP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspReturnSectionsForCandCust_V2] Script Date: 08/12/2023 13:33:59 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15/08/2013 + ///-- Description: Gets section table for learning menu + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspReturnSectionsForCandCust_V2] + /// -- Add the parameters for the stored procedure here + /// @ProgressID [rest of string was truncated]";. + /// + internal static string TD_2481_Update_uspReturnSectionsForCandCust_V2_down { + get { + return ResourceManager.GetString("TD_2481_Update_uspReturnSectionsForCandCust_V2_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspReturnSectionsForCandCust_V2] Script Date: 08/12/2023 13:33:59 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15/08/2013 + ///-- Description: Gets section table for learning menu + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspReturnSectionsForCandCust_V2] + /// -- Add the parameters for the stored procedure here + /// @ProgressID [rest of string was truncated]";. + /// + internal static string TD_2481_Update_uspReturnSectionsForCandCust_V2_up { + get { + return ResourceManager.GetString("TD_2481_Update_uspReturnSectionsForCandCust_V2_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak { + get { + return ResourceManager.GetString("TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 05/07/2023 08:52:32 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ============= [rest of string was truncated]";. + /// + internal static string TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak_down { + get { + return ResourceManager.GetString("TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: View [dbo].[AdminUsers] Script Date: 2/6/2023 22:11:41 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: + ///-- Modified date: 02/06/2023 + ///-- Description: Return the admin user details + ///-- ============================================= + /// + ///ALTER VIEW [dbo].[AdminUsers] AS + ///SELECT dbo.AdminAccounts.ID AS AdminID, + /// null AS Login, + /// dbo.Users.PasswordHas [rest of string was truncated]";. + /// + internal static string td_264_alterviewadminusersaddcentrename_down { + get { + return ResourceManager.GetString("td_264_alterviewadminusersaddcentrename_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: View [dbo].[AdminUsers] Script Date: 2/6/2023 22:11:41 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: + ///-- Modified date: 02/06/2023 + ///-- Description: Return the admin user details + ///-- ============================================= + /// + ///ALTER VIEW [dbo].[AdminUsers] AS + ///SELECT dbo.AdminAccounts.ID AS AdminID, + /// null AS Login, + /// dbo.Users.PasswordHas [rest of string was truncated]";. + /// + internal static string td_264_alterviewadminusersaddcentrename_up { + get { + return ResourceManager.GetString("td_264_alterviewadminusersaddcentrename_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 18/10/2023 08:05:27 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/12/2016 + ///-- Description: Checks if learner has progress record against customisation. + ///-- Returns: + ///-- 0: None + ///-- 1: Expired + ///-- 2: Complete + ///-- 3: Current + ///-- ============================================= + ///-- 18/09/2018 Adds return v [rest of string was truncated]";. + /// + internal static string TD_3000_CheckDelegateStatusForCustomisationFix_down { + get { + return ResourceManager.GetString("TD_3000_CheckDelegateStatusForCustomisationFix_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 17/10/2023 12:13:14 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/12/2016 + ///-- Description: Checks if learner has progress record against customisation. + ///-- Returns: + ///-- 0: None + ///-- 1: Expired + ///-- 2: Complete + ///-- 3: Current + ///-- ============================================= + ///-- 18/09/2018 Adds return v [rest of string was truncated]";. + /// + internal static string TD_3000_CheckDelegateStatusForCustomisationFix_up { + get { + return ResourceManager.GetString("TD_3000_CheckDelegateStatusForCustomisationFix_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns assessment results for a delegate + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] + /// @selfAssessmentId as Int = 0, + /// @delegateId as int = 0 + ///AS + ///BEGIN + /// + /// SET NOCOUNT ON; + /// + /// WITH LatestAssessmentResults AS + /// ( + /// SELECT + /// [rest of string was truncated]";. + /// + internal static string TD_3187_CreateGetAssessmentResultsByDelegate_SP { + get { + return ResourceManager.GetString("TD_3187_CreateGetAssessmentResultsByDelegate_SP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns candidate assessment results by candidateAssessmentId + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] + /// @candidateAssessmentId as Int = 0, + /// @adminId as int = 0, + /// @selfAssessmentResultId as int = NULL + ///AS + ///BEGIN + /// + /// SET NOCOUNT ON; + /// + /// WITH LatestAssessmentR [rest of string was truncated]";. + /// + internal static string TD_3187_CreateGetCandidateAssessmentResultsById_SP { + get { + return ResourceManager.GetString("TD_3187_CreateGetCandidateAssessmentResultsById_SP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendOneMonthSelfAssessmentTBCReminders] Script Date: 06/12/2023 15:54:40 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 29/11/2023 + ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[SendOneMonthSelfAssessmentTBCReminders] [rest of string was truncated]";. + /// + internal static string TD_3190_FixSelfAssessmentReminderQueriesSP_UP { + get { + return ResourceManager.GetString("TD_3190_FixSelfAssessmentReminderQueriesSP_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 29/11/2023 + ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[SendSelfAssessmentOverdueReminders] + /// -- Add the parameters for the stored procedure here + /// @EmailProfileName nvarchar(100), + /// @TestOnly bit + ///AS + ///BEGIN + /// -- [rest of string was truncated]";. + /// + internal static string TD_3190_SendOneMonthSelfAssessmentOverdueRemindersSP { + get { + return ResourceManager.GetString("TD_3190_SendOneMonthSelfAssessmentOverdueRemindersSP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 29/11/2023 + ///-- Description: Uses DB mail to send reminders to delegates on self assessments with a TBC date within 1 month. + ///-- ============================================= + ///CREATE OR ALTER PROCEDURE [dbo].[SendOneMonthSelfAssessmentTBCReminders] + /// -- Add the parameters for the stored procedure here + /// @EmailProfileName nvarchar(100), + /// @TestOnly bit + ///AS + ///BEGIN /// [rest of string was truncated]";. + /// + internal static string TD_3190_SendOneMonthSelfAssessmentTBCRemindersSP { + get { + return ResourceManager.GetString("TD_3190_SendOneMonthSelfAssessmentTBCRemindersSP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendExpiredTBCReminders] Script Date: 07/12/2023 08:03:01 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 17/08/2018 + ///-- Description: Uses DB mail to send reminders to delegates on courses with a TBC date within 1 month. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[SendExpiredTBCReminders] + /// -- Add the parameters for the stored p [rest of string was truncated]";. + /// + internal static string TD_3197_FixLinksInCourseReminderEmails_DOWN { + get { + return ResourceManager.GetString("TD_3197_FixLinksInCourseReminderEmails_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[SendExpiredTBCReminders] Script Date: 07/12/2023 08:03:01 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 17/08/2018 + ///-- Description: Uses DB mail to send reminders to delegates on courses with a TBC date within 1 month. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[SendExpiredTBCReminders] + /// -- Add the parameters for the stored p [rest of string was truncated]";. + /// + internal static string TD_3197_FixLinksInCourseReminderEmails_UP { + get { + return ResourceManager.GetString("TD_3197_FixLinksInCourseReminderEmails_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths] Script Date: 27/02/2024 10:27:26 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 23/10/2018 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and Cust [rest of string was truncated]";. + /// + internal static string TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Down { + get { + return ResourceManager.GetString("TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths] Script Date: 27/02/2024 10:27:26 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 23/10/2018 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and Cust [rest of string was truncated]";. + /// + internal static string TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Up { + get { + return ResourceManager.GetString("TD_3623_Alter_uspCreateProgressRecordWithCompleteWithinMonthsSPs_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///CREATE TABLE [dbo].[deprecated_ApplicationGroups]( + /// [AppGroupID] [int] IDENTITY(1,1) NOT NULL, + /// [ApplicationGroup] [nvarchar](100) NOT NULL, + /// CONSTRAINT [PK_ApplicationGroups] PRIMARY KEY CLUSTERED + ///( + /// [AppGroupID] ASC + ///)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + ///) ON [PRIMARY] + ///GO + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///CREATE TABLE [dbo].[deprec [rest of string was truncated]";. + /// + internal static string TD_3629_DeleteDeprecatedTables_DOWN { + get { + return ResourceManager.GetString("TD_3629_DeleteDeprecatedTables_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER OFF + ///GO + ///CREATE PROCEDURE [dbo].[aspnet_AnyDataInTables_deprecated] + /// @TablesToCheck int + ///AS + ///BEGIN + /// -- Check Membership table if (@TablesToCheck & 1) is set + /// IF ((@TablesToCheck & 1) <> 0 AND + /// (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V')))) + /// BEGIN + /// IF (EXISTS(SELECT TOP 1 UserId FROM dbo.aspnet_Membership)) + /// BEGIN + /// SELECT N'aspnet_Membership' + /// RETU [rest of string was truncated]";. + /// + internal static string TD_3664_RestoreDroppedSPs { + get { + return ResourceManager.GetString("TD_3664_RestoreDroppedSPs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 16/05/2024 09:29:31 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/12/2016 + ///-- Description: Checks if learner has progress record against customisation. + ///-- Returns: + ///-- 0: None + ///-- 1: Expired + ///-- 2: Complete + ///-- 3: Current + ///-- ============================================= + ///-- 18/09/2018 Adds re [rest of string was truncated]";. + /// + internal static string TD_3671_Alter_CheckDelegateStatusForCustomisation_func_down { + get { + return ResourceManager.GetString("TD_3671_Alter_CheckDelegateStatusForCustomisation_func_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: UserDefinedFunction [dbo].[CheckDelegateStatusForCustomisation] Script Date: 09/05/2024 11:41:58 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/12/2016 + ///-- Description: Checks if learner has progress record against customisation. + ///-- Returns: + ///-- 0: None + ///-- 1: Expired + ///-- 2: Complete + ///-- 3: Current + ///-- ============================================= + ///-- 18/09/2018 Adds return [rest of string was truncated]";. + /// + internal static string TD_3671_Alter_CheckDelegateStatusForCustomisation_func_up { + get { + return ResourceManager.GetString("TD_3671_Alter_CheckDelegateStatusForCustomisation_func_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 16/05/2024 09:37:05 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROCEDURE [rest of string was truncated]";. + /// + internal static string TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_down { + get { + return ResourceManager.GetString("TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 08/05/2024 10:34:29 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROCEDURE [db [rest of string was truncated]";. + /// + internal static string TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_up { + get { + return ResourceManager.GetString("TD_3671_Alter_GetCurrentCoursesForCandidate_V2_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 09/04/2024 08:39:16 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_4015_Update_GetCompletedCoursesForCandidate_proc_down { + get { + return ResourceManager.GetString("TD_4015_Update_GetCompletedCoursesForCandidate_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 09/04/2024 08:39:16 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_4015_Update_GetCompletedCoursesForCandidate_proc_up { + get { + return ResourceManager.GetString("TD_4015_Update_GetCompletedCoursesForCandidate_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 12/07/2024 17:37:50 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the paramet [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_GroupCustomisation_Add_V2_Down { + get { + return ResourceManager.GetString("TD_4223_Alter_GroupCustomisation_Add_V2_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 12/07/2024 17:37:50 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the paramet [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_GroupCustomisation_Add_V2_Up { + get { + return ResourceManager.GetString("TD_4223_Alter_GroupCustomisation_Add_V2_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 27/06/2024 09:35:55 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15 February 2012 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and CustomisationID don [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_uspCreateProgressRecord_V3_Down { + get { + return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecord_V3_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 27/06/2024 09:35:33 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15 February 2012 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and CustomisationID d [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_uspCreateProgressRecord_V3_Up { + get { + return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecord_V3_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/06/2024 09:37:38 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 11/04/2019 + ///-- Description: Creates the Progress and aspProgress record for a new user with no return value + ///-- Returns: Nothing + /// + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down { + get { + return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/06/2024 09:38:12 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 11/04/2019 + ///-- Description: Creates the Progress and aspProgress record for a new user with no return value + ///-- Returns: Nothing + /// + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspCreate [rest of string was truncated]";. + /// + internal static string TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up { + get { + return ResourceManager.GetString("TD_4223_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 20/08/2024 11:57:38 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ======= [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_down { + get { + return ResourceManager.GetString("TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 20/08/2024 11:57:38 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ======= [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_up { + get { + return ResourceManager.GetString("TD_4243_Alter_GetActivitiesForDelegateEnrolment_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 20/08/2024 11:58:45 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCourses [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetCompletedCoursesForCandidate_proc_down { + get { + return ResourceManager.GetString("TD_4243_Alter_GetCompletedCoursesForCandidate_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 20/08/2024 11:58:45 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCourses [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetCompletedCoursesForCandidate_proc_up { + get { + return ResourceManager.GetString("TD_4243_Alter_GetCompletedCoursesForCandidate_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/07/2024 10:11:35 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROCEDU [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_down { + get { + return ResourceManager.GetString("TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + /// + ////****** Object: StoredProcedure [dbo].[GetCurrentCoursesForCandidate_V2] Script Date: 22/07/2024 10:11:35 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of active progress records for the candidate. + ///-- Change 18/09/2018: Adds logic to exclude Removed courses from returned results. + ///-- ============================================= + ///ALTER PROC [rest of string was truncated]";. + /// + internal static string TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_up { + get { + return ResourceManager.GetString("TD_4243_Alter_GetCurrentCoursesForCandidate_V2_proc_up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 27/08/2024 14:41:29 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the paramet [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Down { + get { + return ResourceManager.GetString("TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GroupCustomisation_Add_V2] Script Date: 27/08/2024 14:41:29 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/10/2018 + ///-- Description: Adds a customisation to a group and enrols all group delegates on the customisation if applicable. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GroupCustomisation_Add_V2] + /// -- Add the paramet [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Up { + get { + return ResourceManager.GetString("TD_4436_Alter_GroupCustomisation_Add_V2_UpdateCompleteBy_Supervisor_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 14/08/2024 14:46:35 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15 February 2012 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and CustomisationID don't [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_uspCreateProgressRecord_V3_Down { + get { + return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecord_V3_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecord_V3] Script Date: 14/08/2024 14:46:35 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 15 February 2012 + ///-- Description: Creates the Progress and aspProgress record for a new user + ///-- Returns: 0 : success, progress created + ///-- 1 : Failed - progress already exists + ///-- 100 : Failed - CentreID and CustomisationID don't [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_uspCreateProgressRecord_V3_Up { + get { + return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecord_V3_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/08/2024 15:06:49 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 11/04/2019 + ///-- Description: Creates the Progress and aspProgress record for a new user with no return value + ///-- Returns: Nothing + /// + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down { + get { + return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2] Script Date: 27/08/2024 15:06:49 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 11/04/2019 + ///-- Description: Creates the Progress and aspProgress record for a new user with no return value + ///-- Returns: Nothing + /// + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[uspCreatePr [rest of string was truncated]";. + /// + internal static string TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up { + get { + return ResourceManager.GetString("TD_4436_Alter_uspCreateProgressRecordWithCompleteWithinMonths_Quiet_V2_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 05/09/2024 16:24:49 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_4634_Alter_GetCompletedCoursesForCandidate_DOWN { + get { + return ResourceManager.GetString("TD_4634_Alter_GetCompletedCoursesForCandidate_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCompletedCoursesForCandidate] Script Date: 05/09/2024 16:24:49 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 16/12/2016 + ///-- Description: Returns a list of completed courses for the candidate. + ///-- 21/06/2021: Adds Applications.ArchivedDate field to output. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCompletedCoursesFo [rest of string was truncated]";. + /// + internal static string TD_4634_Alter_GetCompletedCoursesForCandidate_UP { + get { + return ResourceManager.GetString("TD_4634_Alter_GetCompletedCoursesForCandidate_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 22/10/2024 16:55:08 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ========= [rest of string was truncated]";. + /// + internal static string TD_4878_Alter_GetActivitiesForDelegateEnrolment_Down { + get { + return ResourceManager.GetString("TD_4878_Alter_GetActivitiesForDelegateEnrolment_Down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActivitiesForDelegateEnrolment] Script Date: 22/10/2024 16:55:08 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 24/01/2023 + ///-- Description: Returns active available for delegate enrolment based on original GetActiveAvailableCustomisationsForCentreFiltered_V6 sproc but adjusted for user account refactor and filters properly for category. + ///-- ========= [rest of string was truncated]";. + /// + internal static string TD_4878_Alter_GetActivitiesForDelegateEnrolment_Up { + get { + return ResourceManager.GetString("TD_4878_Alter_GetActivitiesForDelegateEnrolment_Up", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetAssessmentResultsByDelegate] Script Date: 07/11/2024 21:36:58 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns assessment results for a delegate + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] + /// @selfAssessmentId as Int = 0, + /// @delegateId as int = 0 + ///AS + ///BEGIN [rest of string was truncated]";. + /// + internal static string TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN { + get { + return ResourceManager.GetString("TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetAssessmentResultsByDelegate] Script Date: 07/11/2024 21:36:58 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns assessment results for a delegate + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetAssessmentResultsByDelegate] + /// @selfAssessmentId as Int = 0, + /// @delegateId as int = 0 + ///AS + ///BEGIN [rest of string was truncated]";. + /// + internal static string TD_4950_Alter_GetAssessmentResultsByDelegate_UP { + get { + return ResourceManager.GetString("TD_4950_Alter_GetAssessmentResultsByDelegate_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCandidateAssessmentResultsById] Script Date: 14/11/2024 14:31:31 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns candidate assessment results by candidateAssessmentId + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] + /// @candidateAssessmentId as Int = 0, + /// @admin [rest of string was truncated]";. + /// + internal static string TD_4950_AlterGetCandidateAssessmentResultsById_DOWN { + get { + return ResourceManager.GetString("TD_4950_AlterGetCandidateAssessmentResultsById_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetCandidateAssessmentResultsById] Script Date: 14/11/2024 14:31:31 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Auldrin Possa + ///-- Create date: 30/11/2023 + ///-- Description: Returns candidate assessment results by candidateAssessmentId + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetCandidateAssessmentResultsById] + /// @candidateAssessmentId as Int = 0, + /// @admin [rest of string was truncated]";. + /// + internal static string TD_4950_AlterGetCandidateAssessmentResultsById_UP { + get { + return ResourceManager.GetString("TD_4950_AlterGetCandidateAssessmentResultsById_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: UserDefinedFunction [dbo].[GetOtherCentresForSelfAssessment] Script Date: 12/11/2024 08:47:08 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 22/01/2024 + ///-- Description: Gets a comma separated list of other centres for a user self assessment + ///-- ============================================= + ///CREATE OR ALTER FUNCTION [dbo].[GetOtherCentresForSelfAssessment] + ///( + /// -- Add the para [rest of string was truncated]";. + /// + internal static string TD_4950_dboGetOtherCentresForSelfAssessmentCreateOrAlter { + get { + return ResourceManager.GetString("TD-4950-dboGetOtherCentresForSelfAssessmentCreateOrAlter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V6] Script Date: 29/09/2022 19:11:04 ******/ + ///SET ANSI_NULLS ON + ///GO + /// + ///SET QUOTED_IDENTIFIER ON + ///GO + /// + ///-- ============================================= + ///-- Author: Manish Agarwal + ///-- Create date: 26/09/2022 + ///-- Description: Returns active available customisations for centre v6 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFil [rest of string was truncated]";. + /// + internal static string TD_786_GetSelfRegisteredFlag_DOWN { + get { + return ResourceManager.GetString("TD-786-GetSelfRegisteredFlag_DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /****** Object: StoredProcedure [dbo].[GetActiveAvailableCustomisationsForCentreFiltered_V5] Script Date: 08/12/2022 13:00:15 ******/ + ///SET ANSI_NULLS ON + ///GO + ///SET QUOTED_IDENTIFIER ON + ///GO + ///-- ============================================= + ///-- Author: Kevin Whittaker + ///-- Create date: 05/10/2020 + ///-- Description: Returns active available customisations for centre v5 adds SelfAssessments. + ///-- ============================================= + ///ALTER PROCEDURE [dbo].[GetActiveAvailableCustomisationsForCentreFilter [rest of string was truncated]";. + /// + internal static string TD_786_GetSelfRegisteredFlag_UP { + get { + return ResourceManager.GetString("TD-786-GetSelfRegisteredFlag_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <ol type=""1""><li><strong>About these terms and conditions</strong><ul data-list-level=""1""><li>It is your responsibility to ensure that you understand and comply with these terms and conditions. It ensures that:<ul data-list-level=""2""><li>You understand your responsibilities and what constitutes an abuse of the service</li><li>Computers and personal data are not put at risk</li></ul></li><li>If you have any questions about these terms and conditions, you should contact your Digital Learning Solutions c [rest of string was truncated]";. + /// + internal static string TermsAndConditionsOldrecord { + get { + return ResourceManager.GetString("TermsAndConditionsOldrecord", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <h1 class="policy-text-center">TERMS AND CONDITIONS</h1> + ///<h1 class="policy-text-center">PLEASE READ THESE TERMS AND CONDITIONS CAREFULLY BEFORE USING THE PLATFORM. YOUR ATTENTION IS PARTICULARLY DRAWN TO THE PROVISIONS OF CLAUSE 14 (OUR RESPONSIBILITY FOR LOSS OR DAMAGE SUFFERED BY YOU) AND CLAUSE 15 (INDEMNITIES).</h1> + ///<ol class="custom-ordered-list nhsuk-u-padding-left-0"> + /// + /// + ///<li class="h2 nhsuk-heading-l nhsuk-u-font-weight-bold nhsuk-u-margin-0">THE PLATFORM + ///<ol class [rest of string was truncated]";. + /// + internal static string TermsConditions { + get { + return ResourceManager.GetString("TermsConditions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DROP VIEW AdminUsers + /// GO + ///DROP VIEW Candidates + /// GO + ///. + /// + internal static string UAR_831_CreateViewsForAdminUsersAndCandidatesTables_DOWN { + get { + return ResourceManager.GetString("UAR-831-CreateViewsForAdminUsersAndCandidatesTables-DOWN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CREATE VIEW AdminUsers AS + ///SELECT dbo.AdminAccounts.ID AS AdminID, + /// null AS Login, + /// dbo.Users.PasswordHash AS Password, + /// dbo.AdminAccounts.CentreID, + /// dbo.AdminAccounts.IsCentreAdmin AS CentreAdmin, + /// 0 AS ConfigAdmin, + /// dbo.AdminAccounts.IsReportsViewer AS SummaryReports, + /// dbo.AdminAccounts.IsSuperAdmin AS UserAdmin, + /// dbo.Us [rest of string was truncated]";. + /// + internal static string UAR_831_CreateViewsForAdminUsersAndCandidatesTables_UP { + get { + return ResourceManager.GetString("UAR-831-CreateViewsForAdminUsersAndCandidatesTables-UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DECLARE @dbName NVARCHAR(128) = DB_NAME() + ///DECLARE @defaultPath NVARCHAR(500) = CONVERT(NVARCHAR(500), SERVERPROPERTY('InstanceDefaultDataPath')) + ///DECLARE @snapshotTime NVARCHAR(12) = FORMAT(GETDATE(), 'yyyyMMddHHmm') + /// + ///DECLARE @snapSql NVARCHAR(4000) = 'CREATE DATABASE ' + @dbName + '_' + @snapshotTime + ' ON + ///( NAME = mbdbx101, FILENAME = ''' + @defaultPath + @dbName + '_' + @snapshotTime + '''), + ///( NAME = mbdbx101files, FILENAME = ''' + @defaultPath + @dbName + '_filestream1_' + @snapshotTime + ''') + ///A [rest of string was truncated]";. + /// + internal static string UAR_858_SnapshotData_UP { + get { + return ResourceManager.GetString("UAR_858_SnapshotData_UP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DECLARE @dbName NVARCHAR(128) = DB_NAME() + ///DECLARE @snapshotName NVARCHAR(128) = CONVERT(NVARCHAR(128), (SELECT TOP 1 name FROM sys.databases WHERE NAME LIKE @dbName + '_2%' ORDER BY create_date DESC)) + /// + ///DECLARE @adminSql NVARCHAR(4000) = 'UPDATE AdminAccounts + ///SET + /// Login_deprecated = snapAA.Login_deprecated, + /// Password_deprecated = snapAA.Password_deprecated, + /// CentreID = snapAA.CentreID, + /// IsCentreAdmin = snapAA.IsCentreAdmin, + /// ConfigAdmin_deprecated = snapAA.ConfigAdmin_deprecated, + /// [rest of string was truncated]";. + /// + internal static string UAR_859_PopulateUsersTableFromAccountsTables_DOWN { + get { + return ResourceManager.GetString("UAR_859_PopulateUsersTableFromAccountsTables_DOWN", resourceCulture); + } + } + } +} diff --git a/DigitalLearningSolutions.Data.Migrations/Properties/Resources.resx b/DigitalLearningSolutions.Data.Migrations/Properties/Resources.resx index 7265178a91..677aa02999 100644 --- a/DigitalLearningSolutions.Data.Migrations/Properties/Resources.resx +++ b/DigitalLearningSolutions.Data.Migrations/Properties/Resources.resx @@ -448,19 +448,25 @@ ..\Scripts\TD_4634_Alter_GetCompletedCoursesForCandidate_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 - - ..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 - - - ..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 - ..\Resources\TD-4950-dboGetOtherCentresForSelfAssessmentCreateOrAlter.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + ..\Scripts\TD-4878-Alter_GetActivitiesForDelegateEnrolment_Down.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 + + + ..\Scripts\TD-4878-Alter_GetActivitiesForDelegateEnrolment_Up.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 + ..\Resources\TD-4950-AlterGetCandidateAssessmentResultsById_DOWN.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 ..\Resources\TD-4950-AlterGetCandidateAssessmentResultsById_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 + + ..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_DOWN.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 + + + ..\Scripts\TD_4950_Alter_GetAssessmentResultsByDelegate_UP.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 + \ No newline at end of file diff --git a/DigitalLearningSolutions.Data/DataServices/CourseDataService.cs b/DigitalLearningSolutions.Data/DataServices/CourseDataService.cs index 364b640a95..9f0ab58aec 100644 --- a/DigitalLearningSolutions.Data/DataServices/CourseDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/CourseDataService.cs @@ -542,9 +542,7 @@ LEFT OUTER JOIN UserCentreDetails AS UCD ON new { candidateAssessmentId, enrolmentMethodId, completeByDateDynamic } ); } - if (candidateAssessmentId > 1 && supervisorDelegateId !=0) - { string sqlQuery = $@" BEGIN TRANSACTION diff --git a/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs b/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs index 2ed662f6f2..e06de8deb1 100644 --- a/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs @@ -35,7 +35,7 @@ public interface ISupervisorDataService CandidateAssessmentSupervisor? GetCandidateAssessmentSupervisor(int candidateAssessmentID, int supervisorDelegateId, int selfAssessmentSupervisorRoleId); SelfAssessmentResultSummary? GetSelfAssessmentResultSummary(int candidateAssessmentId, int supervisorDelegateId); IEnumerable GetCandidateAssessmentSupervisorVerificationSummaries(int candidateAssessmentId); - IEnumerable GetSupervisorForEnrolDelegate(int CustomisationID, int CentreID); + IEnumerable GetSupervisorForEnrolDelegate(int CentreID, int CategoryID); IEnumerable GetSupervisorDelegateDetailsForAdminIdWithoutRemovedClause(int adminId); SupervisorDelegateDetail GetSupervisorDelegateDetailsByIdWithoutRemoveClause(int supervisorDelegateId, int adminId, int delegateUserId); //UPDATE DATA @@ -218,62 +218,6 @@ LEFT OUTER JOIN AdminAccounts AS au2 ); } - public IEnumerable GetSupervisorDelegateDetailsForAdminIdWithoutRemovedClause(int adminId) - { - return connection.Query( - $@"SELECT sd.ID, - sd.SupervisorEmail, sd.SupervisorAdminID, sd.DelegateEmail, sd.DelegateUserID,da.Active, - sd.Added, sd.AddedByDelegate, sd.NotificationSent, sd.Removed, sd.InviteHash, - u.FirstName, u.LastName, u.ProfessionalRegistrationNumber, u.PrimaryEmail AS CandidateEmail, - jg.JobGroupName, - da.Answer1, da.Answer2, da.Answer3, da.Answer4, da.Answer5, da.Answer6, da.CandidateNumber, - cp1.CustomPrompt AS CustomPrompt1, cp2.CustomPrompt AS CustomPrompt2, - cp3.CustomPrompt AS CustomPrompt3, cp4.CustomPrompt AS CustomPrompt4, - cp5.CustomPrompt AS CustomPrompt5, cp6.CustomPrompt AS CustomPrompt6, - COALESCE (au.CentreID, da.CentreID) AS CentreID, - au.Forename + ' ' + au.Surname AS SupervisorName, - (SELECT COUNT(ca.ID) AS Expr1 - FROM CandidateAssessments AS ca LEFT JOIN - CandidateAssessmentSupervisors AS cas ON cas.CandidateAssessmentID = ca.ID AND cas.Removed IS NULL AND cas.SupervisorDelegateId = sd.ID INNER JOIN - SelfAssessments AS sa ON sa.ID = ca.SelfAssessmentID - WHERE (ca.RemovedDate IS NULL) AND (ca.DelegateUserID=sd.DelegateUserID) AND (cas.SupervisorDelegateId = sd.ID OR (cas.CandidateAssessmentID IS NULL) - AND ((sa.SupervisorSelfAssessmentReview = 1) OR (sa.SupervisorResultsReview = 1)))) AS CandidateAssessmentCount, - CAST(COALESCE (au2.IsNominatedSupervisor, 0) AS Bit) AS DelegateIsNominatedSupervisor, - CAST(COALESCE (au2.IsSupervisor, 0) AS Bit) AS DelegateIsSupervisor, - da.ID AS Expr1 - FROM CustomPrompts AS cp6 - RIGHT OUTER JOIN CustomPrompts AS cp5 - RIGHT OUTER JOIN DelegateAccounts AS da - RIGHT OUTER JOIN SupervisorDelegates AS sd - INNER JOIN AdminUsers AS au - ON sd.SupervisorAdminID = au.AdminID - INNER JOIN Centres AS ct - ON au.CentreID = ct.CentreID - ON da.CentreID = ct.CentreID - AND da.UserID = sd.DelegateUserID - LEFT OUTER JOIN Users AS u - LEFT OUTER JOIN JobGroups AS jg - ON u.JobGroupID = jg.JobGroupID - ON da.UserID = u.ID - LEFT OUTER JOIN CustomPrompts AS cp1 - ON ct.CustomField1PromptID = cp1.CustomPromptID - LEFT OUTER JOIN CustomPrompts AS cp2 - ON ct.CustomField2PromptID = cp2.CustomPromptID - LEFT OUTER JOIN CustomPrompts AS cp3 - ON ct.CustomField3PromptID = cp3.CustomPromptID - LEFT OUTER JOIN CustomPrompts AS cp4 - ON ct.CustomField4PromptID = cp4.CustomPromptID - ON cp5.CustomPromptID = ct.CustomField5PromptID - ON cp6.CustomPromptID = ct.CustomField6PromptID - LEFT OUTER JOIN AdminAccounts AS au2 - ON da.UserID = au2.UserID AND da.CentreID = au2.CentreID - WHERE (sd.SupervisorAdminID = @adminId) AND - (u.ID = da.UserID OR sd.DelegateUserID IS NULL) - ORDER BY u.LastName, COALESCE (u.FirstName, sd.DelegateEmail) - ", new { adminId } - ); - } - public IEnumerable GetSupervisorDelegateDetailsForAdminIdWithoutRemovedClause(int adminId) { return connection.Query( diff --git a/DigitalLearningSolutions.Web.Tests/Controllers/SupervisorController/SupervisorControllerTests.cs b/DigitalLearningSolutions.Web.Tests/Controllers/SupervisorController/SupervisorControllerTests.cs index 0185928855..0581361535 100644 --- a/DigitalLearningSolutions.Web.Tests/Controllers/SupervisorController/SupervisorControllerTests.cs +++ b/DigitalLearningSolutions.Web.Tests/Controllers/SupervisorController/SupervisorControllerTests.cs @@ -48,6 +48,7 @@ public class SupervisorControllerTests private ICandidateAssessmentDownloadFileService candidateAssessmentDownloadFileService = null!; private IPdfService pdfService = null!; private SupervisorController controller = null!; + private ICourseCategoriesService courseCategoriesService = null!; [SetUp] public void Setup() @@ -106,7 +107,8 @@ public void Setup() emailService, candidateAssessmentDownloadFileService, clockUtility, - pdfService + pdfService, + courseCategoriesService ); controller.ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { User = user } }; @@ -160,6 +162,7 @@ public void ReviewDelegateSelfAssessment_Should_Return_View_With_Optional_Compet // Given int candidateAssessmentId = 1; int supervisorDelegateId = 2; + int? adminIdCategoryId = 0; var superviseDelegate = SupervisorTagTestHelper.CreateDefaultSupervisorDelegateDetail(); var delegateSelfAssessment = SupervisorTagTestHelper.CreateDefaultDelegateSelfAssessment(); var appliedFilterViewModel = new List(); @@ -189,7 +192,7 @@ public void ReviewDelegateSelfAssessment_Should_Return_View_With_Optional_Compet A.CallTo(() => supervisorService.GetSupervisorDelegateDetailsById(supervisorDelegateId, AdminId, 0)) .Returns(superviseDelegate); - A.CallTo(() => supervisorService.GetSelfAssessmentByCandidateAssessmentId(candidateAssessmentId, AdminId)) + A.CallTo(() => supervisorService.GetSelfAssessmentByCandidateAssessmentId(candidateAssessmentId, AdminId, adminIdCategoryId)) .Returns(delegateSelfAssessment); A.CallTo(() => selfAssessmentService.GetMostRecentResults(SelfAssessmentId, DelegateUserId)) .Returns(competencies); @@ -215,6 +218,7 @@ public void ReviewDelegateSelfAssessment_Should_Return_View_With_Optional_Filter // Given int candidateAssessmentId = 1; int supervisorDelegateId = 2; + int? adminIdCategoryId = 0; var superviseDelegate = SupervisorTagTestHelper.CreateDefaultSupervisorDelegateDetail(); var delegateSelfAssessment = SupervisorTagTestHelper.CreateDefaultDelegateSelfAssessment(); SearchSupervisorCompetencyViewModel searchModel = null!; @@ -250,7 +254,7 @@ public void ReviewDelegateSelfAssessment_Should_Return_View_With_Optional_Filter A.CallTo(() => supervisorService.GetSupervisorDelegateDetailsById(supervisorDelegateId, AdminId, 0)) .Returns(superviseDelegate); - A.CallTo(() => supervisorService.GetSelfAssessmentByCandidateAssessmentId(candidateAssessmentId, AdminId)) + A.CallTo(() => supervisorService.GetSelfAssessmentByCandidateAssessmentId(candidateAssessmentId, AdminId, adminIdCategoryId)) .Returns(delegateSelfAssessment); A.CallTo(() => selfAssessmentService.GetMostRecentResults(SelfAssessmentId, DelegateUserId)) .Returns(competencies); diff --git a/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs b/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs index 7424e62878..e051d12737 100644 --- a/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs +++ b/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs @@ -59,7 +59,7 @@ public IActionResult MyStaffList( var supervisorEmail = GetUserEmail(); var loggedInAdminUser = userService.GetAdminUserById(adminId); var centreRegistrationPrompts = centreRegistrationPromptsService.GetCentreRegistrationPromptsByCentreId(centreId); - var supervisorDelegateDetails = supervisorService.GetSupervisorDelegateDetailsForAdminId(adminId); + var supervisorDelegateDetails = supervisorService.GetSupervisorDelegateDetailsForAdminId(adminId, loggedInAdminUser.CategoryId); if (!supervisorDelegateDetails.Any()) { supervisorDelegateDetails = supervisorService.GetSupervisorDelegateDetailsForAdminIdWithoutRemovedClause(adminId); @@ -1440,7 +1440,7 @@ public async Task DownloadCertificate(int candidateAssessmentId) { return RedirectToAction("StatusCode", "LearningSolutions", new { code = 403 }); } - var supervisorDelegateDetails = supervisorService.GetSupervisorDelegateDetailsForAdminId(adminId.Value); + var supervisorDelegateDetails = supervisorService.GetSupervisorDelegateDetailsForAdminId(adminId.Value, loggedInAdminUser.CategoryId); var checkSupervisorDelegate = supervisorDelegateDetails.Where(x => x.DelegateUserID == competencymaindata.LearnerId).FirstOrDefault(); if (checkSupervisorDelegate == null) return RedirectToAction("StatusCode", "LearningSolutions", new { code = 403 }); var delegateUserId = competencymaindata.LearnerId; diff --git a/DigitalLearningSolutions.Web/Services/SupervisorService.cs b/DigitalLearningSolutions.Web/Services/SupervisorService.cs index 174c9ae778..a8afcff576 100644 --- a/DigitalLearningSolutions.Web/Services/SupervisorService.cs +++ b/DigitalLearningSolutions.Web/Services/SupervisorService.cs @@ -32,9 +32,10 @@ public interface ISupervisorService CandidateAssessmentSupervisor? GetCandidateAssessmentSupervisor(int candidateAssessmentID, int supervisorDelegateId, int selfAssessmentSupervisorRoleId); SelfAssessmentResultSummary? GetSelfAssessmentResultSummary(int candidateAssessmentId, int supervisorDelegateId); IEnumerable GetCandidateAssessmentSupervisorVerificationSummaries(int candidateAssessmentId); - IEnumerable GetSupervisorForEnrolDelegate(int CustomisationID, int CentreID); + IEnumerable GetSupervisorForEnrolDelegate(int CentreID, int CategoryID); IEnumerable GetSupervisorDelegateDetailsForAdminIdWithoutRemovedClause(int adminId); SupervisorDelegateDetail GetSupervisorDelegateDetailsByIdWithoutRemoveClause(int supervisorDelegateId, int adminId, int delegateUserId); + //UPDATE DATA bool ConfirmSupervisorDelegateById(int supervisorDelegateId, int candidateId, int adminId); bool RemoveSupervisorDelegateById(int supervisorDelegateId, int delegateUserId, int adminId); From 2d8336dc387b0d479673337d191a3a15d36ae34a Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 3 Dec 2024 08:56:31 +0000 Subject: [PATCH 005/271] Squashed commit of the following: commit 8fcc3782d24173efab83bdc792a094657c7dce55 Merge: b31b0f1d5 7a1b1485f Author: kevwhitt-hee 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 b31b0f1d5b42eb7bb1ebbd2c24c5c29668dac8c6 Merge: a375ec91c fbeaa0a03 Author: kevwhitt-hee 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 a375ec91cd909070b4c701ec219acec5fb50fd53 Merge: 49d6df110 0a24e3a9d Author: kevwhitt-hee 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 fbeaa0a030c6cd733150ed84134d0e2711c7ae19 Author: Sherif Olaboye Date: Wed Nov 27 17:00:29 2024 +0000 TD-4889 Resolving internal server error when nominating delegate to supervisor commit 3c09df35d8641f7a823f85cb195f52d414df2874 Author: Sherif Olaboye Date: Wed Nov 27 16:35:24 2024 +0000 TD-4889 Resolving internal server error when nominating delegate to supervisor commit 0a24e3a9dd759bb8e2d352cf326eda637d69f41f Author: Sherif Olaboye 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 49d6df110509fe80eaeff4f6e1b9a7ad9f0a05ff Merge: d9c9b6b31 ec7910b42 Author: kevwhitt-hee Date: Wed Nov 27 08:55:26 2024 +0000 Merge branch 'master' into DLS-Release-v1.1.0 commit d9c9b6b3112494c83e992ff187e5ecd0286f337b Author: kevwhitt-hee Date: Wed Nov 27 08:21:19 2024 +0000 Removes migration causing an error in production data during deployment --- .../DataServices/RegistrationDataService.cs | 7 +++++-- .../SelfAssessmentSupervisorDataService.cs | 3 ++- .../Controllers/SupervisorController/Supervisor.cs | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/RegistrationDataService.cs b/DigitalLearningSolutions.Data/DataServices/RegistrationDataService.cs index d6b229e721..ced09e50f3 100644 --- a/DigitalLearningSolutions.Data/DataServices/RegistrationDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/RegistrationDataService.cs @@ -197,7 +197,7 @@ public int RegisterAdmin( isSupervisor = registrationModel.IsSupervisor, isNominatedSupervisor = registrationModel.IsNominatedSupervisor, }; - + var adminUserId = connection.QuerySingle( @"INSERT INTO AdminAccounts ( @@ -219,7 +219,10 @@ OUTPUT Inserted.ID ( @userId, @centreId, - @categoryId, + CASE + WHEN @categoryID = 0 THEN NULL + ELSE @categoryID + END, @isCentreAdmin, @isCentreManager, @active, diff --git a/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAssessmentSupervisorDataService.cs b/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAssessmentSupervisorDataService.cs index 8ae5e54133..7c3a5d118f 100644 --- a/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAssessmentSupervisorDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAssessmentSupervisorDataService.cs @@ -95,7 +95,8 @@ int delegateUserId WHERE (sd.Removed IS NULL) AND (cas.Removed IS NULL) AND (sd.DelegateUserID = @delegateUserId) AND (ca.SelfAssessmentID = @selfAssessmentId) AND (sd.SupervisorAdminID IS NOT NULL) AND (coalesce(sasr.ResultsReview, 1) = 1) - AND au.Active = 1 + AND au.Active = 1 + AND (au.CategoryID = 0 OR au.CategoryID IN (select CategoryID from SelfAssessments where ID = @selfAssessmentId)) ORDER BY SupervisorName", new { selfAssessmentId, delegateUserId } ); diff --git a/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs b/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs index e051d12737..11d8ab1e7d 100644 --- a/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs +++ b/DigitalLearningSolutions.Web/Controllers/SupervisorController/Supervisor.cs @@ -1314,7 +1314,7 @@ public IActionResult ConfirmNominateSupervisor(SupervisorDelegateViewModel super supervisorDelegateDetail.DelegateUserID, (int)User.GetCentreId() ); - supervisorDelegate.SelfAssessmentCategory = supervisorDelegate.SelfAssessmentCategory == 0 ? adminUser.CategoryId.Value : supervisorDelegate.SelfAssessmentCategory; + supervisorDelegate.SelfAssessmentCategory = supervisorDelegate.SelfAssessmentCategory == 0 ? (adminUser.CategoryId.HasValue ? adminUser.CategoryId.Value : 0) : supervisorDelegate.SelfAssessmentCategory; var centreName = adminUser.CentreName; var adminRoles = new AdminRoles(false, false, true, false, false, false, false, false); From 453014e571ad528388e21e4bb3a5f14cf0402d39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:33:55 +0000 Subject: [PATCH 006/271] Bump webpack from 5.96.1 to 5.97.0 in /DigitalLearningSolutions.Web (#3016) Bumps [webpack](https://github.com/webpack/webpack) from 5.96.1 to 5.97.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.96.1...v5.97.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../package-lock.json | 26 +- DigitalLearningSolutions.Web/package.json | 2 +- DigitalLearningSolutions.Web/yarn.lock | 344 +++++++++--------- 3 files changed, 193 insertions(+), 179 deletions(-) diff --git a/DigitalLearningSolutions.Web/package-lock.json b/DigitalLearningSolutions.Web/package-lock.json index bdb61f2a3e..12d520abb9 100644 --- a/DigitalLearningSolutions.Web/package-lock.json +++ b/DigitalLearningSolutions.Web/package-lock.json @@ -49,7 +49,7 @@ "rimraf": "^5.0.10", "ts-node": "^10.9.2", "typescript": "^4.9.5", - "webpack": "^5.94.0", + "webpack": "^5.97.0", "webpack-cli": "^5.1.4" }, "engines": { @@ -10551,16 +10551,16 @@ } }, "node_modules/webpack": { - "version": "5.96.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", - "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", + "version": "5.97.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.0.tgz", + "integrity": "sha512-CWT8v7ShSfj7tGs4TLRtaOLmOCPWhoKEvp+eA7FVx8Xrjb3XfT0aXdxDItnRZmE8sHcH+a8ayDrJCOjXKxVFfQ==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", "acorn": "^8.14.0", "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2", @@ -18600,16 +18600,16 @@ "dev": true }, "webpack": { - "version": "5.96.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", - "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", + "version": "5.97.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.0.tgz", + "integrity": "sha512-CWT8v7ShSfj7tGs4TLRtaOLmOCPWhoKEvp+eA7FVx8Xrjb3XfT0aXdxDItnRZmE8sHcH+a8ayDrJCOjXKxVFfQ==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", "acorn": "^8.14.0", "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2", diff --git a/DigitalLearningSolutions.Web/package.json b/DigitalLearningSolutions.Web/package.json index 78fdd17eb4..55feb96f52 100644 --- a/DigitalLearningSolutions.Web/package.json +++ b/DigitalLearningSolutions.Web/package.json @@ -62,7 +62,7 @@ "rimraf": "^5.0.10", "ts-node": "^10.9.2", "typescript": "^4.9.5", - "webpack": "^5.94.0", + "webpack": "^5.97.0", "webpack-cli": "^5.1.4" }, "-vs-binding": { diff --git a/DigitalLearningSolutions.Web/yarn.lock b/DigitalLearningSolutions.Web/yarn.lock index 3e95327134..1121ba5b94 100644 --- a/DigitalLearningSolutions.Web/yarn.lock +++ b/DigitalLearningSolutions.Web/yarn.lock @@ -1519,10 +1519,26 @@ dependencies: "@types/trusted-types" "*" -"@types/estree@^1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" - integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== +"@types/eslint-scope@^3.7.7": + version "3.7.7" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" + integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "9.6.1" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584" + integrity sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*", "@types/estree@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== "@types/graceful-fs@^4.1.3": version "4.1.5" @@ -1586,6 +1602,11 @@ "@types/parse5" "*" "@types/tough-cookie" "*" +"@types/json-schema@*": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" @@ -1737,125 +1758,125 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" - integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== +"@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.14.1.tgz#a9f6a07f2b03c95c8d38c4536a1fdfb521ff55b6" + integrity sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ== dependencies: - "@webassemblyjs/helper-numbers" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/helper-numbers" "1.13.2" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" -"@webassemblyjs/floating-point-hex-parser@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" - integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== +"@webassemblyjs/floating-point-hex-parser@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz#fcca1eeddb1cc4e7b6eed4fc7956d6813b21b9fb" + integrity sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA== -"@webassemblyjs/helper-api-error@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" - integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== +"@webassemblyjs/helper-api-error@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz#e0a16152248bc38daee76dd7e21f15c5ef3ab1e7" + integrity sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ== -"@webassemblyjs/helper-buffer@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" - integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== +"@webassemblyjs/helper-buffer@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz#822a9bc603166531f7d5df84e67b5bf99b72b96b" + integrity sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA== -"@webassemblyjs/helper-numbers@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" - integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== +"@webassemblyjs/helper-numbers@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz#dbd932548e7119f4b8a7877fd5a8d20e63490b2d" + integrity sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA== dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.6" - "@webassemblyjs/helper-api-error" "1.11.6" + "@webassemblyjs/floating-point-hex-parser" "1.13.2" + "@webassemblyjs/helper-api-error" "1.13.2" "@xtuc/long" "4.2.2" -"@webassemblyjs/helper-wasm-bytecode@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" - integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== +"@webassemblyjs/helper-wasm-bytecode@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz#e556108758f448aae84c850e593ce18a0eb31e0b" + integrity sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA== -"@webassemblyjs/helper-wasm-section@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" - integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== +"@webassemblyjs/helper-wasm-section@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz#9629dda9c4430eab54b591053d6dc6f3ba050348" + integrity sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw== dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-buffer" "1.14.1" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/wasm-gen" "1.14.1" -"@webassemblyjs/ieee754@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" - integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== +"@webassemblyjs/ieee754@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz#1c5eaace1d606ada2c7fd7045ea9356c59ee0dba" + integrity sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw== dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" - integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== +"@webassemblyjs/leb128@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.13.2.tgz#57c5c3deb0105d02ce25fa3fd74f4ebc9fd0bbb0" + integrity sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw== dependencies: "@xtuc/long" "4.2.2" -"@webassemblyjs/utf8@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" - integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== - -"@webassemblyjs/wasm-edit@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" - integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/helper-wasm-section" "1.12.1" - "@webassemblyjs/wasm-gen" "1.12.1" - "@webassemblyjs/wasm-opt" "1.12.1" - "@webassemblyjs/wasm-parser" "1.12.1" - "@webassemblyjs/wast-printer" "1.12.1" - -"@webassemblyjs/wasm-gen@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" - integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/ieee754" "1.11.6" - "@webassemblyjs/leb128" "1.11.6" - "@webassemblyjs/utf8" "1.11.6" - -"@webassemblyjs/wasm-opt@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" - integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/wasm-gen" "1.12.1" - "@webassemblyjs/wasm-parser" "1.12.1" - -"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" - integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-api-error" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/ieee754" "1.11.6" - "@webassemblyjs/leb128" "1.11.6" - "@webassemblyjs/utf8" "1.11.6" - -"@webassemblyjs/wast-printer@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" - integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== - dependencies: - "@webassemblyjs/ast" "1.12.1" +"@webassemblyjs/utf8@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.13.2.tgz#917a20e93f71ad5602966c2d685ae0c6c21f60f1" + integrity sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ== + +"@webassemblyjs/wasm-edit@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz#ac6689f502219b59198ddec42dcd496b1004d597" + integrity sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-buffer" "1.14.1" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/helper-wasm-section" "1.14.1" + "@webassemblyjs/wasm-gen" "1.14.1" + "@webassemblyjs/wasm-opt" "1.14.1" + "@webassemblyjs/wasm-parser" "1.14.1" + "@webassemblyjs/wast-printer" "1.14.1" + +"@webassemblyjs/wasm-gen@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz#991e7f0c090cb0bb62bbac882076e3d219da9570" + integrity sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/ieee754" "1.13.2" + "@webassemblyjs/leb128" "1.13.2" + "@webassemblyjs/utf8" "1.13.2" + +"@webassemblyjs/wasm-opt@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz#e6f71ed7ccae46781c206017d3c14c50efa8106b" + integrity sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-buffer" "1.14.1" + "@webassemblyjs/wasm-gen" "1.14.1" + "@webassemblyjs/wasm-parser" "1.14.1" + +"@webassemblyjs/wasm-parser@1.14.1", "@webassemblyjs/wasm-parser@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz#b3e13f1893605ca78b52c68e54cf6a865f90b9fb" + integrity sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-api-error" "1.13.2" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/ieee754" "1.13.2" + "@webassemblyjs/leb128" "1.13.2" + "@webassemblyjs/utf8" "1.13.2" + +"@webassemblyjs/wast-printer@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz#3bb3e9638a8ae5fdaf9610e7a06b4d9f9aa6fe07" + integrity sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw== + dependencies: + "@webassemblyjs/ast" "1.14.1" "@xtuc/long" "4.2.2" "@webpack-cli/configtest@^2.1.1": @@ -1896,11 +1917,6 @@ acorn-globals@^6.0.0: acorn "^7.1.1" acorn-walk "^7.1.1" -acorn-import-attributes@^1.9.5: - version "1.9.5" - resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" - integrity sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ== - acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -1921,10 +1937,10 @@ acorn@^7.1.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== +acorn@^8.14.0, acorn@^8.4.1, acorn@^8.5.0, acorn@^8.8.2, acorn@^8.9.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== agent-base@6: version "6.0.2" @@ -2279,7 +2295,7 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.2, braces@~3.0.2: +braces@^3.0.3, braces@~3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== @@ -2291,15 +2307,15 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browserslist@^4.21.10, browserslist@^4.22.2: - version "4.23.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" - integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== +browserslist@^4.22.2, browserslist@^4.24.0: + version "4.24.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.2.tgz#f5845bc91069dbd55ee89faf9822e1d885d16580" + integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg== dependencies: - caniuse-lite "^1.0.30001587" - electron-to-chromium "^1.4.668" - node-releases "^2.0.14" - update-browserslist-db "^1.0.13" + caniuse-lite "^1.0.30001669" + electron-to-chromium "^1.5.41" + node-releases "^2.0.18" + update-browserslist-db "^1.1.1" bser@2.1.1: version "2.1.1" @@ -2347,10 +2363,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001587: - version "1.0.30001588" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001588.tgz#07f16b65a7f95dba82377096923947fb25bce6e3" - integrity sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ== +caniuse-lite@^1.0.30001669: + version "1.0.30001686" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz#0e04b8d90de8753188e93c9989d56cb19d902670" + integrity sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA== chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" @@ -2765,10 +2781,10 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== -electron-to-chromium@^1.4.668: - version "1.4.674" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.674.tgz#6ddb629ae52c3192984423b54dc1fffe79e1b007" - integrity sha512-jZtIZxv9FlwTLX5kVZStUtXZywhEi3vqvY6iEzJnc57cNgHFQ5JCczElTs/062v6ODTT7eX8ZOTqQcxa3nMUWQ== +electron-to-chromium@^1.5.41: + version "1.5.68" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.68.tgz#4f46be4d465ef00e2100d5557b66f4af70e3ce6c" + integrity sha512-FgMdJlma0OzUYlbrtZ4AeXjKxKPk6KT8WOP8BjcqxWtlg8qyJQjRzPJzUtUn5GBg1oQ26hFs7HOOHJMYiJRnvQ== emittery@^0.10.2: version "0.10.2" @@ -3015,6 +3031,11 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -3318,13 +3339,6 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== - dependencies: - to-regex-range "^5.0.1" - find-cache-dir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-4.0.0.tgz#a30ee0448f81a3990708f6453633c733e2f6eec2" @@ -4974,10 +4988,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-releases@^2.0.18: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== normalize-package-data@^2.3.2: version "2.5.0" @@ -5280,10 +5294,10 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" @@ -6336,13 +6350,13 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -update-browserslist-db@^1.0.13: - version "1.0.13" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" - integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== +update-browserslist-db@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" + integrity sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A== dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" + escalade "^3.2.0" + picocolors "^1.1.0" uri-js@^4.2.2: version "4.4.1" @@ -6454,18 +6468,18 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.94.0: - version "5.94.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f" - integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== - dependencies: - "@types/estree" "^1.0.5" - "@webassemblyjs/ast" "^1.12.1" - "@webassemblyjs/wasm-edit" "^1.12.1" - "@webassemblyjs/wasm-parser" "^1.12.1" - acorn "^8.7.1" - acorn-import-attributes "^1.9.5" - browserslist "^4.21.10" +webpack@^5.97.0: + version "5.97.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.97.0.tgz#1c5e3b9319f8c6decb19b142e776d90e629d5c40" + integrity sha512-CWT8v7ShSfj7tGs4TLRtaOLmOCPWhoKEvp+eA7FVx8Xrjb3XfT0aXdxDItnRZmE8sHcH+a8ayDrJCOjXKxVFfQ== + dependencies: + "@types/eslint-scope" "^3.7.7" + "@types/estree" "^1.0.6" + "@webassemblyjs/ast" "^1.14.1" + "@webassemblyjs/wasm-edit" "^1.14.1" + "@webassemblyjs/wasm-parser" "^1.14.1" + acorn "^8.14.0" + browserslist "^4.24.0" chrome-trace-event "^1.0.2" enhanced-resolve "^5.17.1" es-module-lexer "^1.2.1" From 301539a90fade9f730ce680907210d909a832e7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:03:06 +0000 Subject: [PATCH 007/271] Bump webpack from 5.97.0 to 5.97.1 in /DigitalLearningSolutions.Web (#3017) Bumps [webpack](https://github.com/webpack/webpack) from 5.97.0 to 5.97.1. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.97.0...v5.97.1) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- DigitalLearningSolutions.Web/package-lock.json | 14 +++++++------- DigitalLearningSolutions.Web/package.json | 2 +- DigitalLearningSolutions.Web/yarn.lock | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/DigitalLearningSolutions.Web/package-lock.json b/DigitalLearningSolutions.Web/package-lock.json index 12d520abb9..03273d3d93 100644 --- a/DigitalLearningSolutions.Web/package-lock.json +++ b/DigitalLearningSolutions.Web/package-lock.json @@ -49,7 +49,7 @@ "rimraf": "^5.0.10", "ts-node": "^10.9.2", "typescript": "^4.9.5", - "webpack": "^5.97.0", + "webpack": "^5.97.1", "webpack-cli": "^5.1.4" }, "engines": { @@ -10551,9 +10551,9 @@ } }, "node_modules/webpack": { - "version": "5.97.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.0.tgz", - "integrity": "sha512-CWT8v7ShSfj7tGs4TLRtaOLmOCPWhoKEvp+eA7FVx8Xrjb3XfT0aXdxDItnRZmE8sHcH+a8ayDrJCOjXKxVFfQ==", + "version": "5.97.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz", + "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.7", @@ -18600,9 +18600,9 @@ "dev": true }, "webpack": { - "version": "5.97.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.0.tgz", - "integrity": "sha512-CWT8v7ShSfj7tGs4TLRtaOLmOCPWhoKEvp+eA7FVx8Xrjb3XfT0aXdxDItnRZmE8sHcH+a8ayDrJCOjXKxVFfQ==", + "version": "5.97.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz", + "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.7", diff --git a/DigitalLearningSolutions.Web/package.json b/DigitalLearningSolutions.Web/package.json index 55feb96f52..16707f31ee 100644 --- a/DigitalLearningSolutions.Web/package.json +++ b/DigitalLearningSolutions.Web/package.json @@ -62,7 +62,7 @@ "rimraf": "^5.0.10", "ts-node": "^10.9.2", "typescript": "^4.9.5", - "webpack": "^5.97.0", + "webpack": "^5.97.1", "webpack-cli": "^5.1.4" }, "-vs-binding": { diff --git a/DigitalLearningSolutions.Web/yarn.lock b/DigitalLearningSolutions.Web/yarn.lock index 1121ba5b94..d2cbeedaef 100644 --- a/DigitalLearningSolutions.Web/yarn.lock +++ b/DigitalLearningSolutions.Web/yarn.lock @@ -6468,10 +6468,10 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.97.0: - version "5.97.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.97.0.tgz#1c5e3b9319f8c6decb19b142e776d90e629d5c40" - integrity sha512-CWT8v7ShSfj7tGs4TLRtaOLmOCPWhoKEvp+eA7FVx8Xrjb3XfT0aXdxDItnRZmE8sHcH+a8ayDrJCOjXKxVFfQ== +webpack@^5.97.1: + version "5.97.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.97.1.tgz#972a8320a438b56ff0f1d94ade9e82eac155fa58" + integrity sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg== dependencies: "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.6" From d0aa521c8e5ea4187b6dff0d060a2020e3c982c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:13:28 +0000 Subject: [PATCH 008/271] Bump dompurify from 2.5.7 to 2.5.8 in /DigitalLearningSolutions.Web (#3021) Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.5.7 to 2.5.8. - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](https://github.com/cure53/DOMPurify/compare/2.5.7...2.5.8) --- updated-dependencies: - dependency-name: dompurify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- DigitalLearningSolutions.Web/package-lock.json | 14 +++++++------- DigitalLearningSolutions.Web/package.json | 2 +- DigitalLearningSolutions.Web/yarn.lock | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/DigitalLearningSolutions.Web/package-lock.json b/DigitalLearningSolutions.Web/package-lock.json index 03273d3d93..f8d218d4c9 100644 --- a/DigitalLearningSolutions.Web/package-lock.json +++ b/DigitalLearningSolutions.Web/package-lock.json @@ -12,7 +12,7 @@ "chartist": "^0.11.4", "core-js": "^3.39.0", "date-fns": "^2.30.0", - "dompurify": "^2.5.4", + "dompurify": "^2.5.8", "input-range-scss": "^1.5.3", "jodit": "^3.24.9", "js-cookie": "^3.0.5", @@ -4807,9 +4807,9 @@ } }, "node_modules/dompurify": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.7.tgz", - "integrity": "sha512-2q4bEI+coQM8f5ez7kt2xclg1XsecaV9ASJk/54vwlfRRNQfDqJz2pzQ8t0Ix/ToBpXlVjrRIx7pFC/o8itG2Q==" + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.8.tgz", + "integrity": "sha512-o1vSNgrmYMQObbSSvF/1brBYEQPHhV1+gsmrusO7/GXtp1T9rCS8cXFqVxK/9crT1jA6Ccv+5MTSjBNqr7Sovw==" }, "node_modules/eastasianwidth": { "version": "0.2.0", @@ -14489,9 +14489,9 @@ } }, "dompurify": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.7.tgz", - "integrity": "sha512-2q4bEI+coQM8f5ez7kt2xclg1XsecaV9ASJk/54vwlfRRNQfDqJz2pzQ8t0Ix/ToBpXlVjrRIx7pFC/o8itG2Q==" + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.8.tgz", + "integrity": "sha512-o1vSNgrmYMQObbSSvF/1brBYEQPHhV1+gsmrusO7/GXtp1T9rCS8cXFqVxK/9crT1jA6Ccv+5MTSjBNqr7Sovw==" }, "eastasianwidth": { "version": "0.2.0", diff --git a/DigitalLearningSolutions.Web/package.json b/DigitalLearningSolutions.Web/package.json index 16707f31ee..822738cb24 100644 --- a/DigitalLearningSolutions.Web/package.json +++ b/DigitalLearningSolutions.Web/package.json @@ -25,7 +25,7 @@ "chartist": "^0.11.4", "core-js": "^3.39.0", "date-fns": "^2.30.0", - "dompurify": "^2.5.4", + "dompurify": "^2.5.8", "input-range-scss": "^1.5.3", "jodit": "^3.24.9", "js-cookie": "^3.0.5", diff --git a/DigitalLearningSolutions.Web/yarn.lock b/DigitalLearningSolutions.Web/yarn.lock index d2cbeedaef..9db26558ac 100644 --- a/DigitalLearningSolutions.Web/yarn.lock +++ b/DigitalLearningSolutions.Web/yarn.lock @@ -2771,10 +2771,10 @@ domexception@^4.0.0: dependencies: webidl-conversions "^7.0.0" -dompurify@^2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.5.4.tgz#347e91070963b22db31c7c8d0ce9a0a2c3c08746" - integrity sha512-l5NNozANzaLPPe0XaAwvg3uZcHtDBnziX/HjsY1UcDj1MxTK8Dd0Kv096jyPK5HRzs/XM5IMj20dW8Fk+HnbUA== +dompurify@^2.5.8: + version "2.5.8" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.5.8.tgz#2809d89d7e528dc7a071dea440d7376df676f824" + integrity sha512-o1vSNgrmYMQObbSSvF/1brBYEQPHhV1+gsmrusO7/GXtp1T9rCS8cXFqVxK/9crT1jA6Ccv+5MTSjBNqr7Sovw== eastasianwidth@^0.2.0: version "0.2.0" From 35c777fb5b929ca5c8533834c18dd2d9abf22705 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 10:34:15 +0000 Subject: [PATCH 009/271] Bump eslint-import-resolver-webpack in /DigitalLearningSolutions.Web (#3024) Bumps [eslint-import-resolver-webpack](https://github.com/import-js/eslint-plugin-import/tree/HEAD/resolvers/webpack) from 0.13.9 to 0.13.10. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/resolvers/webpack/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/commits/resolvers/webpack/v0.13.10/resolvers/webpack) --- updated-dependencies: - dependency-name: eslint-import-resolver-webpack dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../package-lock.json | 72 +++++++++---------- DigitalLearningSolutions.Web/package.json | 2 +- DigitalLearningSolutions.Web/yarn.lock | 46 ++++++------ 3 files changed, 58 insertions(+), 62 deletions(-) diff --git a/DigitalLearningSolutions.Web/package-lock.json b/DigitalLearningSolutions.Web/package-lock.json index f8d218d4c9..f8878aade2 100644 --- a/DigitalLearningSolutions.Web/package-lock.json +++ b/DigitalLearningSolutions.Web/package-lock.json @@ -37,7 +37,7 @@ "babel-loader": "^9.2.1", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", - "eslint-import-resolver-webpack": "^0.13.8", + "eslint-import-resolver-webpack": "^0.13.10", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jasmine": "^4.2.2", "fork-ts-checker-webpack-plugin": "^9.0.2", @@ -5179,18 +5179,18 @@ } }, "node_modules/eslint-import-resolver-webpack": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.9.tgz", - "integrity": "sha512-yGngeefNiHXau2yzKKs2BNON4HLpxBabY40BGL/vUSKZtqzjlVsTTZm57jhHULhm+mJEwKsEIIN3NXup5AiiBQ==", + "version": "0.13.10", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.10.tgz", + "integrity": "sha512-ciVTEg7sA56wRMR772PyjcBRmyBMLS46xgzQZqt6cWBEKc7cK65ZSSLCTLVRu2gGtKyXUb5stwf4xxLBfERLFA==", "dev": true, "dependencies": { "debug": "^3.2.7", "enhanced-resolve": "^0.9.1", "find-root": "^1.1.0", - "hasown": "^2.0.0", + "hasown": "^2.0.2", "interpret": "^1.4.0", - "is-core-module": "^2.13.1", - "is-regex": "^1.1.4", + "is-core-module": "^2.15.1", + "is-regex": "^1.2.0", "lodash": "^4.17.21", "resolve": "^2.0.0-next.5", "semver": "^5.7.2" @@ -6244,12 +6244,12 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6831,14 +6831,15 @@ "license": "MIT" }, "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.0.tgz", + "integrity": "sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bind": "^1.0.7", + "gopd": "^1.1.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -14844,18 +14845,18 @@ } }, "eslint-import-resolver-webpack": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.9.tgz", - "integrity": "sha512-yGngeefNiHXau2yzKKs2BNON4HLpxBabY40BGL/vUSKZtqzjlVsTTZm57jhHULhm+mJEwKsEIIN3NXup5AiiBQ==", + "version": "0.13.10", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.10.tgz", + "integrity": "sha512-ciVTEg7sA56wRMR772PyjcBRmyBMLS46xgzQZqt6cWBEKc7cK65ZSSLCTLVRu2gGtKyXUb5stwf4xxLBfERLFA==", "dev": true, "requires": { "debug": "^3.2.7", "enhanced-resolve": "^0.9.1", "find-root": "^1.1.0", - "hasown": "^2.0.0", + "hasown": "^2.0.2", "interpret": "^1.4.0", - "is-core-module": "^2.13.1", - "is-regex": "^1.1.4", + "is-core-module": "^2.15.1", + "is-regex": "^1.2.0", "lodash": "^4.17.21", "resolve": "^2.0.0-next.5", "semver": "^5.7.2" @@ -15528,13 +15529,10 @@ } }, "gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.3" - } + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true }, "graceful-fs": { "version": "4.2.11", @@ -15914,13 +15912,15 @@ "dev": true }, "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.0.tgz", + "integrity": "sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bind": "^1.0.7", + "gopd": "^1.1.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" } }, "is-set": { diff --git a/DigitalLearningSolutions.Web/package.json b/DigitalLearningSolutions.Web/package.json index 822738cb24..5d0da3730a 100644 --- a/DigitalLearningSolutions.Web/package.json +++ b/DigitalLearningSolutions.Web/package.json @@ -50,7 +50,7 @@ "babel-loader": "^9.2.1", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", - "eslint-import-resolver-webpack": "^0.13.8", + "eslint-import-resolver-webpack": "^0.13.10", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jasmine": "^4.2.2", "fork-ts-checker-webpack-plugin": "^9.0.2", diff --git a/DigitalLearningSolutions.Web/yarn.lock b/DigitalLearningSolutions.Web/yarn.lock index 9db26558ac..cbc4cc5c63 100644 --- a/DigitalLearningSolutions.Web/yarn.lock +++ b/DigitalLearningSolutions.Web/yarn.lock @@ -2087,16 +2087,6 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array.prototype.find@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.2.2.tgz#e862cf891e725d8f2a10e5e42d750629faaabd32" - integrity sha512-DRumkfW97iZGOfn+lIXbkVrXL04sfYKX+EfOodo8XboR5sxPDVvOjZTF/rysusa9lmhmSOeD6Vp6RKQP+eP4Tg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-shim-unscopables "^1.0.0" - array.prototype.findlastindex@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" @@ -3082,19 +3072,18 @@ eslint-import-resolver-node@^0.3.9: is-core-module "^2.13.0" resolve "^1.22.4" -eslint-import-resolver-webpack@^0.13.8: - version "0.13.8" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.8.tgz#5f64d1d653eefa19cdfd0f0165c996b6be7012f9" - integrity sha512-Y7WIaXWV+Q21Rz/PJgUxiW/FTBOWmU8NTLdz+nz9mMoiz5vAev/fOaQxwD7qRzTfE3HSm1qsxZ5uRd7eX+VEtA== +eslint-import-resolver-webpack@^0.13.10: + version "0.13.10" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.10.tgz#d5b69ca548190bd6fd517e5732d2b16cf884227a" + integrity sha512-ciVTEg7sA56wRMR772PyjcBRmyBMLS46xgzQZqt6cWBEKc7cK65ZSSLCTLVRu2gGtKyXUb5stwf4xxLBfERLFA== dependencies: - array.prototype.find "^2.2.2" debug "^3.2.7" enhanced-resolve "^0.9.1" find-root "^1.1.0" - hasown "^2.0.0" + hasown "^2.0.2" interpret "^1.4.0" - is-core-module "^2.13.1" - is-regex "^1.1.4" + is-core-module "^2.15.1" + is-regex "^1.2.0" lodash "^4.17.21" resolve "^2.0.0-next.5" semver "^5.7.2" @@ -3656,6 +3645,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +gopd@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -3926,7 +3920,7 @@ is-callable@^1.1.4, is-callable@^1.2.4: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== -is-core-module@^2.13.0, is-core-module@^2.13.1, is-core-module@^2.15.1: +is-core-module@^2.13.0, is-core-module@^2.15.1: version "2.15.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== @@ -4027,13 +4021,15 @@ is-potential-custom-element-name@^1.0.1: resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== +is-regex@^1.1.4, is-regex@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.0.tgz#41b9d266e7eb7451312c64efc37e8a7d453077cf" + integrity sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA== dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" + call-bind "^1.0.7" + gopd "^1.1.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" is-set@^2.0.3: version "2.0.3" From dae5e57523f70eae5d8bb1ab4af9c96cab77a6d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 19:10:26 +0000 Subject: [PATCH 010/271] Bump @types/lodash in /DigitalLearningSolutions.Web (#3051) Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.17.13 to 4.17.14. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) --- updated-dependencies: - dependency-name: "@types/lodash" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- DigitalLearningSolutions.Web/package-lock.json | 14 +++++++------- DigitalLearningSolutions.Web/package.json | 2 +- DigitalLearningSolutions.Web/yarn.lock | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/DigitalLearningSolutions.Web/package-lock.json b/DigitalLearningSolutions.Web/package-lock.json index f8878aade2..fff9d819e2 100644 --- a/DigitalLearningSolutions.Web/package-lock.json +++ b/DigitalLearningSolutions.Web/package-lock.json @@ -30,7 +30,7 @@ "@types/js-cookie": "^3.0.6", "@types/js-search": "^1.4.4", "@types/jsdom": "^16.2.15", - "@types/lodash": "^4.14.202", + "@types/lodash": "^4.17.14", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "babel-jest": "^28.1.3", @@ -3000,9 +3000,9 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.17.13", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.13.tgz", - "integrity": "sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==", + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.14.tgz", + "integrity": "sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A==", "dev": true }, "node_modules/@types/node": { @@ -13215,9 +13215,9 @@ "dev": true }, "@types/lodash": { - "version": "4.17.13", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.13.tgz", - "integrity": "sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==", + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.14.tgz", + "integrity": "sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A==", "dev": true }, "@types/node": { diff --git a/DigitalLearningSolutions.Web/package.json b/DigitalLearningSolutions.Web/package.json index 5d0da3730a..264951c07b 100644 --- a/DigitalLearningSolutions.Web/package.json +++ b/DigitalLearningSolutions.Web/package.json @@ -43,7 +43,7 @@ "@types/js-cookie": "^3.0.6", "@types/js-search": "^1.4.4", "@types/jsdom": "^16.2.15", - "@types/lodash": "^4.14.202", + "@types/lodash": "^4.17.14", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "babel-jest": "^28.1.3", diff --git a/DigitalLearningSolutions.Web/yarn.lock b/DigitalLearningSolutions.Web/yarn.lock index cbc4cc5c63..5639bd6f8b 100644 --- a/DigitalLearningSolutions.Web/yarn.lock +++ b/DigitalLearningSolutions.Web/yarn.lock @@ -1617,10 +1617,10 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/lodash@^4.14.202": - version "4.14.202" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.202.tgz#f09dbd2fb082d507178b2f2a5c7e74bd72ff98f8" - integrity sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ== +"@types/lodash@^4.17.14": + version "4.17.14" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.14.tgz#bafc053533f4cdc5fcc9635af46a963c1f3deaff" + integrity sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A== "@types/node@*": version "17.0.35" From feb8882b8aeafdee1dedaf79b08ebde46f02375b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 18:32:45 +0000 Subject: [PATCH 011/271] Bump core-js from 3.39.0 to 3.40.0 in /DigitalLearningSolutions.Web (#3054) Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.39.0 to 3.40.0. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/commits/v3.40.0/packages/core-js) --- updated-dependencies: - dependency-name: core-js dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- DigitalLearningSolutions.Web/package-lock.json | 14 +++++++------- DigitalLearningSolutions.Web/package.json | 2 +- DigitalLearningSolutions.Web/yarn.lock | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/DigitalLearningSolutions.Web/package-lock.json b/DigitalLearningSolutions.Web/package-lock.json index fff9d819e2..2f393aecfc 100644 --- a/DigitalLearningSolutions.Web/package-lock.json +++ b/DigitalLearningSolutions.Web/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@types/chartist": "^0.11.1", "chartist": "^0.11.4", - "core-js": "^3.39.0", + "core-js": "^3.40.0", "date-fns": "^2.30.0", "dompurify": "^2.5.8", "input-range-scss": "^1.5.3", @@ -4482,9 +4482,9 @@ "dev": true }, "node_modules/core-js": { - "version": "3.39.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz", - "integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==", + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.40.0.tgz", + "integrity": "sha512-7vsMc/Lty6AGnn7uFpYT56QesI5D2Y/UkgKounk87OP9Z2H9Z8kj6jzcSGAxFmUtDOS0ntK6lbQz+Nsa0Jj6mQ==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -14274,9 +14274,9 @@ "dev": true }, "core-js": { - "version": "3.39.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz", - "integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==" + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.40.0.tgz", + "integrity": "sha512-7vsMc/Lty6AGnn7uFpYT56QesI5D2Y/UkgKounk87OP9Z2H9Z8kj6jzcSGAxFmUtDOS0ntK6lbQz+Nsa0Jj6mQ==" }, "core-js-compat": { "version": "3.36.0", diff --git a/DigitalLearningSolutions.Web/package.json b/DigitalLearningSolutions.Web/package.json index 264951c07b..cd42b6dc9e 100644 --- a/DigitalLearningSolutions.Web/package.json +++ b/DigitalLearningSolutions.Web/package.json @@ -23,7 +23,7 @@ "dependencies": { "@types/chartist": "^0.11.1", "chartist": "^0.11.4", - "core-js": "^3.39.0", + "core-js": "^3.40.0", "date-fns": "^2.30.0", "dompurify": "^2.5.8", "input-range-scss": "^1.5.3", diff --git a/DigitalLearningSolutions.Web/yarn.lock b/DigitalLearningSolutions.Web/yarn.lock index 5639bd6f8b..a513cbfdab 100644 --- a/DigitalLearningSolutions.Web/yarn.lock +++ b/DigitalLearningSolutions.Web/yarn.lock @@ -2523,10 +2523,10 @@ core-js-compat@^3.31.0, core-js-compat@^3.34.0: dependencies: browserslist "^4.22.2" -core-js@^3.28.0, core-js@^3.39.0: - version "3.39.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.39.0.tgz#57f7647f4d2d030c32a72ea23a0555b2eaa30f83" - integrity sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g== +core-js@^3.28.0, core-js@^3.40.0: + version "3.40.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.40.0.tgz#2773f6b06877d8eda102fc42f828176437062476" + integrity sha512-7vsMc/Lty6AGnn7uFpYT56QesI5D2Y/UkgKounk87OP9Z2H9Z8kj6jzcSGAxFmUtDOS0ntK6lbQz+Nsa0Jj6mQ== cosmiconfig@^8.2.0: version "8.3.6" From d1605bdeb34ca920103f98865eac7944867a9e9b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 19:11:59 +0000 Subject: [PATCH 012/271] Bump xunit from 2.9.2 to 2.9.3 (#3055) Bumps [xunit](https://github.com/xunit/xunit) from 2.9.2 to 2.9.3. - [Commits](https://github.com/xunit/xunit/compare/v2-2.9.2...v2-2.9.3) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../DigitalLearningSolutions.Web.AutomatedUiTests.csproj | 2 +- .../DigitalLearningSolutions.Web.IntegrationTests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DigitalLearningSolutions.Web.AutomatedUiTests/DigitalLearningSolutions.Web.AutomatedUiTests.csproj b/DigitalLearningSolutions.Web.AutomatedUiTests/DigitalLearningSolutions.Web.AutomatedUiTests.csproj index a26a174269..93355c7556 100644 --- a/DigitalLearningSolutions.Web.AutomatedUiTests/DigitalLearningSolutions.Web.AutomatedUiTests.csproj +++ b/DigitalLearningSolutions.Web.AutomatedUiTests/DigitalLearningSolutions.Web.AutomatedUiTests.csproj @@ -14,7 +14,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/DigitalLearningSolutions.Web.IntegrationTests/DigitalLearningSolutions.Web.IntegrationTests.csproj b/DigitalLearningSolutions.Web.IntegrationTests/DigitalLearningSolutions.Web.IntegrationTests.csproj index 2ca3bc89c9..3551449b40 100644 --- a/DigitalLearningSolutions.Web.IntegrationTests/DigitalLearningSolutions.Web.IntegrationTests.csproj +++ b/DigitalLearningSolutions.Web.IntegrationTests/DigitalLearningSolutions.Web.IntegrationTests.csproj @@ -10,7 +10,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all From 2d45b57e0beb542b17156a815999d78097b6f3b4 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 19 Dec 2024 11:37:16 +0000 Subject: [PATCH 013/271] TD-5153 Implements page changes and starts to implement download actions --- .../Frameworks/Import/BulkCompetency.cs | 19 +++ .../Frameworks/Import/CompetencyTableRow.cs | 15 +- .../FrameworksController.cs | 6 +- .../ImportCompetencies.cs | 16 +++ .../ImportCompetenciesFromFileService.cs | 18 ++- .../Developer/ImportCompetencies.cshtml | 135 +++++++++++------- 6 files changed, 149 insertions(+), 60 deletions(-) create mode 100644 DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs new file mode 100644 index 0000000000..63c66f9049 --- /dev/null +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DigitalLearningSolutions.Data.Models.Frameworks.Import +{ + public class BulkCompetency + { + public int? id { get; set; } + public string? CompetencyGroup { get; set; } + public string? GroupDescription { get; set; } + public string? Competency { get; set; } + public string? CompetencyDescription { get; set; } + public bool? AlwaysShowDescription { get; set; } + public string? FlagsCsv { get; set; } + } +} diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index 78e70194ec..eabf53b956 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -12,7 +12,7 @@ public enum RowStatus CompetencyGroupAndCompetencyInserted, CompetencyInserted } - public class CompetencyTableRow + public class CompetencyTableRow : BulkCompetency { public CompetencyTableRow(IXLTable table, IXLRangeRow row) { @@ -23,28 +23,25 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) } RowNumber = row.RowNumber(); - CompetencyGroupName = FindFieldValue("competency group"); - CompetencyName = FindFieldValue("competency name"); + CompetencyGroup = FindFieldValue("competency group"); + Competency = FindFieldValue("competency name"); CompetencyDescription = FindFieldValue("competency description"); RowStatus = RowStatus.NotYetProcessed; } public int RowNumber { get; set; } - public string? CompetencyGroupName { get; set; } - public string? CompetencyName { get; set; } - public string? CompetencyDescription { get; set; } public ImportCompetenciesResult.ErrorReason? Error { get; set; } public RowStatus RowStatus { get; set; } public bool Validate() { - if (string.IsNullOrEmpty(CompetencyName)) + if (string.IsNullOrEmpty(Competency)) { Error = ImportCompetenciesResult.ErrorReason.MissingCompetencyName; } - else if (CompetencyGroupName?.Length > 255) + else if (CompetencyGroup?.Length > 255) { Error = ImportCompetenciesResult.ErrorReason.TooLongCompetencyGroupName; } - else if (CompetencyName.Length > 500) + else if (Competency.Length > 500) { Error = ImportCompetenciesResult.ErrorReason.TooLongCompetencyName; } diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/FrameworksController.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/FrameworksController.cs index fd2b21bced..37c212f9e3 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/FrameworksController.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/FrameworksController.cs @@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using GDS.MultiPageFormData; + using DigitalLearningSolutions.Data.Utilities; [Authorize(Policy = CustomPolicies.UserFrameworksAdminOnly)] [SetDlsSubApplication(nameof(DlsSubApplication.Frameworks))] @@ -25,6 +26,7 @@ public partial class FrameworksController : Controller private readonly ILearningHubApiClient learningHubApiClient; private readonly ISearchSortFilterPaginateService searchSortFilterPaginateService; private readonly IMultiPageFormService multiPageFormService; + private readonly IClockUtility clockUtility; public FrameworksController( IFrameworkService frameworkService, @@ -35,7 +37,8 @@ public FrameworksController( ICompetencyLearningResourcesService competencyLearningResourcesService, ILearningHubApiClient learningHubApiClient, ISearchSortFilterPaginateService searchSortFilterPaginateService, - IMultiPageFormService multiPageFormService + IMultiPageFormService multiPageFormService, + IClockUtility clockUtility ) { this.frameworkService = frameworkService; @@ -47,6 +50,7 @@ IMultiPageFormService multiPageFormService this.learningHubApiClient = learningHubApiClient; this.searchSortFilterPaginateService = searchSortFilterPaginateService; this.multiPageFormService = multiPageFormService; + this.clockUtility = clockUtility; } private int? GetCentreId() diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 85b6da73fa..71a4a301ca 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -1,4 +1,7 @@ using DigitalLearningSolutions.Data.Exceptions; +using DigitalLearningSolutions.Data.Utilities; +using DigitalLearningSolutions.Web.Helpers; +using DigitalLearningSolutions.Web.Services; using DigitalLearningSolutions.Web.ViewModels.Frameworks; using Microsoft.AspNetCore.Mvc; @@ -19,6 +22,19 @@ public IActionResult ImportCompetencies(int frameworkId, string tabname) }; return View("Developer/ImportCompetencies", model); } + [Route("DownloadDelegates")] + public IActionResult DownloadCompetencies(int frameworkId, int DownloadOption) + { + string fileName = DownloadOption == 2 ? $"DLS Competencies for Bulk Update {clockUtility.UtcToday:yyyy-MM-dd}.xlsx" : "DLS Delegates for Bulk Registration.xlsx"; + var content = importCompetenciesFromFileService.GetCompetencyFileForFramework( + frameworkId, DownloadOption == 2 ? false : true + ); + return File( + content, + FileHelper.GetContentTypeFromFileName(fileName), + fileName + ); + } [HttpPost] [Route("/Framework/{frameworkId}/{tabname}/Import")] public IActionResult StartImport(ImportCompetenciesViewModel model) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index ca2bbb7e03..b2dae72570 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -5,16 +5,19 @@ namespace DigitalLearningSolutions.Web.Services { using System.Collections.Generic; + using System.IO; using System.Linq; using ClosedXML.Excel; using DigitalLearningSolutions.Data.DataServices; using DigitalLearningSolutions.Data.Exceptions; + using DigitalLearningSolutions.Data.Helpers; + using DigitalLearningSolutions.Data.Models.Centres; using DigitalLearningSolutions.Data.Models.Frameworks.Import; using Microsoft.AspNetCore.Http; public interface IImportCompetenciesFromFileService { - + byte[] GetCompetencyFileForFramework(int frameworkId, bool v); public ImportCompetenciesResult ProcessCompetenciesFromFile(IFormFile file, int adminUserId, int frameworkId); } public class ImportCompetenciesFromFileService : IImportCompetenciesFromFileService @@ -115,5 +118,18 @@ private static bool ValidateHeaders(IXLTable table) var actualHeaders = table.Fields.Select(x => x.Name.ToLower()).OrderBy(x => x); return actualHeaders.SequenceEqual(expectedHeaders); } + + public byte[] GetCompetencyFileForFramework(int frameworkId, bool blank) + { + using var workbook = new XLWorkbook(); + PopulateCompetenciesSheet(workbook, frameworkId, blank); + if (blank) + { + ClosedXmlHelper.HideWorkSheetColumn(workbook, "DelegateID"); + } + using var stream = new MemoryStream(); + workbook.SaveAs(stream); + return stream.ToArray(); + } } } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml index 65e65b9838..5525e84144 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml @@ -2,59 +2,96 @@ @using DigitalLearningSolutions.Web.ViewModels.Frameworks @model ImportCompetenciesViewModel @{ - ViewData["Title"] = "Framework - Import Competencies"; - ViewData["Application"] = "Framework Service"; - ViewData["HeaderPathName"] = "Framework Service"; - var errorHasOccurred = !ViewData.ModelState.IsValid; - var cancelLinkData = Html.GetRouteValues(); + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + ViewData["Title"] = errorHasOccurred ? "Error: Bulk upload competencies" : "Bulk upload competencies"; + var cancelLinkData = Html.GetRouteValues(); } @section NavMenuItems { - + } - @section NavBreadcrumbs { - +@section NavBreadcrumbs { + } -
+
- @if (errorHasOccurred) - { - - } -

Import from Excel

- -

- To import competencies from Excel, you will need an .xlsx worksheet file saved to your computer that meets the following requirements: -

    -
  • Has import data formatted as a table on the first worksheet in the file
  • -
  • - Has the following column titles on the cells in the first row: -
      -
    • Competency group (cell A1)
    • -
    • Competency name (cell B1)
    • -
    • Competency description (cell C1)
    • -
    -
  • -
  • Import data in subsequent rows with no blank rows (including hidden rows)
  • -
  • Import data must be formatted as a table (select all data and choose "Format as Table" in Excel
  • -
  • Import data rows must include a Competency name
  • -
  • If Competency group is left blank, the competency will be imported without a group and listed after grouped competencies in the framework
  • -
-

-
- - - - - -
+ @if (errorHasOccurred) + { + + } +

Bulk upload or update competencies

+ +

+ To bulk add and/or update competencies in your framework, download an Excel workbook using one of the options below. +

+
+
+ +
+ +

+ What would you like to download? +

+
+
+ Select one option +
+
+
+ + +
+
+
+ This Excel file will be empty.
+ New competencies can be added by including their details on a blank row. +
+ + Download template + +
+
+ + +
+
+
+ This Excel file will include all existing competencies whose details you can update.
+ New competencies can be added by including their details on a blank row. +
+ + Download competencies + +
+
+
+ +
+
+

Upload file

+

+ Once you have an Excel competencies workbook, add or update competencies to the worksheet, save and start the upload process. +

+
+ + + + + +
From ab16c755dc319331ebb8ef91b54477bf8dfad21b Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 19 Dec 2024 11:48:34 +0000 Subject: [PATCH 014/271] Update FrameworkDataService.cs --- .../DataServices/FrameworkDataService.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 7539d73753..612dbc9ee0 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -8,6 +8,7 @@ using DigitalLearningSolutions.Data.Models.Common; using DigitalLearningSolutions.Data.Models.Email; using DigitalLearningSolutions.Data.Models.Frameworks; + using DigitalLearningSolutions.Data.Models.Frameworks.Import; using DigitalLearningSolutions.Data.Models.SelfAssessments; using Microsoft.Extensions.Logging; using AssessmentQuestion = DigitalLearningSolutions.Data.Models.Frameworks.AssessmentQuestion; @@ -98,6 +99,7 @@ bool zeroBased ); Competency? GetFrameworkCompetencyForPreview(int frameworkCompetencyId); + IEnumerable GetBulkCompetenciesForFramework(int frameworkId); // Comments: IEnumerable GetCommentsForFrameworkId(int frameworkId, int adminId); @@ -2396,5 +2398,22 @@ FROM FrameworkDefaultQuestions new { competencyId, frameworkId } ); } + + public IEnumerable GetBulkCompetenciesForFramework(int frameworkId) + { + return connection.Query( + @"SELECT fc.ID, cg.Name AS CompetencyGroup, cg.Description AS GroupDescription, c.Name AS Competency, c.Description AS CompetencyDescription, c.AlwaysShowDescription, STRING_AGG(f.FlagName, ', ') AS FlagsCsv + FROM Flags AS f RIGHT OUTER JOIN + CompetencyFlags AS cf ON f.ID = cf.FlagID RIGHT OUTER JOIN + Competencies AS c INNER JOIN + FrameworkCompetencies AS fc ON c.ID = fc.CompetencyID INNER JOIN + FrameworkCompetencyGroups AS fcg ON fc.FrameworkCompetencyGroupID = fcg.ID INNER JOIN + CompetencyGroups AS cg ON fcg.CompetencyGroupID = cg.ID ON cf.CompetencyID = c.ID + WHERE (fc.FrameworkID = @frameworkId) + GROUP BY fc.ID, cg.Name, cg.Description, c.Name, c.Description, c.AlwaysShowDescription, fcg.Ordering, fc.Ordering + ORDER BY fcg.Ordering, fc.Ordering", + new { frameworkId } + ); + } } } From 691ed4029ee25d56c0c26b4f84005eeb1e33effd Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 20 Dec 2024 15:17:04 +0000 Subject: [PATCH 015/271] TD-5153 Implements download competencies and templates functions and upload action --- .../DataServices/FrameworkDataService.cs | 18 +++-- .../FrameworksController.cs | 7 +- .../ImportCompetencies.cs | 66 +++++++++++++++---- .../Helpers/CommonValidationErrorMessages.cs | 1 + .../Models/BulkCompetenciesData.cs | 31 +++++++++ .../Models/BulkCompetenciesResult.cs | 6 ++ .../Services/FrameworkService.cs | 7 ++ .../ImportCompetenciesFromFileService.cs | 33 ++++++++-- .../ImportCompetenciesPreProcessViewModel.cs | 6 ++ .../Developer/ImportCompetencies.cshtml | 4 +- .../Frameworks/Developer/UploadResults.cshtml | 64 ++++++++++++++++++ 11 files changed, 218 insertions(+), 25 deletions(-) create mode 100644 DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs create mode 100644 DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/UploadResults.cshtml diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 612dbc9ee0..48ca33384f 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -2401,8 +2401,16 @@ FROM FrameworkDefaultQuestions public IEnumerable GetBulkCompetenciesForFramework(int frameworkId) { - return connection.Query( - @"SELECT fc.ID, cg.Name AS CompetencyGroup, cg.Description AS GroupDescription, c.Name AS Competency, c.Description AS CompetencyDescription, c.AlwaysShowDescription, STRING_AGG(f.FlagName, ', ') AS FlagsCsv + if(frameworkId < 1) + { + return connection.Query( + @"SELECT NULL AS ID, '' AS CompetencyGroup, '' AS GroupDescription, '' AS Competency, '' AS CompetencyDescription, NULL AS AlwaysShowDescription, '' AS FlagsCsv" + ); + } + else + { + return connection.Query( + @"SELECT fc.ID, cg.Name AS CompetencyGroup, cg.Description AS GroupDescription, c.Name AS Competency, c.Description AS CompetencyDescription, c.AlwaysShowDescription, STRING_AGG(f.FlagName, ', ') AS FlagsCsv FROM Flags AS f RIGHT OUTER JOIN CompetencyFlags AS cf ON f.ID = cf.FlagID RIGHT OUTER JOIN Competencies AS c INNER JOIN @@ -2412,8 +2420,10 @@ Competencies AS c INNER JOIN WHERE (fc.FrameworkID = @frameworkId) GROUP BY fc.ID, cg.Name, cg.Description, c.Name, c.Description, c.AlwaysShowDescription, fcg.Ordering, fc.Ordering ORDER BY fcg.Ordering, fc.Ordering", - new { frameworkId } - ); + new { frameworkId } + ); + } + } } } diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/FrameworksController.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/FrameworksController.cs index 37c212f9e3..c173233f6c 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/FrameworksController.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/FrameworksController.cs @@ -11,6 +11,7 @@ using Microsoft.Extensions.Logging; using GDS.MultiPageFormData; using DigitalLearningSolutions.Data.Utilities; + using Microsoft.AspNetCore.Hosting; [Authorize(Policy = CustomPolicies.UserFrameworksAdminOnly)] [SetDlsSubApplication(nameof(DlsSubApplication.Frameworks))] @@ -27,7 +28,7 @@ public partial class FrameworksController : Controller private readonly ISearchSortFilterPaginateService searchSortFilterPaginateService; private readonly IMultiPageFormService multiPageFormService; private readonly IClockUtility clockUtility; - + private readonly IWebHostEnvironment webHostEnvironment; public FrameworksController( IFrameworkService frameworkService, ICommonService commonService, @@ -38,7 +39,8 @@ public FrameworksController( ILearningHubApiClient learningHubApiClient, ISearchSortFilterPaginateService searchSortFilterPaginateService, IMultiPageFormService multiPageFormService, - IClockUtility clockUtility + IClockUtility clockUtility, + IWebHostEnvironment webHostEnvironment ) { this.frameworkService = frameworkService; @@ -51,6 +53,7 @@ IClockUtility clockUtility this.searchSortFilterPaginateService = searchSortFilterPaginateService; this.multiPageFormService = multiPageFormService; this.clockUtility = clockUtility; + this.webHostEnvironment = webHostEnvironment; } private int? GetCentreId() diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 71a4a301ca..d1d8034f09 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -1,8 +1,13 @@ -using DigitalLearningSolutions.Data.Exceptions; +using ClosedXML.Excel; +using DigitalLearningSolutions.Data.Exceptions; +using DigitalLearningSolutions.Data.Migrations; using DigitalLearningSolutions.Data.Utilities; using DigitalLearningSolutions.Web.Helpers; +using DigitalLearningSolutions.Web.Models; using DigitalLearningSolutions.Web.Services; using DigitalLearningSolutions.Web.ViewModels.Frameworks; +using GDS.MultiPageFormData.Enums; +using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; namespace DigitalLearningSolutions.Web.Controllers.FrameworksController @@ -22,10 +27,9 @@ public IActionResult ImportCompetencies(int frameworkId, string tabname) }; return View("Developer/ImportCompetencies", model); } - [Route("DownloadDelegates")] public IActionResult DownloadCompetencies(int frameworkId, int DownloadOption) { - string fileName = DownloadOption == 2 ? $"DLS Competencies for Bulk Update {clockUtility.UtcToday:yyyy-MM-dd}.xlsx" : "DLS Delegates for Bulk Registration.xlsx"; + string fileName = DownloadOption == 2 ? $"DLS Competencies for Bulk Update {clockUtility.UtcToday:yyyy-MM-dd}.xlsx" : "DLS Competencies for Bulk Upload.xlsx"; var content = importCompetenciesFromFileService.GetCompetencyFileForFramework( frameworkId, DownloadOption == 2 ? false : true ); @@ -37,24 +41,64 @@ public IActionResult DownloadCompetencies(int frameworkId, int DownloadOption) } [HttpPost] [Route("/Framework/{frameworkId}/{tabname}/Import")] - public IActionResult StartImport(ImportCompetenciesViewModel model) + public IActionResult StartImport(ImportCompetenciesViewModel model, string tabname) { if (!ModelState.IsValid) return View("Developer/ImportCompetencies", model); try { - var results = importCompetenciesFromFileService.ProcessCompetenciesFromFile( - model.ImportFile!, - GetAdminId(), - model.FrameworkId - ); - var resultsModel = new ImportCompetenciesResultsViewModel(results); - return View("Developer/ImportCompleted", resultsModel); + var adminUserID = User.GetAdminIdKnownNotNull(); + var workbook = new XLWorkbook(model.ImportFile.OpenReadStream()); + if (!workbook.Worksheets.Contains(ImportCompetenciesFromFileService.CompetenciesSheetName)) + { + ModelState.AddModelError("InvalidWorksheet", CommonValidationErrorMessages.InvalidCompetenciesUploadExcelFile); + return View("Developer/ImportCompetencies", model); + } + var competenciesFileName = FileHelper.UploadFile(webHostEnvironment, model.ImportFile); + setupBulkUploadData(model.FrameworkId, adminUserID, competenciesFileName, tabname); + + return RedirectToAction("ImportCompleted", "Frameworks", new { frameworkId = model.FrameworkId, tabname }); + } + catch (DocumentFormat.OpenXml.Packaging.OpenXmlPackageException) + { + ModelState.AddModelError("DelegatesFile", "The Excel file has at least one cell containing an invalid hyperlink or email address."); + return View("Index", model); } catch (InvalidHeadersException) { return View("Developer/ImportFailed"); } } + [Route("/Framework/{frameworkId}/{tabname}/ImportCompleted")] + public IActionResult ImportCompleted() + { + return View("Developer/ImportCompleted"); + } + + private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName) + { + TempData.Clear(); + multiPageFormService.ClearMultiPageFormData(MultiPageFormDataFeature.AddCustomWebForm("BulkCompetencyDataCWF"), TempData); + var today = clockUtility.UtcToday; + var bulkUploadData = new BulkCompetenciesData(frameworkId, adminUserID, competenciessFileName, tabName); + setBulkUploadData(bulkUploadData); + } + private void setBulkUploadData(BulkCompetenciesData bulkUploadData) + { + multiPageFormService.SetMultiPageFormData( + bulkUploadData, + MultiPageFormDataFeature.AddCustomWebForm("BulkCompetencyDataCWF"), + TempData + ); + } + + private BulkCompetenciesData GetBulkUploadData() + { + var data = multiPageFormService.GetMultiPageFormData( + MultiPageFormDataFeature.AddCustomWebForm("BulkCompetencyDataCWF"), + TempData + ).GetAwaiter().GetResult(); + return data; + } } } diff --git a/DigitalLearningSolutions.Web/Helpers/CommonValidationErrorMessages.cs b/DigitalLearningSolutions.Web/Helpers/CommonValidationErrorMessages.cs index 9cd480a9dd..e76eec613c 100644 --- a/DigitalLearningSolutions.Web/Helpers/CommonValidationErrorMessages.cs +++ b/DigitalLearningSolutions.Web/Helpers/CommonValidationErrorMessages.cs @@ -36,6 +36,7 @@ public static class CommonValidationErrorMessages public const string CentreNameAlreadyExist = "The centre name you have entered already exists, please enter a different centre name"; public const string MaxBulkUploadRowsLimit = "File must contain no more than {0} rows"; public const string InvalidBulkUploadExcelFile = "The uploaded file must contain a \"DelegatesBulkUpload\" worksheet. Use the \"Download delegates\" button to generate a template."; + public const string InvalidCompetenciesUploadExcelFile = "The uploaded file must contain a \"CompetenciesBulkUpload\" worksheet. Use the \"Download competencies\" button to generate a template."; public const string ReportFilterReturnsTooManyRows = "The report frequency is too high for the date range. Choose a lower report frequency (or shorten the date range)"; } } diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs new file mode 100644 index 0000000000..f81e85f952 --- /dev/null +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using System.Linq; + +namespace DigitalLearningSolutions.Web.Models +{ + public class BulkCompetenciesData + { + public BulkCompetenciesData() { } + public BulkCompetenciesData(int frameworkId, int adminUserId, string competenciesFileName, string tabName) + { + FrameworkId = frameworkId; + AdminUserId = adminUserId; + CompetenciesFileName = competenciesFileName; + TabName = tabName; + } + public int FrameworkId { get; set; } + public string TabName { get; set; } + public int AdminUserId { get; set; } + public string CompetenciesFileName { get; set; } + public List AssessmentQuestionIDs { get; set; } + public int? AddAssessmentQuestionOption { get; set; } + public int ToProcessCount { get; set; } + public int ToAddCount { get; set; } + public int ToUpdateCount { get; set; } + public int LastRowProcessed { get; set; } + public int SubtotalCompetenciesAdded { get; set; } + public int SubtotalCompetenciesUpdated { get; set; } + public int SubTotalSkipped { get; set; } + public IEnumerable<(int RowNumber, string ErrorMessage)> Errors { get; set; } = Enumerable.Empty<(int, string)>(); + } +} diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs new file mode 100644 index 0000000000..bc8b12ecdd --- /dev/null +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs @@ -0,0 +1,6 @@ +namespace DigitalLearningSolutions.Web.Models +{ + public class BulkCompetenciesResult + { + } +} diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index 7ddb9b6169..f69c07cbf6 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -2,6 +2,7 @@ using DigitalLearningSolutions.Data.Models.Common; using DigitalLearningSolutions.Data.Models.Email; using DigitalLearningSolutions.Data.Models.Frameworks; +using DigitalLearningSolutions.Data.Models.Frameworks.Import; using DigitalLearningSolutions.Data.Models.SelfAssessments; using System.Collections.Generic; using AssessmentQuestion = DigitalLearningSolutions.Data.Models.Frameworks.AssessmentQuestion; @@ -55,6 +56,7 @@ public interface IFrameworkService int GetMaxFrameworkCompetencyID(); int GetMaxFrameworkCompetencyGroupID(); + IEnumerable GetBulkCompetenciesForFramework(int frameworkId); // Assessment questions: IEnumerable GetAllCompetencyQuestions(int adminId); @@ -379,6 +381,11 @@ public IEnumerable GetAssessmentQuestionsForCompetency(int fr return frameworkDataService.GetBrandedFrameworkByFrameworkId(frameworkId, adminId); } + public IEnumerable GetBulkCompetenciesForFramework(int frameworkId) + { + return frameworkDataService.GetBulkCompetenciesForFramework(frameworkId); + } + public CollaboratorNotification? GetCollaboratorNotification(int id, int invitedByAdminId) { return frameworkDataService.GetCollaboratorNotification(id, invitedByAdminId); diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index b2dae72570..0ba48b08d7 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -4,14 +4,13 @@ namespace DigitalLearningSolutions.Web.Services { + using System; using System.Collections.Generic; using System.IO; using System.Linq; using ClosedXML.Excel; - using DigitalLearningSolutions.Data.DataServices; using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Data.Helpers; - using DigitalLearningSolutions.Data.Models.Centres; using DigitalLearningSolutions.Data.Models.Frameworks.Import; using Microsoft.AspNetCore.Http; @@ -23,6 +22,8 @@ public interface IImportCompetenciesFromFileService public class ImportCompetenciesFromFileService : IImportCompetenciesFromFileService { private readonly IFrameworkService frameworkService; + private static readonly XLTableTheme TableTheme = XLTableTheme.TableStyleLight9; + public const string CompetenciesSheetName = "CompetenciesBulkUpload"; public ImportCompetenciesFromFileService( IFrameworkService frameworkService ) @@ -76,9 +77,9 @@ CompetencyTableRow competencyRow } //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID int? frameworkCompetencyGroupId = null; - if (competencyRow.CompetencyGroupName != null) + if (competencyRow.CompetencyGroup != null) { - var newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroupName, null, adminUserId); + var newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, null, adminUserId); if (newCompetencyGroupId > 0) { frameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminUserId); @@ -91,7 +92,7 @@ CompetencyTableRow competencyRow } //Check if competency already exists in framework competency group and add if not - var newCompetencyId = frameworkService.InsertCompetency(competencyRow.CompetencyName, competencyRow.CompetencyDescription, adminUserId); + var newCompetencyId = frameworkService.InsertCompetency(competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId); if (newCompetencyId > 0) { var newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId); @@ -125,11 +126,31 @@ public byte[] GetCompetencyFileForFramework(int frameworkId, bool blank) PopulateCompetenciesSheet(workbook, frameworkId, blank); if (blank) { - ClosedXmlHelper.HideWorkSheetColumn(workbook, "DelegateID"); + ClosedXmlHelper.HideWorkSheetColumn(workbook, "ID"); } using var stream = new MemoryStream(); workbook.SaveAs(stream); return stream.ToArray(); } + private void PopulateCompetenciesSheet(IXLWorkbook workbook, int frameworkId, bool blank) + { + + + var competencyRecords = frameworkService.GetBulkCompetenciesForFramework(blank ? 0 : frameworkId); + var competencies = competencyRecords.Select( + x => new + { + ID = x.id, + x.CompetencyGroup, + x.GroupDescription, + x.Competency, + x.CompetencyDescription, + x.AlwaysShowDescription, + FlagsCSV = x.FlagsCsv, + } + ); + + ClosedXmlHelper.AddSheetToWorkbook(workbook, CompetenciesSheetName, competencies, TableTheme); + } } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs new file mode 100644 index 0000000000..c7ae81ca88 --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs @@ -0,0 +1,6 @@ +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks +{ + public class ImportCompetenciesPreProcessViewModel + { + } +} diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml index 5525e84144..9eede68e22 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml @@ -59,7 +59,7 @@ This Excel file will be empty.
New competencies can be added by including their details on a blank row. - + Download template @@ -74,7 +74,7 @@ This Excel file will include all existing competencies whose details you can update.
New competencies can be added by including their details on a blank row. - + Download competencies diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/UploadResults.cshtml new file mode 100644 index 0000000000..fefffeae4f --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/UploadResults.cshtml @@ -0,0 +1,64 @@ +@inject IConfiguration Configuration +@using DigitalLearningSolutions.Web.Extensions +@using DigitalLearningSolutions.Web.ViewModels.Frameworks +@using Microsoft.Extensions.Configuration +@model ImportCompetenciesResultsViewModel +@{ + ViewData["Title"] = "Framework - Import Competencies"; + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + var cancelLinkData = Html.GetRouteValues(); +} + +@section NavMenuItems { + +} + @section NavBreadcrumbs { + +} + +
+
+

Import competencies complete

+ +

Summary of results:

+
    +
  • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
  • +
  • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? "competency group" : "competency groups") inserted
  • +
  • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? "competency" : "competencies") inserted
  • +
  • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "record" : "records") skipped (nothing inserted but no errors)
  • +
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
  • +
+ + @if (Model.ErrorCount > 0) + { +
+

+ + Important: + The imported Excel worksheet contained errors + +

+

The lines below were skipped due to errors during processing:

+
    + @foreach (var (rowNumber, errorMessage) in Model.Errors) + { +
  • Line @rowNumber: @errorMessage
  • + } +
+
+ } + + +
+
From f17218e487aeedf90cb5e5ddeec945de41463d12 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 20 Dec 2024 15:18:35 +0000 Subject: [PATCH 016/271] Update ImportCompleted.cshtml --- .../Developer/ImportCompleted.cshtml | 38 +------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml index fefffeae4f..f0b1627510 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml @@ -2,7 +2,7 @@ @using DigitalLearningSolutions.Web.Extensions @using DigitalLearningSolutions.Web.ViewModels.Frameworks @using Microsoft.Extensions.Configuration -@model ImportCompetenciesResultsViewModel +@model ImportCompetenciesPreProcessViewModel @{ ViewData["Title"] = "Framework - Import Competencies"; ViewData["Application"] = "Framework Service"; @@ -26,39 +26,3 @@ } - -
-
-

Import competencies complete

- -

Summary of results:

-
    -
  • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
  • -
  • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? "competency group" : "competency groups") inserted
  • -
  • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? "competency" : "competencies") inserted
  • -
  • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "record" : "records") skipped (nothing inserted but no errors)
  • -
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
  • -
- - @if (Model.ErrorCount > 0) - { -
-

- - Important: - The imported Excel worksheet contained errors - -

-

The lines below were skipped due to errors during processing:

-
    - @foreach (var (rowNumber, errorMessage) in Model.Errors) - { -
  • Line @rowNumber: @errorMessage
  • - } -
-
- } - - -
-
From ea9ca7990fa707a6f33975c0452a99288781bb1a Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 20 Dec 2024 16:26:50 +0000 Subject: [PATCH 017/271] Implements models for handling upload --- .../Frameworks/Import/CompetencyTableRow.cs | 19 ++++---- .../Frameworks/FrameworkControllerTests.cs | 11 ++++- .../RedirectToErrorEmptySessionDataTests.cs | 6 ++- .../Models/BulkCompetenciesResult.cs | 36 +++++++++++++++- .../ImportCompetenciesPreProcessViewModel.cs | 43 ++++++++++++++++++- 5 files changed, 102 insertions(+), 13 deletions(-) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index eabf53b956..bace71a8c4 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -1,16 +1,16 @@ namespace DigitalLearningSolutions.Data.Models.Frameworks.Import { using ClosedXML.Excel; - using System; - using System.Collections.Generic; - using System.Text; public enum RowStatus { NotYetProcessed, Skipped, - CompetencyGroupInserted, CompetencyGroupAndCompetencyInserted, - CompetencyInserted + CompetencyInserted, + CompetencyUpdated, + CompetencyGroupInserted, + CompetencyGroupUpdated, + CompetencyGroupAndCompetencyUpdated } public class CompetencyTableRow : BulkCompetency { @@ -23,9 +23,12 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) } RowNumber = row.RowNumber(); - CompetencyGroup = FindFieldValue("competency group"); - Competency = FindFieldValue("competency name"); - CompetencyDescription = FindFieldValue("competency description"); + id = int.Parse(FindFieldValue("ID")); + CompetencyGroup = FindFieldValue("CompetencyGroup"); + Competency = FindFieldValue("Competency"); + CompetencyDescription = FindFieldValue("CompetencyDescription"); + GroupDescription = FindFieldValue("CompetencyGroupDescription"); + FlagsCsv = FindFieldValue("FlagsCSV"); RowStatus = RowStatus.NotYetProcessed; } public int RowNumber { get; set; } diff --git a/DigitalLearningSolutions.Web.Tests/Controllers/Frameworks/FrameworkControllerTests.cs b/DigitalLearningSolutions.Web.Tests/Controllers/Frameworks/FrameworkControllerTests.cs index beeeb66bdb..ef0e2c3224 100644 --- a/DigitalLearningSolutions.Web.Tests/Controllers/Frameworks/FrameworkControllerTests.cs +++ b/DigitalLearningSolutions.Web.Tests/Controllers/Frameworks/FrameworkControllerTests.cs @@ -12,6 +12,8 @@ using Microsoft.Extensions.Logging; using NUnit.Framework; using GDS.MultiPageFormData; + using DigitalLearningSolutions.Data.Utilities; + using Microsoft.AspNetCore.Hosting; public partial class FrameworkControllerTests { @@ -28,6 +30,8 @@ public partial class FrameworkControllerTests private ILearningHubApiClient learningHubApiClient = null!; private ISearchSortFilterPaginateService searchSortFilterPaginateService = null!; private IMultiPageFormService multiPageFormService = null!; + private IClockUtility clockUtility = null!; + private IWebHostEnvironment webHostEnvironment = null!; [SetUp] public void SetUp() @@ -42,7 +46,8 @@ public void SetUp() learningHubApiClient = A.Fake(); searchSortFilterPaginateService = A.Fake(); multiPageFormService = A.Fake(); - + clockUtility = A.Fake(); + webHostEnvironment = A.Fake(); A.CallTo(() => config["CurrentSystemBaseUrl"]).Returns(BaseUrl); var user = new ClaimsPrincipal( @@ -65,7 +70,9 @@ public void SetUp() competencyLearningResourcesService, learningHubApiClient, searchSortFilterPaginateService, - multiPageFormService + multiPageFormService, + clockUtility, + webHostEnvironment ) { ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { User = user } }, diff --git a/DigitalLearningSolutions.Web.Tests/ServiceFilter/RedirectToErrorEmptySessionDataTests.cs b/DigitalLearningSolutions.Web.Tests/ServiceFilter/RedirectToErrorEmptySessionDataTests.cs index 4bf31af462..057f143bc6 100644 --- a/DigitalLearningSolutions.Web.Tests/ServiceFilter/RedirectToErrorEmptySessionDataTests.cs +++ b/DigitalLearningSolutions.Web.Tests/ServiceFilter/RedirectToErrorEmptySessionDataTests.cs @@ -22,6 +22,8 @@ using NUnit.Framework; using GDS.MultiPageFormData; using GDS.MultiPageFormData.Enums; + using DigitalLearningSolutions.Data.Utilities; + using Microsoft.AspNetCore.Hosting; public class RedirectToErrorEmptySessionDataTests { @@ -41,7 +43,9 @@ public void Setup() A.Fake(), A.Fake(), A.Fake(), - A.Fake() + A.Fake(), + A.Fake(), + A.Fake() ) .WithDefaultContext().WithMockTempData(); diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs index bc8b12ecdd..e770ac39b7 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs @@ -1,6 +1,40 @@ -namespace DigitalLearningSolutions.Web.Models +using DigitalLearningSolutions.Data.Models.Frameworks.Import; +using System.Collections.Generic; +using System.Linq; + +namespace DigitalLearningSolutions.Web.Models { public class BulkCompetenciesResult { + public enum ErrorReason + { + InvalidId, + MissingCompetencyName, + TooLongCompetencyName, + TooLongCompetencyGroupName, + InvalidAlwaysShowDescription + } + + public BulkCompetenciesResult() { } + + public BulkCompetenciesResult( + IReadOnlyCollection competencyRows + ) + { + ProcessedCount = competencyRows.Count; + CompetencyAddedCount = competencyRows.Count(cr => cr.RowStatus == RowStatus.CompetencyInserted || cr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); + GroupAddedCount = competencyRows.Count(cr => cr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); + GroupUpdatedCount = competencyRows.Count(cr => cr.RowStatus == RowStatus.CompetencyGroupUpdated || cr.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated); + SkippedCount = competencyRows.Count(cr => cr.RowStatus == RowStatus.Skipped); + Errors = (IEnumerable<(int RowNumber, ErrorReason Reason)>)competencyRows.Where(cr => cr.Error.HasValue).Select(cr => (cr.RowNumber, cr.Error!.Value)); + } + + public IEnumerable<(int RowNumber, ErrorReason Reason)>? Errors { get; set; } + public int ProcessedCount { get; set; } + public int CompetencyAddedCount { get; set; } + public int CompetencyUpdatedCount { get; set; } + public int GroupAddedCount { get; set; } + public int GroupUpdatedCount { get; set; } + public int SkippedCount { get; set; } } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs index c7ae81ca88..5817ecf0c6 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs @@ -1,6 +1,47 @@ -namespace DigitalLearningSolutions.Web.ViewModels.Frameworks +using System.Collections.Generic; +using System; +using DigitalLearningSolutions.Web.Models; +using System.Linq; + +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks { public class ImportCompetenciesPreProcessViewModel { + public ImportCompetenciesPreProcessViewModel(BulkCompetenciesResult bulkCompetenciesResult) + { + ToProcessCount = bulkCompetenciesResult.ProcessedCount; + CompetenciesToAddCount = bulkCompetenciesResult.CompetencyAddedCount; + CompetenciesToUpdateCount = bulkCompetenciesResult.CompetencyUpdatedCount; + CompetencyGroupsToAddCount = bulkCompetenciesResult.GroupAddedCount; + CompetencyGroupsToUpdateCount = bulkCompetenciesResult.GroupUpdatedCount; + Errors = bulkCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason))); + } + + public IEnumerable<(int RowNumber, string ErrorMessage)> Errors { get; set; } + public int ErrorCount => Errors.Count(); + public int ToProcessCount { get; set; } + public int CompetenciesToAddCount { get; set; } + public int CompetenciesToUpdateCount { get; set; } + public int CompetencyGroupsToAddCount { get; set; } + public int CompetencyGroupsToUpdateCount { get; set; } + public int ToUpdateOrSkipCount { get; set; } + + private static string MapReasonToErrorMessage(BulkCompetenciesResult.ErrorReason reason) + { + return reason switch + { + BulkCompetenciesResult.ErrorReason.TooLongCompetencyGroupName => + "Group name must be 255 characters or less.", + BulkCompetenciesResult.ErrorReason.MissingCompetencyName => + "Competency is blank. Competency is a required field and cannot be left blank", + BulkCompetenciesResult.ErrorReason.InvalidId => + "The ID provided does not match a Competency ID in this Framework", + BulkCompetenciesResult.ErrorReason.TooLongCompetencyName => + "Competency must be 255 characters or less.", + BulkCompetenciesResult.ErrorReason.InvalidAlwaysShowDescription => + "Always show description is invalid. The Always show description field must contain 'TRUE' or 'FALSE'", + _ => "Unspecified error.", + }; + } } } From 219ef3c283dd08d6f6990971284e87fb26c2f3ea Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 20 Dec 2024 16:31:07 +0000 Subject: [PATCH 018/271] Formatter changes --- .../DataServices/FrameworkDataService.cs | 4 +-- .../Frameworks/Import/BulkCompetency.cs | 2 +- .../Models/BulkCompetenciesData.cs | 2 +- .../ImportCompetenciesPreProcessViewModel.cs | 2 +- .../Developer/ImportCompleted.cshtml | 34 +++++++++---------- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 48ca33384f..a2fee2aee4 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -2401,7 +2401,7 @@ FROM FrameworkDefaultQuestions public IEnumerable GetBulkCompetenciesForFramework(int frameworkId) { - if(frameworkId < 1) + if (frameworkId < 1) { return connection.Query( @"SELECT NULL AS ID, '' AS CompetencyGroup, '' AS GroupDescription, '' AS Competency, '' AS CompetencyDescription, NULL AS AlwaysShowDescription, '' AS FlagsCsv" @@ -2423,7 +2423,7 @@ Competencies AS c INNER JOIN new { frameworkId } ); } - + } } } diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs index 63c66f9049..298639d4c7 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs @@ -8,7 +8,7 @@ namespace DigitalLearningSolutions.Data.Models.Frameworks.Import { public class BulkCompetency { - public int? id { get; set; } + public int? id { get; set; } public string? CompetencyGroup { get; set; } public string? GroupDescription { get; set; } public string? Competency { get; set; } diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index f81e85f952..173b1d0a52 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -11,7 +11,7 @@ public BulkCompetenciesData(int frameworkId, int adminUserId, string competencie FrameworkId = frameworkId; AdminUserId = adminUserId; CompetenciesFileName = competenciesFileName; - TabName = tabName; + TabName = tabName; } public int FrameworkId { get; set; } public string TabName { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs index 5817ecf0c6..45f72c2bca 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs @@ -25,7 +25,7 @@ public ImportCompetenciesPreProcessViewModel(BulkCompetenciesResult bulkCompeten public int CompetencyGroupsToAddCount { get; set; } public int CompetencyGroupsToUpdateCount { get; set; } public int ToUpdateOrSkipCount { get; set; } - + private static string MapReasonToErrorMessage(BulkCompetenciesResult.ErrorReason reason) { return reason switch diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml index f0b1627510..716575afc8 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml @@ -4,25 +4,25 @@ @using Microsoft.Extensions.Configuration @model ImportCompetenciesPreProcessViewModel @{ - ViewData["Title"] = "Framework - Import Competencies"; - ViewData["Application"] = "Framework Service"; - ViewData["HeaderPathName"] = "Framework Service"; - var errorHasOccurred = !ViewData.ModelState.IsValid; - var cancelLinkData = Html.GetRouteValues(); + ViewData["Title"] = "Framework - Import Competencies"; + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + var cancelLinkData = Html.GetRouteValues(); } @section NavMenuItems { - + } - @section NavBreadcrumbs { - +@section NavBreadcrumbs { + } From e84a5ed1cf69c229d76a3236f3844d320a339780 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 20 Dec 2024 16:49:08 +0000 Subject: [PATCH 019/271] Fixes form input id --- .../Views/Frameworks/Developer/ImportCompetencies.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml index 9eede68e22..c91ec018ca 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml @@ -49,7 +49,7 @@
- + From 8a98bee9c6e1c2b3350597d22478194b95e03adf Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 23 Dec 2024 12:21:13 +0000 Subject: [PATCH 020/271] TD-5154 Implements basic pre-process logic and view and adds validation to exported sheet --- .../Frameworks/Import/CompetencyTableRow.cs | 8 +- .../Import/ImportCompetenciesResult.cs | 15 ++- .../ImportCompetencies.cs | 29 ++++- .../Models/BulkCompetenciesData.cs | 6 +- .../Models/BulkCompetenciesResult.cs | 40 ------- .../ImportCompetenciesFromFileService.cs | 52 +++++++-- .../ImportCompetenciesPreProcessViewModel.cs | 16 +-- .../ImportCompetenciesResultsViewModel.cs | 4 +- .../Frameworks/ImportCompetenciesViewModel.cs | 1 + .../Developer/ImportCompetencies.cshtml | 105 ++++++++++-------- .../Developer/ImportCompleted.cshtml | 53 +++++++++ .../Frameworks/Developer/_Structure.cshtml | 2 +- 12 files changed, 208 insertions(+), 123 deletions(-) delete mode 100644 DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index bace71a8c4..374e016334 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -1,6 +1,8 @@ namespace DigitalLearningSolutions.Data.Models.Frameworks.Import { using ClosedXML.Excel; + using Org.BouncyCastle.Asn1.X509; + public enum RowStatus { NotYetProcessed, @@ -18,16 +20,16 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) { string? FindFieldValue(string name) { - var colNumber = table.FindColumn(col => col.FirstCell().Value.ToString()?.ToLower() == name).ColumnNumber(); + var colNumber = table.FindColumn(col => col.FirstCell().Value.ToString()?.ToLower() == name.ToLower()).ColumnNumber(); return row.Cell(colNumber).GetValue(); } RowNumber = row.RowNumber(); - id = int.Parse(FindFieldValue("ID")); + id = row.Cell(1).GetValue(); CompetencyGroup = FindFieldValue("CompetencyGroup"); Competency = FindFieldValue("Competency"); CompetencyDescription = FindFieldValue("CompetencyDescription"); - GroupDescription = FindFieldValue("CompetencyGroupDescription"); + GroupDescription = FindFieldValue("GroupDescription"); FlagsCsv = FindFieldValue("FlagsCSV"); RowStatus = RowStatus.NotYetProcessed; } diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs index 7f78d6f883..3c2bc8e287 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs @@ -8,10 +8,11 @@ public class ImportCompetenciesResult { public enum ErrorReason { + InvalidId, MissingCompetencyName, - TooLongCompetencyGroupName, TooLongCompetencyName, - AlreadyExists + TooLongCompetencyGroupName, + InvalidAlwaysShowDescription } public ImportCompetenciesResult() { } @@ -20,16 +21,18 @@ IReadOnlyCollection competencyTableRows ) { ProcessedCount = competencyTableRows.Count; - CompetenciesInsertedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); - CompetencyGroupsInsertedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyGroupInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); + CompetencyAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); + GroupAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyGroupInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped); Errors = competencyTableRows.Where(dr => dr.Error.HasValue).Select(dr => (dr.RowNumber, dr.Error!.Value)); } public IEnumerable<(int RowNumber, ErrorReason Reason)>? Errors { get; set; } public int ProcessedCount { get; set; } - public int CompetenciesInsertedCount { get; set; } - public int CompetencyGroupsInsertedCount { get; set; } + public int CompetencyAddedCount { get; set; } + public int CompetencyUpdatedCount { get; set; } + public int GroupAddedCount { get; set; } + public int GroupUpdatedCount { get; set; } public int SkippedCount { get; set; } } } diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index d1d8034f09..5fd03a7a09 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -1,21 +1,19 @@ using ClosedXML.Excel; using DigitalLearningSolutions.Data.Exceptions; -using DigitalLearningSolutions.Data.Migrations; -using DigitalLearningSolutions.Data.Utilities; using DigitalLearningSolutions.Web.Helpers; using DigitalLearningSolutions.Web.Models; using DigitalLearningSolutions.Web.Services; using DigitalLearningSolutions.Web.ViewModels.Frameworks; using GDS.MultiPageFormData.Enums; -using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; +using System.IO; namespace DigitalLearningSolutions.Web.Controllers.FrameworksController { public partial class FrameworksController { [Route("/Framework/{frameworkId}/{tabname}/Import")] - public IActionResult ImportCompetencies(int frameworkId, string tabname) + public IActionResult ImportCompetencies(int frameworkId, string tabname, bool isNotBlank) { var adminId = GetAdminId(); var userRole = frameworkService.GetAdminUserRoleForFrameworkId(adminId, frameworkId); @@ -23,7 +21,8 @@ public IActionResult ImportCompetencies(int frameworkId, string tabname) return StatusCode(403); var model = new ImportCompetenciesViewModel() { - FrameworkId = frameworkId + FrameworkId = frameworkId, + IsNotBlank = isNotBlank }; return View("Developer/ImportCompetencies", model); } @@ -72,7 +71,25 @@ public IActionResult StartImport(ImportCompetenciesViewModel model, string tabna [Route("/Framework/{frameworkId}/{tabname}/ImportCompleted")] public IActionResult ImportCompleted() { - return View("Developer/ImportCompleted"); + var data = GetBulkUploadData(); + var uploadDir = Path.Combine(webHostEnvironment.WebRootPath, "Uploads\\"); + var filePath = Path.Combine(uploadDir, data.CompetenciesFileName); + var workbook = new XLWorkbook(filePath); + try + { + var results = importCompetenciesFromFileService.PreProcessCompetenciesTable(workbook); + var resultsModel = new ImportCompetenciesPreProcessViewModel(results); + data.CompetenciesToProcessCount = resultsModel.ToProcessCount; + data.CompetenciesToAddCount = resultsModel.CompetenciesToAddCount; + data.CompetenciesToUpdateCount = resultsModel.CompetenciesToUpdateCount; + setBulkUploadData(data); + return View("Developer/ImportCompleted", resultsModel); + } + catch (InvalidHeadersException) + { + FileHelper.DeleteFile(webHostEnvironment, data.CompetenciesFileName); + return View("ImportFailed"); + } } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName) diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 173b1d0a52..e853675c9a 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -19,9 +19,9 @@ public BulkCompetenciesData(int frameworkId, int adminUserId, string competencie public string CompetenciesFileName { get; set; } public List AssessmentQuestionIDs { get; set; } public int? AddAssessmentQuestionOption { get; set; } - public int ToProcessCount { get; set; } - public int ToAddCount { get; set; } - public int ToUpdateCount { get; set; } + public int CompetenciesToProcessCount { get; set; } + public int CompetenciesToAddCount { get; set; } + public int CompetenciesToUpdateCount { get; set; } public int LastRowProcessed { get; set; } public int SubtotalCompetenciesAdded { get; set; } public int SubtotalCompetenciesUpdated { get; set; } diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs deleted file mode 100644 index e770ac39b7..0000000000 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesResult.cs +++ /dev/null @@ -1,40 +0,0 @@ -using DigitalLearningSolutions.Data.Models.Frameworks.Import; -using System.Collections.Generic; -using System.Linq; - -namespace DigitalLearningSolutions.Web.Models -{ - public class BulkCompetenciesResult - { - public enum ErrorReason - { - InvalidId, - MissingCompetencyName, - TooLongCompetencyName, - TooLongCompetencyGroupName, - InvalidAlwaysShowDescription - } - - public BulkCompetenciesResult() { } - - public BulkCompetenciesResult( - IReadOnlyCollection competencyRows - ) - { - ProcessedCount = competencyRows.Count; - CompetencyAddedCount = competencyRows.Count(cr => cr.RowStatus == RowStatus.CompetencyInserted || cr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); - GroupAddedCount = competencyRows.Count(cr => cr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); - GroupUpdatedCount = competencyRows.Count(cr => cr.RowStatus == RowStatus.CompetencyGroupUpdated || cr.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated); - SkippedCount = competencyRows.Count(cr => cr.RowStatus == RowStatus.Skipped); - Errors = (IEnumerable<(int RowNumber, ErrorReason Reason)>)competencyRows.Where(cr => cr.Error.HasValue).Select(cr => (cr.RowNumber, cr.Error!.Value)); - } - - public IEnumerable<(int RowNumber, ErrorReason Reason)>? Errors { get; set; } - public int ProcessedCount { get; set; } - public int CompetencyAddedCount { get; set; } - public int CompetencyUpdatedCount { get; set; } - public int GroupAddedCount { get; set; } - public int GroupUpdatedCount { get; set; } - public int SkippedCount { get; set; } - } -} diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 0ba48b08d7..d4ffd9a37e 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -12,12 +12,14 @@ namespace DigitalLearningSolutions.Web.Services using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Data.Helpers; using DigitalLearningSolutions.Data.Models.Frameworks.Import; + using DigitalLearningSolutions.Web.Models; using Microsoft.AspNetCore.Http; public interface IImportCompetenciesFromFileService { byte[] GetCompetencyFileForFramework(int frameworkId, bool v); - public ImportCompetenciesResult ProcessCompetenciesFromFile(IFormFile file, int adminUserId, int frameworkId); + public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook); + public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId); } public class ImportCompetenciesFromFileService : IImportCompetenciesFromFileService { @@ -30,17 +32,38 @@ IFrameworkService frameworkService { this.frameworkService = frameworkService; } - public ImportCompetenciesResult ProcessCompetenciesFromFile(IFormFile file, int adminUserId, int frameworkId) + public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook) + { + var table = OpenCompetenciesTable(workbook); + var competencyRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); + foreach (var competencyRow in competencyRows) + { + PreProcessCompetencyRow(competencyRow); + } + return new ImportCompetenciesResult(competencyRows); + } + private void PreProcessCompetencyRow(CompetencyTableRow competencyRow) + { + if (competencyRow.id == null) + { + competencyRow.RowStatus = RowStatus.CompetencyInserted; + } + else + { + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + } + } + public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId) { int maxFrameworkCompetencyId = frameworkService.GetMaxFrameworkCompetencyID(); int maxFrameworkCompetencyGroupId = frameworkService.GetMaxFrameworkCompetencyGroupID(); - var table = OpenCompetenciesTable(file); + var table = OpenCompetenciesTable(workbook); return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId); } - internal IXLTable OpenCompetenciesTable(IFormFile file) + internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook) { - var workbook = new XLWorkbook(file.OpenReadStream()); var worksheet = workbook.Worksheet(1); + worksheet.Columns(1, 15).Unhide(); if (worksheet.Tables.Count() == 0) { throw new InvalidHeadersException(); @@ -112,11 +135,15 @@ private static bool ValidateHeaders(IXLTable table) { var expectedHeaders = new List { - "competency group", - "competency name", - "competency description" + "ID", + "CompetencyGroup", + "GroupDescription", + "Competency", + "CompetencyDescription", + "AlwaysShowDescription", + "FlagsCSV" }.OrderBy(x => x); - var actualHeaders = table.Fields.Select(x => x.Name.ToLower()).OrderBy(x => x); + var actualHeaders = table.Fields.Select(x => x.Name).OrderBy(x => x); return actualHeaders.SequenceEqual(expectedHeaders); } @@ -128,6 +155,13 @@ public byte[] GetCompetencyFileForFramework(int frameworkId, bool blank) { ClosedXmlHelper.HideWorkSheetColumn(workbook, "ID"); } + var options = new List { "TRUE", "FALSE" }; + ClosedXmlHelper.AddValidationListToWorksheetColumn(workbook, 6, options); + var rowCount = workbook.Worksheet(1).RangeUsed().RowCount(); + ClosedXmlHelper.AddValidationRangeToWorksheetColumn(workbook, 1, 1, rowCount, 1); + // Calculate the workbook + workbook.CalculateMode = XLCalculateMode.Auto; + workbook.RecalculateAllFormulas(); using var stream = new MemoryStream(); workbook.SaveAs(stream); return stream.ToArray(); diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs index 45f72c2bca..8690f31013 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs @@ -2,12 +2,13 @@ using System; using DigitalLearningSolutions.Web.Models; using System.Linq; +using DigitalLearningSolutions.Data.Models.Frameworks.Import; namespace DigitalLearningSolutions.Web.ViewModels.Frameworks { public class ImportCompetenciesPreProcessViewModel { - public ImportCompetenciesPreProcessViewModel(BulkCompetenciesResult bulkCompetenciesResult) + public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompetenciesResult) { ToProcessCount = bulkCompetenciesResult.ProcessedCount; CompetenciesToAddCount = bulkCompetenciesResult.CompetencyAddedCount; @@ -25,20 +26,21 @@ public ImportCompetenciesPreProcessViewModel(BulkCompetenciesResult bulkCompeten public int CompetencyGroupsToAddCount { get; set; } public int CompetencyGroupsToUpdateCount { get; set; } public int ToUpdateOrSkipCount { get; set; } + public string? CompetenciesFileName { get; set; } - private static string MapReasonToErrorMessage(BulkCompetenciesResult.ErrorReason reason) + private static string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReason reason) { return reason switch { - BulkCompetenciesResult.ErrorReason.TooLongCompetencyGroupName => + ImportCompetenciesResult.ErrorReason.TooLongCompetencyGroupName => "Group name must be 255 characters or less.", - BulkCompetenciesResult.ErrorReason.MissingCompetencyName => + ImportCompetenciesResult.ErrorReason.MissingCompetencyName => "Competency is blank. Competency is a required field and cannot be left blank", - BulkCompetenciesResult.ErrorReason.InvalidId => + ImportCompetenciesResult.ErrorReason.InvalidId => "The ID provided does not match a Competency ID in this Framework", - BulkCompetenciesResult.ErrorReason.TooLongCompetencyName => + ImportCompetenciesResult.ErrorReason.TooLongCompetencyName => "Competency must be 255 characters or less.", - BulkCompetenciesResult.ErrorReason.InvalidAlwaysShowDescription => + ImportCompetenciesResult.ErrorReason.InvalidAlwaysShowDescription => "Always show description is invalid. The Always show description field must contain 'TRUE' or 'FALSE'", _ => "Unspecified error.", }; diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesResultsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesResultsViewModel.cs index 8267146c71..d76b0338ae 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesResultsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesResultsViewModel.cs @@ -9,8 +9,8 @@ public class ImportCompetenciesResultsViewModel public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompetenciesResult) { ProcessedCount = importCompetenciesResult.ProcessedCount; - CompetenciesInsertedCount = importCompetenciesResult.CompetenciesInsertedCount; - CompetencyGroupsInsertedCount = importCompetenciesResult.CompetencyGroupsInsertedCount; + CompetenciesInsertedCount = importCompetenciesResult.CompetencyAddedCount; + CompetencyGroupsInsertedCount = importCompetenciesResult.GroupAddedCount; SkippedCount = importCompetenciesResult.SkippedCount; Errors = importCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason))); } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesViewModel.cs index eb44330a20..27fa9f38b6 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesViewModel.cs @@ -7,6 +7,7 @@ public class ImportCompetenciesViewModel { public int FrameworkId { get; set; } + public bool IsNotBlank { get; set; } [Required(ErrorMessage = "Import competencies file is required")] [AllowedExtensions(new[] { ".xlsx" }, "Import competencies file must be in xlsx format")] [MaxFileSize(5 * 1024 * 1024, "Maximum allowed file size is 5MB")] diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml index c91ec018ca..90935a7f1c 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml @@ -30,59 +30,72 @@ { } -

Bulk upload or update competencies

+

Bulk upload @(Model.IsNotBlank ? "or update" : "") competencies

-

- To bulk add and/or update competencies in your framework, download an Excel workbook using one of the options below. -

-
-
- -
- -

- What would you like to download? -

-
-
- Select one option -
-
-
- - +
+ @if(Model.IsNotBlank) + { + +

+ To bulk add and/or update competencies in your framework, download an Excel workbook using one of the options below. +

+ +
+ +

+ What would you like to download? +

+
+
+ Select one option
-
-
- This Excel file will be empty.
- New competencies can be added by including their details on a blank row. +
+
+ +
- - Download template - -
-
- - -
-
-
- This Excel file will include all existing competencies whose details you can update.
- New competencies can be added by including their details on a blank row. +
+
+ This Excel file will be empty.
+ New competencies can be added by including their details on a blank row. +
+ + Download template + +
+
+ + +
+
+
+ This Excel file will include all existing competencies whose details you can update.
+ New competencies can be added by including their details on a blank row. +
+ + Download competencies +
- - Download competencies -
-
-
+
+ + } + else + { +

+ Download a blank template for bulk adding competencies to your framework. This Excel file will be empty. New competencies can be added by including their details on a blank row. +

+ + Download template + + }
- +

Upload file

Once you have an Excel competencies workbook, add or update competencies to the worksheet, save and start the upload process. diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml index 716575afc8..e943966a5d 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml @@ -26,3 +26,56 @@

} +

Delegate file uploaded

+

@(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

+
    +
  • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
  • +
  • @Model.CompetencyGroupsToAddCount new @(Model.CompetencyGroupsToAddCount == 1 ? "competency" : "competencies") to register
  • +
  • @Model.ToUpdateOrSkipCount delegate @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
  • + @if (Model.ErrorCount > 0) + { +
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
  • + } + else + { +
  • No errors
  • + } +
+@if (Model.ErrorCount == 0) +{ + Continue +} +else +{ +

Check the information below. You will need fix these errors before continuing or remove the rows with errors from your spreadsheet:

+
+ + Error: @Model.ErrorCount delegate @(Model.ErrorCount == 1 ? "row" : "rows") contain errors and cannot be processed + +
+ @foreach (var (rowNumber, errorMessage) in Model.Errors) + { +
+
+ Row @rowNumber +
+
+ @errorMessage +
+ +
+ } +
+
+

Upload corrected file

+

+ Once you have made corrections to the Excel competency workbook to address the errors above, save and restart the upload process. +

+
+ + + + + +} + diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml index 7fa159981d..a1097f6e18 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml @@ -81,7 +81,7 @@ else
} From bafd87ad1d4b1a6a5f0f167b442db035e4b64b65 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 23 Dec 2024 16:16:20 +0000 Subject: [PATCH 021/271] TD-5154 Implements upload results page with validation errors --- .../FrameworksController/ImportCompetencies.cs | 13 +++++++------ .../Helpers/CommonValidationErrorMessages.cs | 2 +- .../Models/BulkCompetenciesData.cs | 4 +++- .../Services/ImportCompetenciesFromFileService.cs | 1 + .../ImportCompetenciesPreProcessViewModel.cs | 4 +++- .../Frameworks/Developer/ImportCompleted.cshtml | 8 +++++--- 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 5fd03a7a09..d713235f4f 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -40,7 +40,8 @@ public IActionResult DownloadCompetencies(int frameworkId, int DownloadOption) } [HttpPost] [Route("/Framework/{frameworkId}/{tabname}/Import")] - public IActionResult StartImport(ImportCompetenciesViewModel model, string tabname) + [Route("/Framework/{frameworkId}/{tabname}/ImportCompleted")] + public IActionResult StartImport(ImportCompetenciesViewModel model, string tabname, bool isNotBlank) { if (!ModelState.IsValid) return View("Developer/ImportCompetencies", model); @@ -50,11 +51,11 @@ public IActionResult StartImport(ImportCompetenciesViewModel model, string tabna var workbook = new XLWorkbook(model.ImportFile.OpenReadStream()); if (!workbook.Worksheets.Contains(ImportCompetenciesFromFileService.CompetenciesSheetName)) { - ModelState.AddModelError("InvalidWorksheet", CommonValidationErrorMessages.InvalidCompetenciesUploadExcelFile); + ModelState.AddModelError("ImportFile", CommonValidationErrorMessages.InvalidCompetenciesUploadExcelFile); return View("Developer/ImportCompetencies", model); } var competenciesFileName = FileHelper.UploadFile(webHostEnvironment, model.ImportFile); - setupBulkUploadData(model.FrameworkId, adminUserID, competenciesFileName, tabname); + setupBulkUploadData(model.FrameworkId, adminUserID, competenciesFileName, tabname, isNotBlank); return RedirectToAction("ImportCompleted", "Frameworks", new { frameworkId = model.FrameworkId, tabname }); } @@ -78,7 +79,7 @@ public IActionResult ImportCompleted() try { var results = importCompetenciesFromFileService.PreProcessCompetenciesTable(workbook); - var resultsModel = new ImportCompetenciesPreProcessViewModel(results); + var resultsModel = new ImportCompetenciesPreProcessViewModel(results) { IsNotBlank = data.IsNotBlank, TabName = data.TabName }; data.CompetenciesToProcessCount = resultsModel.ToProcessCount; data.CompetenciesToAddCount = resultsModel.CompetenciesToAddCount; data.CompetenciesToUpdateCount = resultsModel.CompetenciesToUpdateCount; @@ -92,12 +93,12 @@ public IActionResult ImportCompleted() } } - private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName) + private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { TempData.Clear(); multiPageFormService.ClearMultiPageFormData(MultiPageFormDataFeature.AddCustomWebForm("BulkCompetencyDataCWF"), TempData); var today = clockUtility.UtcToday; - var bulkUploadData = new BulkCompetenciesData(frameworkId, adminUserID, competenciessFileName, tabName); + var bulkUploadData = new BulkCompetenciesData(frameworkId, adminUserID, competenciessFileName, tabName, isNotBlank); setBulkUploadData(bulkUploadData); } private void setBulkUploadData(BulkCompetenciesData bulkUploadData) diff --git a/DigitalLearningSolutions.Web/Helpers/CommonValidationErrorMessages.cs b/DigitalLearningSolutions.Web/Helpers/CommonValidationErrorMessages.cs index e76eec613c..531a528e98 100644 --- a/DigitalLearningSolutions.Web/Helpers/CommonValidationErrorMessages.cs +++ b/DigitalLearningSolutions.Web/Helpers/CommonValidationErrorMessages.cs @@ -36,7 +36,7 @@ public static class CommonValidationErrorMessages public const string CentreNameAlreadyExist = "The centre name you have entered already exists, please enter a different centre name"; public const string MaxBulkUploadRowsLimit = "File must contain no more than {0} rows"; public const string InvalidBulkUploadExcelFile = "The uploaded file must contain a \"DelegatesBulkUpload\" worksheet. Use the \"Download delegates\" button to generate a template."; - public const string InvalidCompetenciesUploadExcelFile = "The uploaded file must contain a \"CompetenciesBulkUpload\" worksheet. Use the \"Download competencies\" button to generate a template."; + public const string InvalidCompetenciesUploadExcelFile = "The uploaded file must contain a \"CompetenciesBulkUpload\" worksheet. Use the \"Download template\" button to generate a template."; public const string ReportFilterReturnsTooManyRows = "The report frequency is too high for the date range. Choose a lower report frequency (or shorten the date range)"; } } diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index e853675c9a..290e263477 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -6,16 +6,18 @@ namespace DigitalLearningSolutions.Web.Models public class BulkCompetenciesData { public BulkCompetenciesData() { } - public BulkCompetenciesData(int frameworkId, int adminUserId, string competenciesFileName, string tabName) + public BulkCompetenciesData(int frameworkId, int adminUserId, string competenciesFileName, string tabName, bool isNotBlank) { FrameworkId = frameworkId; AdminUserId = adminUserId; CompetenciesFileName = competenciesFileName; TabName = tabName; + IsNotBlank = isNotBlank; } public int FrameworkId { get; set; } public string TabName { get; set; } public int AdminUserId { get; set; } + public bool IsNotBlank { get; set; } public string CompetenciesFileName { get; set; } public List AssessmentQuestionIDs { get; set; } public int? AddAssessmentQuestionOption { get; set; } diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index d4ffd9a37e..1746ebe904 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -44,6 +44,7 @@ public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook } private void PreProcessCompetencyRow(CompetencyTableRow competencyRow) { + competencyRow.Validate(); if (competencyRow.id == null) { competencyRow.RowStatus = RowStatus.CompetencyInserted; diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs index 8690f31013..6d96699586 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs @@ -26,7 +26,9 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet public int CompetencyGroupsToAddCount { get; set; } public int CompetencyGroupsToUpdateCount { get; set; } public int ToUpdateOrSkipCount { get; set; } - public string? CompetenciesFileName { get; set; } + public string? ImportFile { get; set; } + public bool IsNotBlank { get; set; } + public string TabName { get; set; } private static string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReason reason) { diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml index e943966a5d..1113f7b31d 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml @@ -30,7 +30,7 @@

@(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

  • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
  • -
  • @Model.CompetencyGroupsToAddCount new @(Model.CompetencyGroupsToAddCount == 1 ? "competency" : "competencies") to register
  • +
  • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? "competency" : "competencies") to add
  • @Model.ToUpdateOrSkipCount delegate @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
  • @if (Model.ErrorCount > 0) { @@ -71,9 +71,11 @@ else

    Once you have made corrections to the Excel competency workbook to address the errors above, save and restart the upload process.

    -
    + - + + + From 445ecff46a3118811e20b07186a08336ba440cb4 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 23 Dec 2024 16:30:48 +0000 Subject: [PATCH 022/271] TD-5154 Adds always show description validation --- .../Models/Frameworks/Import/CompetencyTableRow.cs | 11 +++++++++-- .../ImportCompetenciesPreProcessViewModel.cs | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index 374e016334..ab79a40b43 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -1,7 +1,6 @@ namespace DigitalLearningSolutions.Data.Models.Frameworks.Import { using ClosedXML.Excel; - using Org.BouncyCastle.Asn1.X509; public enum RowStatus { @@ -12,7 +11,8 @@ public enum RowStatus CompetencyUpdated, CompetencyGroupInserted, CompetencyGroupUpdated, - CompetencyGroupAndCompetencyUpdated + CompetencyGroupAndCompetencyUpdated, + InvalidAlwaysShowDescription } public class CompetencyTableRow : BulkCompetency { @@ -30,10 +30,13 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) Competency = FindFieldValue("Competency"); CompetencyDescription = FindFieldValue("CompetencyDescription"); GroupDescription = FindFieldValue("GroupDescription"); + AlwaysShowDescriptionRaw = FindFieldValue("AlwaysShowDescription"); + AlwaysShowDescription = bool.TryParse(AlwaysShowDescriptionRaw, out var hasPrn) ? hasPrn : (bool?)null; FlagsCsv = FindFieldValue("FlagsCSV"); RowStatus = RowStatus.NotYetProcessed; } public int RowNumber { get; set; } + public string? AlwaysShowDescriptionRaw { get; set; } public ImportCompetenciesResult.ErrorReason? Error { get; set; } public RowStatus RowStatus { get; set; } public bool Validate() @@ -50,6 +53,10 @@ public bool Validate() { Error = ImportCompetenciesResult.ErrorReason.TooLongCompetencyName; } + else if (!string.IsNullOrWhiteSpace(AlwaysShowDescriptionRaw) && !bool.TryParse(AlwaysShowDescriptionRaw, out _)) + { + Error = ImportCompetenciesResult.ErrorReason.InvalidAlwaysShowDescription; + } return !Error.HasValue; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs index 6d96699586..fac6c884c1 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs @@ -43,7 +43,7 @@ private static string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReas ImportCompetenciesResult.ErrorReason.TooLongCompetencyName => "Competency must be 255 characters or less.", ImportCompetenciesResult.ErrorReason.InvalidAlwaysShowDescription => - "Always show description is invalid. The Always show description field must contain 'TRUE' or 'FALSE'", + "Always show description is invalid. The Always show description field must contain 'TRUE' or 'FALSE'", _ => "Unspecified error.", }; } From 51fae040e104a3f6742f861a00eeac719495d9b8 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 23 Dec 2024 16:34:06 +0000 Subject: [PATCH 023/271] Formatter changes --- .../Views/Frameworks/Developer/ImportCompetencies.cshtml | 8 ++++---- .../Views/Frameworks/Developer/ImportCompleted.cshtml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml index 90935a7f1c..56ae470de0 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml @@ -33,9 +33,9 @@

    Bulk upload @(Model.IsNotBlank ? "or update" : "") competencies

    - @if(Model.IsNotBlank) + @if (Model.IsNotBlank) { - +

    To bulk add and/or update competencies in your framework, download an Excel workbook using one of the options below.

    @@ -94,8 +94,8 @@ } -
    - + +

    Upload file

    Once you have an Excel competencies workbook, add or update competencies to the worksheet, save and start the upload process. diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml index 1113f7b31d..5b355f572e 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml @@ -75,7 +75,7 @@ else - + From f3c4b62e14a994848dce7724a2ed4b7446565339 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 23 Dec 2024 16:54:56 +0000 Subject: [PATCH 024/271] Fixes query to avoid reliance on new SQL 2017 STRING_AGG function --- .../DataServices/FrameworkDataService.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index a2fee2aee4..4627c67572 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -2410,15 +2410,19 @@ public IEnumerable GetBulkCompetenciesForFramework(int framework else { return connection.Query( - @"SELECT fc.ID, cg.Name AS CompetencyGroup, cg.Description AS GroupDescription, c.Name AS Competency, c.Description AS CompetencyDescription, c.AlwaysShowDescription, STRING_AGG(f.FlagName, ', ') AS FlagsCsv - FROM Flags AS f RIGHT OUTER JOIN - CompetencyFlags AS cf ON f.ID = cf.FlagID RIGHT OUTER JOIN + @"SELECT fc.ID, cg.Name AS CompetencyGroup, cg.Description AS GroupDescription, c.Name AS Competency, c.Description AS CompetencyDescription, c.AlwaysShowDescription, STUFF(( + SELECT ', ' + f.FlagName + FROM Flags AS f + INNER JOIN CompetencyFlags AS cf ON f.ID = cf.FlagID + WHERE cf.CompetencyID = c.ID + FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)'), 1, 2, '') AS FlagsCsv + FROM Competencies AS c INNER JOIN FrameworkCompetencies AS fc ON c.ID = fc.CompetencyID INNER JOIN FrameworkCompetencyGroups AS fcg ON fc.FrameworkCompetencyGroupID = fcg.ID INNER JOIN - CompetencyGroups AS cg ON fcg.CompetencyGroupID = cg.ID ON cf.CompetencyID = c.ID + CompetencyGroups AS cg ON fcg.CompetencyGroupID = cg.ID WHERE (fc.FrameworkID = @frameworkId) - GROUP BY fc.ID, cg.Name, cg.Description, c.Name, c.Description, c.AlwaysShowDescription, fcg.Ordering, fc.Ordering + GROUP BY fc.ID, c.ID, cg.Name, cg.Description, c.Name, c.Description, c.AlwaysShowDescription, fcg.Ordering, fc.Ordering ORDER BY fcg.Ordering, fc.Ordering", new { frameworkId } ); From 219f274ea9610d0735a1f4bcd2336e1450600825 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 30 Dec 2024 10:41:12 +0000 Subject: [PATCH 025/271] TD-5216 Moves to import namespace and separates form data in viewmodel --- .../ImportCompetencies.cs | 31 ++++--- .../ImportCompetenciesFormData.cs} | 6 +- .../ImportCompetenciesPreProcessViewModel.cs | 2 +- .../ImportCompetenciesResultsViewModel.cs | 2 +- .../Import/ImportCompetenciesViewModel.cs | 13 +++ .../{ => Import}/ImportCompleted.cshtml | 4 +- .../{ => Import}/ImportFailed.cshtml | 88 +++++++++---------- .../Index.cshtml} | 8 +- .../{ => Import}/UploadResults.cshtml | 2 +- 9 files changed, 89 insertions(+), 67 deletions(-) rename DigitalLearningSolutions.Web/ViewModels/Frameworks/{ImportCompetenciesViewModel.cs => Import/ImportCompetenciesFormData.cs} (69%) rename DigitalLearningSolutions.Web/ViewModels/Frameworks/{ => Import}/ImportCompetenciesPreProcessViewModel.cs (97%) rename DigitalLearningSolutions.Web/ViewModels/Frameworks/{ => Import}/ImportCompetenciesResultsViewModel.cs (96%) create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesViewModel.cs rename DigitalLearningSolutions.Web/Views/Frameworks/Developer/{ => Import}/ImportCompleted.cshtml (95%) rename DigitalLearningSolutions.Web/Views/Frameworks/Developer/{ => Import}/ImportFailed.cshtml (95%) rename DigitalLearningSolutions.Web/Views/Frameworks/Developer/{ImportCompetencies.cshtml => Import/Index.cshtml} (96%) rename DigitalLearningSolutions.Web/Views/Frameworks/Developer/{ => Import}/UploadResults.cshtml (97%) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index d713235f4f..15a1816dbb 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -3,7 +3,7 @@ using DigitalLearningSolutions.Web.Helpers; using DigitalLearningSolutions.Web.Models; using DigitalLearningSolutions.Web.Services; -using DigitalLearningSolutions.Web.ViewModels.Frameworks; +using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import; using GDS.MultiPageFormData.Enums; using Microsoft.AspNetCore.Mvc; using System.IO; @@ -16,15 +16,16 @@ public partial class FrameworksController public IActionResult ImportCompetencies(int frameworkId, string tabname, bool isNotBlank) { var adminId = GetAdminId(); + var framework = frameworkService.GetFrameworkDetailByFrameworkId(frameworkId, adminId); var userRole = frameworkService.GetAdminUserRoleForFrameworkId(adminId, frameworkId); if (userRole < 2) return StatusCode(403); var model = new ImportCompetenciesViewModel() { - FrameworkId = frameworkId, + Framework = framework, IsNotBlank = isNotBlank }; - return View("Developer/ImportCompetencies", model); + return View("Developer/Import/Index", model); } public IActionResult DownloadCompetencies(int frameworkId, int DownloadOption) { @@ -40,11 +41,11 @@ public IActionResult DownloadCompetencies(int frameworkId, int DownloadOption) } [HttpPost] [Route("/Framework/{frameworkId}/{tabname}/Import")] - [Route("/Framework/{frameworkId}/{tabname}/ImportCompleted")] - public IActionResult StartImport(ImportCompetenciesViewModel model, string tabname, bool isNotBlank) + [Route("/Framework/{frameworkId}/{tabname}/Import/Uploaded")] + public IActionResult StartImport(ImportCompetenciesFormData model, int frameworkId, string tabname, bool isNotBlank) { if (!ModelState.IsValid) - return View("Developer/ImportCompetencies", model); + return View("Developer/Import/Index", model); try { var adminUserID = User.GetAdminIdKnownNotNull(); @@ -52,12 +53,12 @@ public IActionResult StartImport(ImportCompetenciesViewModel model, string tabna if (!workbook.Worksheets.Contains(ImportCompetenciesFromFileService.CompetenciesSheetName)) { ModelState.AddModelError("ImportFile", CommonValidationErrorMessages.InvalidCompetenciesUploadExcelFile); - return View("Developer/ImportCompetencies", model); + return View("Developer/Import/Index", model); } var competenciesFileName = FileHelper.UploadFile(webHostEnvironment, model.ImportFile); - setupBulkUploadData(model.FrameworkId, adminUserID, competenciesFileName, tabname, isNotBlank); + setupBulkUploadData(frameworkId, adminUserID, competenciesFileName, tabname, isNotBlank); - return RedirectToAction("ImportCompleted", "Frameworks", new { frameworkId = model.FrameworkId, tabname }); + return RedirectToAction("ImportCompleted", "Frameworks", new { frameworkId, tabname }); } catch (DocumentFormat.OpenXml.Packaging.OpenXmlPackageException) { @@ -66,10 +67,10 @@ public IActionResult StartImport(ImportCompetenciesViewModel model, string tabna } catch (InvalidHeadersException) { - return View("Developer/ImportFailed"); + return View("Developer/Import/ImportFailed"); } } - [Route("/Framework/{frameworkId}/{tabname}/ImportCompleted")] + [Route("/Framework/{frameworkId}/{tabname}/Import/Uploaded")] public IActionResult ImportCompleted() { var data = GetBulkUploadData(); @@ -84,7 +85,7 @@ public IActionResult ImportCompleted() data.CompetenciesToAddCount = resultsModel.CompetenciesToAddCount; data.CompetenciesToUpdateCount = resultsModel.CompetenciesToUpdateCount; setBulkUploadData(data); - return View("Developer/ImportCompleted", resultsModel); + return View("Developer/Import/ImportCompleted", resultsModel); } catch (InvalidHeadersException) { @@ -92,7 +93,13 @@ public IActionResult ImportCompleted() return View("ImportFailed"); } } + [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions")] + public IActionResult AddAssessmentQuestions() + { + var data = GetBulkUploadData(); + return View(); + } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { TempData.Clear(); diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesFormData.cs similarity index 69% rename from DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesViewModel.cs rename to DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesFormData.cs index 27fa9f38b6..98604cc8ee 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesFormData.cs @@ -1,13 +1,11 @@ -namespace DigitalLearningSolutions.Web.ViewModels.Frameworks +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { using DigitalLearningSolutions.Web.Attributes; using Microsoft.AspNetCore.Http; using System.ComponentModel.DataAnnotations; - public class ImportCompetenciesViewModel + public class ImportCompetenciesFormData { - public int FrameworkId { get; set; } - public bool IsNotBlank { get; set; } [Required(ErrorMessage = "Import competencies file is required")] [AllowedExtensions(new[] { ".xlsx" }, "Import competencies file must be in xlsx format")] [MaxFileSize(5 * 1024 * 1024, "Maximum allowed file size is 5MB")] diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs similarity index 97% rename from DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs rename to DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs index fac6c884c1..cb903dd1b2 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs @@ -4,7 +4,7 @@ using System.Linq; using DigitalLearningSolutions.Data.Models.Frameworks.Import; -namespace DigitalLearningSolutions.Web.ViewModels.Frameworks +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { public class ImportCompetenciesPreProcessViewModel { diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesResultsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs similarity index 96% rename from DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesResultsViewModel.cs rename to DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs index d76b0338ae..5294f9d51b 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/ImportCompetenciesResultsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs @@ -1,4 +1,4 @@ -namespace DigitalLearningSolutions.Web.ViewModels.Frameworks +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { using DigitalLearningSolutions.Data.Models.Frameworks.Import; using System.Collections.Generic; diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesViewModel.cs new file mode 100644 index 0000000000..34bb2e65d3 --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesViewModel.cs @@ -0,0 +1,13 @@ +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +{ + using DigitalLearningSolutions.Data.Models.Frameworks; + using DigitalLearningSolutions.Web.Attributes; + using Microsoft.AspNetCore.Http; + using System.ComponentModel.DataAnnotations; + + public class ImportCompetenciesViewModel : ImportCompetenciesFormData + { + public DetailFramework Framework { get; set; } + public bool IsNotBlank { get; set; } + } +} diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml similarity index 95% rename from DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml rename to DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 5b355f572e..cbade17bee 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -1,6 +1,6 @@ @inject IConfiguration Configuration @using DigitalLearningSolutions.Web.Extensions -@using DigitalLearningSolutions.Web.ViewModels.Frameworks +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import @using Microsoft.Extensions.Configuration @model ImportCompetenciesPreProcessViewModel @{ @@ -43,7 +43,7 @@

@if (Model.ErrorCount == 0) { - Continue + Continue } else { diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportFailed.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml similarity index 95% rename from DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportFailed.cshtml rename to DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml index 0176c0b656..f170f620dc 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportFailed.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml @@ -1,44 +1,44 @@ -@inject IConfiguration Configuration -@using DigitalLearningSolutions.Web.Extensions -@using DigitalLearningSolutions.Web.ViewModels.Frameworks -@using Microsoft.Extensions.Configuration -@model ImportCompetenciesResultsViewModel -@{ - ViewData["Title"] = "Framework - Import Failed"; - ViewData["Application"] = "Framework Service"; - ViewData["HeaderPathName"] = "Framework Service"; - var errorHasOccurred = !ViewData.ModelState.IsValid; - var cancelLinkData = Html.GetRouteValues(); -} - -@section NavMenuItems { - -} - @section NavBreadcrumbs { - -} - -
-
-

Import failed

- -

- The file that you uploaded either does not have the correct column headers on the first row or is not formatted as a table. -

- -

Refer to the instructions on the Import Competencies page to make sure your Excel file has the correct column headers.

- - - - -
-
+@inject IConfiguration Configuration +@using DigitalLearningSolutions.Web.Extensions +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +@using Microsoft.Extensions.Configuration +@model ImportCompetenciesResultsViewModel +@{ + ViewData["Title"] = "Framework - Import Failed"; + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + var cancelLinkData = Html.GetRouteValues(); +} + +@section NavMenuItems { + +} + @section NavBreadcrumbs { + +} + +
+
+

Import failed

+ +

+ The file that you uploaded either does not have the correct column headers on the first row or is not formatted as a table. +

+ +

Refer to the instructions on the Import Competencies page to make sure your Excel file has the correct column headers.

+ + + + +
+
diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml similarity index 96% rename from DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml rename to DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 56ae470de0..0d6c3278a4 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/ImportCompetencies.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -1,5 +1,5 @@ @using DigitalLearningSolutions.Web.Extensions -@using DigitalLearningSolutions.Web.ViewModels.Frameworks +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import @model ImportCompetenciesViewModel @{ ViewData["Application"] = "Framework Service"; @@ -31,6 +31,10 @@ }

Bulk upload @(Model.IsNotBlank ? "or update" : "") competencies

+ @if (Model.Framework.PublishStatusID == 3) + { + + }
@if (Model.IsNotBlank) @@ -101,7 +105,7 @@ Once you have an Excel competencies workbook, add or update competencies to the worksheet, save and start the upload process.

- + diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml similarity index 97% rename from DigitalLearningSolutions.Web/Views/Frameworks/Developer/UploadResults.cshtml rename to DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index fefffeae4f..7a7b556f50 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -1,6 +1,6 @@ @inject IConfiguration Configuration @using DigitalLearningSolutions.Web.Extensions -@using DigitalLearningSolutions.Web.ViewModels.Frameworks +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import @using Microsoft.Extensions.Configuration @model ImportCompetenciesResultsViewModel @{ From 5443f3c6600824a4666922572b3b70a02cc545fe Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 30 Dec 2024 10:42:24 +0000 Subject: [PATCH 026/271] TD-5216 Load FALSE into AlwaysShowDescription field for downloaded template --- .../DataServices/FrameworkDataService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 4627c67572..9781639ad9 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -2404,7 +2404,7 @@ public IEnumerable GetBulkCompetenciesForFramework(int framework if (frameworkId < 1) { return connection.Query( - @"SELECT NULL AS ID, '' AS CompetencyGroup, '' AS GroupDescription, '' AS Competency, '' AS CompetencyDescription, NULL AS AlwaysShowDescription, '' AS FlagsCsv" + @"SELECT NULL AS ID, '' AS CompetencyGroup, '' AS GroupDescription, '' AS Competency, '' AS CompetencyDescription, 0 AS AlwaysShowDescription, '' AS FlagsCsv" ); } else From 6beba8011182ccaabe4051897a67b09b1c5a596c Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 30 Dec 2024 15:30:56 +0000 Subject: [PATCH 027/271] TD-5216 Adds competency vocabulary to views --- .../Import/ImportCompetenciesResult.cs | 1 + .../ImportCompetencies.cs | 12 +- .../Models/BulkCompetenciesData.cs | 14 +- .../ImportCompetenciesPreProcessViewModel.cs | 24 ++- .../ImportCompetenciesResultsViewModel.cs | 1 + .../Import/ImportCompetenciesViewModel.cs | 20 ++- .../Developer/Import/ImportCompleted.cshtml | 96 ++++++------ .../Developer/Import/ImportFailed.cshtml | 55 +++---- .../Frameworks/Developer/Import/Index.cshtml | 148 +++++++++--------- .../Developer/Import/UploadResults.cshtml | 97 ++++++------ 10 files changed, 251 insertions(+), 217 deletions(-) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs index 3c2bc8e287..53f0beed1a 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs @@ -22,6 +22,7 @@ IReadOnlyCollection competencyTableRows { ProcessedCount = competencyTableRows.Count; CompetencyAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); + CompetencyUpdatedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdated); GroupAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyGroupInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped); Errors = competencyTableRows.Where(dr => dr.Error.HasValue).Select(dr => (dr.RowNumber, dr.Error!.Value)); diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 15a1816dbb..9e02407e0e 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -20,11 +20,8 @@ public IActionResult ImportCompetencies(int frameworkId, string tabname, bool is var userRole = frameworkService.GetAdminUserRoleForFrameworkId(adminId, frameworkId); if (userRole < 2) return StatusCode(403); - var model = new ImportCompetenciesViewModel() - { - Framework = framework, - IsNotBlank = isNotBlank - }; + var model = new ImportCompetenciesViewModel(framework, isNotBlank); + return View("Developer/Import/Index", model); } public IActionResult DownloadCompetencies(int frameworkId, int DownloadOption) @@ -80,7 +77,7 @@ public IActionResult ImportCompleted() try { var results = importCompetenciesFromFileService.PreProcessCompetenciesTable(workbook); - var resultsModel = new ImportCompetenciesPreProcessViewModel(results) { IsNotBlank = data.IsNotBlank, TabName = data.TabName }; + var resultsModel = new ImportCompetenciesPreProcessViewModel(results, data) { IsNotBlank = data.IsNotBlank, TabName = data.TabName }; data.CompetenciesToProcessCount = resultsModel.ToProcessCount; data.CompetenciesToAddCount = resultsModel.CompetenciesToAddCount; data.CompetenciesToUpdateCount = resultsModel.CompetenciesToUpdateCount; @@ -104,8 +101,9 @@ private void setupBulkUploadData(int frameworkId, int adminUserID, string compet { TempData.Clear(); multiPageFormService.ClearMultiPageFormData(MultiPageFormDataFeature.AddCustomWebForm("BulkCompetencyDataCWF"), TempData); + var framework = frameworkService.GetFrameworkDetailByFrameworkId(frameworkId, adminUserID); var today = clockUtility.UtcToday; - var bulkUploadData = new BulkCompetenciesData(frameworkId, adminUserID, competenciessFileName, tabName, isNotBlank); + var bulkUploadData = new BulkCompetenciesData(framework, adminUserID, competenciessFileName, tabName, isNotBlank); setBulkUploadData(bulkUploadData); } private void setBulkUploadData(BulkCompetenciesData bulkUploadData) diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 290e263477..44ae69f92b 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -1,4 +1,6 @@ -using System.Collections.Generic; +using DigitalLearningSolutions.Data.Models.Frameworks; +using System.Collections; +using System.Collections.Generic; using System.Linq; namespace DigitalLearningSolutions.Web.Models @@ -6,15 +8,21 @@ namespace DigitalLearningSolutions.Web.Models public class BulkCompetenciesData { public BulkCompetenciesData() { } - public BulkCompetenciesData(int frameworkId, int adminUserId, string competenciesFileName, string tabName, bool isNotBlank) + public BulkCompetenciesData(DetailFramework framework, int adminUserId, string competenciesFileName, string tabName, bool isNotBlank) { - FrameworkId = frameworkId; + FrameworkId = framework.ID; + FrameworkName = framework.FrameworkName; + PublishStatusID = framework.PublishStatusID; + FrameworkVocubulary = framework.FrameworkConfig; AdminUserId = adminUserId; CompetenciesFileName = competenciesFileName; TabName = tabName; IsNotBlank = isNotBlank; } public int FrameworkId { get; set; } + public string? FrameworkName { get; set; } + public int PublishStatusID { get; set; } + public string FrameworkVocubulary { get; set; } public string TabName { get; set; } public int AdminUserId { get; set; } public bool IsNotBlank { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs index cb903dd1b2..f92f056115 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs @@ -3,21 +3,29 @@ using DigitalLearningSolutions.Web.Models; using System.Linq; using DigitalLearningSolutions.Data.Models.Frameworks.Import; +using DigitalLearningSolutions.Web.Helpers; namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { public class ImportCompetenciesPreProcessViewModel { - public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompetenciesResult) + public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompetenciesResult, BulkCompetenciesData bulkCompetenciesData) { + FrameworkName = bulkCompetenciesData.FrameworkName; + PublishStatusID = bulkCompetenciesData.PublishStatusID; + FrameworkVocabularySingular = FrameworkVocabularyHelper.VocabularySingular(bulkCompetenciesData.FrameworkVocubulary); + FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(bulkCompetenciesData.FrameworkVocubulary); ToProcessCount = bulkCompetenciesResult.ProcessedCount; CompetenciesToAddCount = bulkCompetenciesResult.CompetencyAddedCount; - CompetenciesToUpdateCount = bulkCompetenciesResult.CompetencyUpdatedCount; + ToUpdateOrSkipCount = bulkCompetenciesResult.CompetencyUpdatedCount; CompetencyGroupsToAddCount = bulkCompetenciesResult.GroupAddedCount; CompetencyGroupsToUpdateCount = bulkCompetenciesResult.GroupUpdatedCount; - Errors = bulkCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason))); + Errors = bulkCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason, FrameworkVocabularyHelper.VocabularySingular(bulkCompetenciesData.FrameworkVocubulary)))); } - + public string? FrameworkName { get; set; } + public int PublishStatusID { get; set; } + public string FrameworkVocabularySingular { get; set; } + public string FrameworkVocabularyPlural { get; set; } public IEnumerable<(int RowNumber, string ErrorMessage)> Errors { get; set; } public int ErrorCount => Errors.Count(); public int ToProcessCount { get; set; } @@ -30,18 +38,18 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet public bool IsNotBlank { get; set; } public string TabName { get; set; } - private static string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReason reason) + private static string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReason reason, string vocabularySingular) { return reason switch { ImportCompetenciesResult.ErrorReason.TooLongCompetencyGroupName => "Group name must be 255 characters or less.", ImportCompetenciesResult.ErrorReason.MissingCompetencyName => - "Competency is blank. Competency is a required field and cannot be left blank", + vocabularySingular + " is blank. " + vocabularySingular + " is a required field and cannot be left blank", ImportCompetenciesResult.ErrorReason.InvalidId => - "The ID provided does not match a Competency ID in this Framework", + "The ID provided does not match a " + vocabularySingular + " ID in this Framework", ImportCompetenciesResult.ErrorReason.TooLongCompetencyName => - "Competency must be 255 characters or less.", + vocabularySingular + " must be 500 characters or less.", ImportCompetenciesResult.ErrorReason.InvalidAlwaysShowDescription => "Always show description is invalid. The Always show description field must contain 'TRUE' or 'FALSE'", _ => "Unspecified error.", diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs index 5294f9d51b..b47108fe15 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs @@ -28,6 +28,7 @@ private string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReason reas "Competency name was not provided. Competency name is a required field and cannot be left blank", ImportCompetenciesResult.ErrorReason.TooLongCompetencyName => "Competency name must be 500 characters or fewer", ImportCompetenciesResult.ErrorReason.TooLongCompetencyGroupName => "Competency group name must be 255 characters or fewer", + _ => "Unknown error", }; } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesViewModel.cs index 34bb2e65d3..698b278dc1 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesViewModel.cs @@ -1,13 +1,25 @@ namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { using DigitalLearningSolutions.Data.Models.Frameworks; - using DigitalLearningSolutions.Web.Attributes; - using Microsoft.AspNetCore.Http; - using System.ComponentModel.DataAnnotations; + using DigitalLearningSolutions.Web.Helpers; public class ImportCompetenciesViewModel : ImportCompetenciesFormData { - public DetailFramework Framework { get; set; } + public ImportCompetenciesViewModel(DetailFramework framework, bool isNotBlank) + { + FrameworkID = framework.ID; + FrameworkName = framework.FrameworkName; + FrameworkVocabularySingular = FrameworkVocabularyHelper.VocabularySingular(framework.FrameworkConfig); + FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(framework.FrameworkConfig); + PublishStatusID = framework.PublishStatusID; + IsNotBlank = isNotBlank; + } + public int FrameworkID { get; set; } + public string FrameworkName { get; set; } + public string FrameworkVocabularySingular { get; set; } + public string FrameworkVocabularyPlural { get; set; } + public int PublishStatusID { get; set; } public bool IsNotBlank { get; set; } + } } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index cbade17bee..1db1e511ba 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -27,57 +27,59 @@ }

Delegate file uploaded

-

@(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

-
    -
  • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
  • -
  • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? "competency" : "competencies") to add
  • -
  • @Model.ToUpdateOrSkipCount delegate @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
  • - @if (Model.ErrorCount > 0) +
    +

    @(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

    +
      +
    • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
    • +
    • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
    • +
    • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
    • + @if (Model.ErrorCount > 0) + { +
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
    • + } + else + { +
    • No errors
    • + } +
    + @if (Model.ErrorCount == 0) { -
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
  • + Continue } else { -
  • No errors
  • - } -
-@if (Model.ErrorCount == 0) -{ - Continue -} -else -{ -

Check the information below. You will need fix these errors before continuing or remove the rows with errors from your spreadsheet:

-
- - Error: @Model.ErrorCount delegate @(Model.ErrorCount == 1 ? "row" : "rows") contain errors and cannot be processed - -
- @foreach (var (rowNumber, errorMessage) in Model.Errors) - { -
-
- Row @rowNumber -
-
- @errorMessage -
+

Check the information below. You will need fix these errors before continuing or remove the rows with errors from your spreadsheet:

+
+ + Error: @Model.ErrorCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ErrorCount == 1 ? "row" : "rows") contain errors and cannot be processed + +
+ @foreach (var (rowNumber, errorMessage) in Model.Errors) + { +
+
+ Row @rowNumber +
+
+ @errorMessage +
-
- } -
-
-

Upload corrected file

-

- Once you have made corrections to the Excel competency workbook to address the errors above, save and restart the upload process. -

-
+
+ } +
+
+

Upload corrected file

+

+ Once you have made corrections to the Excel competency workbook to address the errors above, save and restart the upload process. +

+ - - - + + + - - -} - + + + } + +
diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml index f170f620dc..c16803e9df 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml @@ -4,41 +4,42 @@ @using Microsoft.Extensions.Configuration @model ImportCompetenciesResultsViewModel @{ - ViewData["Title"] = "Framework - Import Failed"; - ViewData["Application"] = "Framework Service"; - ViewData["HeaderPathName"] = "Framework Service"; - var errorHasOccurred = !ViewData.ModelState.IsValid; - var cancelLinkData = Html.GetRouteValues(); + ViewData["Title"] = "Framework - Import Failed"; + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + var cancelLinkData = Html.GetRouteValues(); } @section NavMenuItems { - + } - @section NavBreadcrumbs { - +@section NavBreadcrumbs { + } -
+
-

Import failed

- -

- The file that you uploaded either does not have the correct column headers on the first row or is not formatted as a table. -

+

Import failed

+
+

+ The file that you uploaded either does not have the correct column headers on the first row or is not formatted as a table. +

-

Refer to the instructions on the Import Competencies page to make sure your Excel file has the correct column headers.

+

Refer to the instructions on the Import Competencies page to make sure your Excel file has the correct column headers.

- + - + +
-
+
diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 0d6c3278a4..49ed6c64d6 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -5,7 +5,7 @@ ViewData["Application"] = "Framework Service"; ViewData["HeaderPathName"] = "Framework Service"; var errorHasOccurred = !ViewData.ModelState.IsValid; - ViewData["Title"] = errorHasOccurred ? "Error: Bulk upload competencies" : "Bulk upload competencies"; + ViewData["Title"] = errorHasOccurred ? "Error: Bulk upload " + Model.FrameworkVocabularyPlural.ToLower() : "Bulk upload " + Model.FrameworkVocabularyPlural.ToLower(); var cancelLinkData = Html.GetRouteValues(); } @@ -30,85 +30,87 @@ { } -

Bulk upload @(Model.IsNotBlank ? "or update" : "") competencies

- @if (Model.Framework.PublishStatusID == 3) - { - - } - -
- @if (Model.IsNotBlank) +

Bulk upload @(Model.IsNotBlank ? "or update" : "") @Model.FrameworkVocabularyPlural.ToLower()

+
+ @if (Model.PublishStatusID == 3) { + + } + @* *@ +
+ @if (Model.IsNotBlank) + { -

- To bulk add and/or update competencies in your framework, download an Excel workbook using one of the options below. -

-
-
- -

- What would you like to download? -

-
-
- Select one option -
-
-
- - +

+ To bulk add and/or update @Model.FrameworkVocabularyPlural.ToLower() in the framework, @Model.FrameworkName, download an Excel workbook using one of the options below. +

+ +
+ +

+ What would you like to download? +

+
+
+ Select one option
-
-
- This Excel file will be empty.
- New competencies can be added by including their details on a blank row. +
+
+ +
- - Download template - -
-
- - -
-
-
- This Excel file will include all existing competencies whose details you can update.
- New competencies can be added by including their details on a blank row. +
+
+ This Excel file will be empty.
+ New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row. +
+ + Download template + +
+
+ + +
+
+
+ This Excel file will include all existing @Model.FrameworkVocabularyPlural.ToLower() whose details you can update.
+ New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row. +
+ + Download @Model.FrameworkVocabularyPlural.ToLower() +
- - Download competencies -
-
-
- - } - else - { -

- Download a blank template for bulk adding competencies to your framework. This Excel file will be empty. New competencies can be added by including their details on a blank row. -

- - Download template - - } +
+ + } + else + { +

+ Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row. +

+ + Download template + + } -
+
-

Upload file

-

- Once you have an Excel competencies workbook, add or update competencies to the worksheet, save and start the upload process. -

-
- - - - - +

Upload file

+

+ Once you have an Excel @Model.FrameworkVocabularyPlural.ToLower() workbook, add or update @Model.FrameworkVocabularyPlural.ToLower() to the worksheet, save and start the upload process. +

+
+ + + + + +
diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index 7a7b556f50..16aac10fde 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -4,61 +4,62 @@ @using Microsoft.Extensions.Configuration @model ImportCompetenciesResultsViewModel @{ - ViewData["Title"] = "Framework - Import Competencies"; - ViewData["Application"] = "Framework Service"; - ViewData["HeaderPathName"] = "Framework Service"; - var errorHasOccurred = !ViewData.ModelState.IsValid; - var cancelLinkData = Html.GetRouteValues(); + ViewData["Title"] = "Framework - Import Competencies"; + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + var cancelLinkData = Html.GetRouteValues(); } @section NavMenuItems { - + } - @section NavBreadcrumbs { - +@section NavBreadcrumbs { + } -
+
-

Import competencies complete

- -

Summary of results:

-
    -
  • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
  • -
  • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? "competency group" : "competency groups") inserted
  • -
  • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? "competency" : "competencies") inserted
  • -
  • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "record" : "records") skipped (nothing inserted but no errors)
  • -
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
  • -
+

Import competencies complete

+
+

Summary of results:

+
    +
  • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
  • +
  • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? "competency group" : "competency groups") inserted
  • +
  • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? "competency" : "competencies") inserted
  • +
  • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "record" : "records") skipped (nothing inserted but no errors)
  • +
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
  • +
- @if (Model.ErrorCount > 0) - { -
-

- - Important: - The imported Excel worksheet contained errors - -

-

The lines below were skipped due to errors during processing:

-
    - @foreach (var (rowNumber, errorMessage) in Model.Errors) - { -
  • Line @rowNumber: @errorMessage
  • - } -
-
- } + @if (Model.ErrorCount > 0) + { +
+

+ + Important: + The imported Excel worksheet contained errors + +

+

The lines below were skipped due to errors during processing:

+
    + @foreach (var (rowNumber, errorMessage) in Model.Errors) + { +
  • Line @rowNumber: @errorMessage
  • + } +
+
+ } - -
+ +
+
From b914c502387c45399fb8912d68ab6d97d139863b Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 30 Dec 2024 16:30:15 +0000 Subject: [PATCH 028/271] TD-5216 Uses custom competency vocabulary in Excel file processing --- .../Frameworks/Import/CompetencyTableRow.cs | 8 ++-- .../ImportCompetencies.cs | 8 ++-- .../ImportCompetenciesFromFileService.cs | 40 +++++++++---------- .../Frameworks/Developer/Import/Index.cshtml | 6 +-- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index ab79a40b43..1f99fa9550 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -26,10 +26,10 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) RowNumber = row.RowNumber(); id = row.Cell(1).GetValue(); - CompetencyGroup = FindFieldValue("CompetencyGroup"); - Competency = FindFieldValue("Competency"); - CompetencyDescription = FindFieldValue("CompetencyDescription"); - GroupDescription = FindFieldValue("GroupDescription"); + CompetencyGroup = row.Cell(2).GetValue(); + GroupDescription = row.Cell(3).GetValue(); + Competency = row.Cell(4).GetValue(); + CompetencyDescription = row.Cell(5).GetValue(); AlwaysShowDescriptionRaw = FindFieldValue("AlwaysShowDescription"); AlwaysShowDescription = bool.TryParse(AlwaysShowDescriptionRaw, out var hasPrn) ? hasPrn : (bool?)null; FlagsCsv = FindFieldValue("FlagsCSV"); diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 9e02407e0e..db606548a0 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -24,11 +24,11 @@ public IActionResult ImportCompetencies(int frameworkId, string tabname, bool is return View("Developer/Import/Index", model); } - public IActionResult DownloadCompetencies(int frameworkId, int DownloadOption) + public IActionResult DownloadCompetencies(int frameworkId, int DownloadOption, string vocabulary) { - string fileName = DownloadOption == 2 ? $"DLS Competencies for Bulk Update {clockUtility.UtcToday:yyyy-MM-dd}.xlsx" : "DLS Competencies for Bulk Upload.xlsx"; + string fileName = DownloadOption == 2 ? $"DLS {FrameworkVocabularyHelper.VocabularyPlural(vocabulary)} for Bulk Update {clockUtility.UtcToday:yyyy-MM-dd}.xlsx" : $"DLS {FrameworkVocabularyHelper.VocabularyPlural(vocabulary)} for Bulk Upload.xlsx"; var content = importCompetenciesFromFileService.GetCompetencyFileForFramework( - frameworkId, DownloadOption == 2 ? false : true + frameworkId, DownloadOption == 2 ? false : true, vocabulary ); return File( content, @@ -76,7 +76,7 @@ public IActionResult ImportCompleted() var workbook = new XLWorkbook(filePath); try { - var results = importCompetenciesFromFileService.PreProcessCompetenciesTable(workbook); + var results = importCompetenciesFromFileService.PreProcessCompetenciesTable(workbook, data.FrameworkVocubulary); var resultsModel = new ImportCompetenciesPreProcessViewModel(results, data) { IsNotBlank = data.IsNotBlank, TabName = data.TabName }; data.CompetenciesToProcessCount = resultsModel.ToProcessCount; data.CompetenciesToAddCount = resultsModel.CompetenciesToAddCount; diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 1746ebe904..d8611a86f8 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -12,29 +12,27 @@ namespace DigitalLearningSolutions.Web.Services using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Data.Helpers; using DigitalLearningSolutions.Data.Models.Frameworks.Import; - using DigitalLearningSolutions.Web.Models; - using Microsoft.AspNetCore.Http; public interface IImportCompetenciesFromFileService { - byte[] GetCompetencyFileForFramework(int frameworkId, bool v); - public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook); - public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId); + byte[] GetCompetencyFileForFramework(int frameworkId, bool isBlank, string vocabulary); + public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary); + public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary); } public class ImportCompetenciesFromFileService : IImportCompetenciesFromFileService { private readonly IFrameworkService frameworkService; private static readonly XLTableTheme TableTheme = XLTableTheme.TableStyleLight9; - public const string CompetenciesSheetName = "CompetenciesBulkUpload"; + public const string CompetenciesSheetName = "FrameworkBulkUpload"; public ImportCompetenciesFromFileService( IFrameworkService frameworkService ) { this.frameworkService = frameworkService; } - public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook) + public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary) { - var table = OpenCompetenciesTable(workbook); + var table = OpenCompetenciesTable(workbook, vocabulary); var competencyRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); foreach (var competencyRow in competencyRows) { @@ -54,14 +52,14 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow) competencyRow.RowStatus = RowStatus.CompetencyUpdated; } } - public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId) + public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary) { int maxFrameworkCompetencyId = frameworkService.GetMaxFrameworkCompetencyID(); int maxFrameworkCompetencyGroupId = frameworkService.GetMaxFrameworkCompetencyGroupID(); - var table = OpenCompetenciesTable(workbook); + var table = OpenCompetenciesTable(workbook, vocabulary); return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId); } - internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook) + internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) { var worksheet = workbook.Worksheet(1); worksheet.Columns(1, 15).Unhide(); @@ -70,7 +68,7 @@ internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook) throw new InvalidHeadersException(); } var table = worksheet.Tables.Table(0); - if (!ValidateHeaders(table)) + if (!ValidateHeaders(table, vocabulary)) { throw new InvalidHeadersException(); } @@ -132,15 +130,15 @@ CompetencyTableRow competencyRow return maxFrameworkCompetencyGroupId; } - private static bool ValidateHeaders(IXLTable table) + private static bool ValidateHeaders(IXLTable table, string Vocabulary) { var expectedHeaders = new List { "ID", - "CompetencyGroup", + Vocabulary + "Group", "GroupDescription", - "Competency", - "CompetencyDescription", + Vocabulary, + Vocabulary + "Description", "AlwaysShowDescription", "FlagsCSV" }.OrderBy(x => x); @@ -148,10 +146,10 @@ private static bool ValidateHeaders(IXLTable table) return actualHeaders.SequenceEqual(expectedHeaders); } - public byte[] GetCompetencyFileForFramework(int frameworkId, bool blank) + public byte[] GetCompetencyFileForFramework(int frameworkId, bool blank, string vocabulary) { using var workbook = new XLWorkbook(); - PopulateCompetenciesSheet(workbook, frameworkId, blank); + PopulateCompetenciesSheet(workbook, frameworkId, blank, vocabulary); if (blank) { ClosedXmlHelper.HideWorkSheetColumn(workbook, "ID"); @@ -167,7 +165,7 @@ public byte[] GetCompetencyFileForFramework(int frameworkId, bool blank) workbook.SaveAs(stream); return stream.ToArray(); } - private void PopulateCompetenciesSheet(IXLWorkbook workbook, int frameworkId, bool blank) + private void PopulateCompetenciesSheet(IXLWorkbook workbook, int frameworkId, bool blank, string vocabulary) { @@ -184,8 +182,10 @@ private void PopulateCompetenciesSheet(IXLWorkbook workbook, int frameworkId, bo FlagsCSV = x.FlagsCsv, } ); - ClosedXmlHelper.AddSheetToWorkbook(workbook, CompetenciesSheetName, competencies, TableTheme); + ClosedXmlHelper.RenameWorksheetColumn(workbook, "CompetencyGroup", vocabulary + "Group"); + ClosedXmlHelper.RenameWorksheetColumn(workbook, "Competency", vocabulary); + ClosedXmlHelper.RenameWorksheetColumn(workbook, "CompetencyDescription", vocabulary + "Description"); } } } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 49ed6c64d6..649f7a608f 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -66,7 +66,7 @@ This Excel file will be empty.
New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row. - + Download template @@ -81,7 +81,7 @@ This Excel file will include all existing @Model.FrameworkVocabularyPlural.ToLower() whose details you can update.
New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row. - + Download @Model.FrameworkVocabularyPlural.ToLower() @@ -94,7 +94,7 @@

Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row.

- + Download template } From 23b957013aca34eaf882d0afed1926f0f36ca971 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 30 Dec 2024 16:36:34 +0000 Subject: [PATCH 029/271] IDE formatter changes --- .../Controllers/FrameworksController/ImportCompetencies.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index db606548a0..dad1bbd4c1 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -21,7 +21,7 @@ public IActionResult ImportCompetencies(int frameworkId, string tabname, bool is if (userRole < 2) return StatusCode(403); var model = new ImportCompetenciesViewModel(framework, isNotBlank); - + return View("Developer/Import/Index", model); } public IActionResult DownloadCompetencies(int frameworkId, int DownloadOption, string vocabulary) From 7b7e2b9709670eed27719263185cef1a487ad220 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 30 Dec 2024 10:43:24 +0000 Subject: [PATCH 030/271] TD-5155 Begins to implement add questions view model --- .../Import/AddAssessmentQuestionsViewModel.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs new file mode 100644 index 0000000000..b50b1dc6a1 --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs @@ -0,0 +1,13 @@ +using DigitalLearningSolutions.Data.Models.Frameworks; +using Microsoft.AspNetCore.Mvc.Rendering; +using System.Collections.Generic; + +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +{ + public class AddAssessmentQuestionsViewModel + { + public DetailFramework Framework { get; set; } + public IEnumerable? FrameworkDefaultQuestions { get; set; } + public SelectList? QuestionSelectList { get; set; } + } +} From ee10005c4e990508bf3e5b49d1124af817c6506f Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 31 Dec 2024 09:37:40 +0000 Subject: [PATCH 031/271] TD-5155 Adds view model and constructor --- .../ImportCompetencies.cs | 22 +++++++++++++++++-- .../Models/BulkCompetenciesData.cs | 1 + .../Import/AddAssessmentQuestionsFormData.cs | 10 +++++++++ .../Import/AddAssessmentQuestionsViewModel.cs | 21 ++++++++++++++---- 4 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index dad1bbd4c1..d9cbb44318 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -6,7 +6,9 @@ using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import; using GDS.MultiPageFormData.Enums; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Rendering; using System.IO; +using System.Linq; namespace DigitalLearningSolutions.Web.Controllers.FrameworksController { @@ -94,8 +96,24 @@ public IActionResult ImportCompleted() public IActionResult AddAssessmentQuestions() { var data = GetBulkUploadData(); - - return View(); + var adminId = GetAdminId(); + var defaultQuestions = frameworkService.GetFrameworkDefaultQuestionsById(data.FrameworkId, adminId); + var questionList = frameworkService.GetAssessmentQuestions(data.FrameworkId, adminId).ToList(); + var questionSelectList = new SelectList(questionList, "ID", "Label"); + var model = new AddAssessmentQuestionsViewModel + ( + data.FrameworkId, + data.FrameworkName, + data.FrameworkVocubulary, + data.PublishStatusID, + data.CompetenciesToAddCount, + data.CompetenciesToUpdateCount, + defaultQuestions, + questionSelectList + ); + model.DefaultAssessmentQuestionIDs = data.DefaultQuestionIDs; + model.OtherAssessmentQuestionIDs = data.AssessmentQuestionIDs; + return View(model); } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 44ae69f92b..525437093c 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -27,6 +27,7 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public int AdminUserId { get; set; } public bool IsNotBlank { get; set; } public string CompetenciesFileName { get; set; } + public List DefaultQuestionIDs { get; set; } public List AssessmentQuestionIDs { get; set; } public int? AddAssessmentQuestionOption { get; set; } public int CompetenciesToProcessCount { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs new file mode 100644 index 0000000000..428f7f22df --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +{ + public class AddAssessmentQuestionsFormData + { + public List DefaultAssessmentQuestionIDs { get; set; } + public List OtherAssessmentQuestionIDs { get; set; } + } +} diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs index b50b1dc6a1..024378c538 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs @@ -1,13 +1,26 @@ using DigitalLearningSolutions.Data.Models.Frameworks; +using DigitalLearningSolutions.Web.Helpers; using Microsoft.AspNetCore.Mvc.Rendering; using System.Collections.Generic; namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { - public class AddAssessmentQuestionsViewModel + public class AddAssessmentQuestionsViewModel( + DetailFramework framework, + int newCompetencies, + int existingCompetencies, + IEnumerable defaultQuestions, + SelectList questionSelectList + ) : AddAssessmentQuestionsFormData { - public DetailFramework Framework { get; set; } - public IEnumerable? FrameworkDefaultQuestions { get; set; } - public SelectList? QuestionSelectList { get; set; } + public int FrameworkID { get; set; } = framework.ID; + public string FrameworkName { get; set; } = framework.FrameworkName; + public string FrameworkVocabularySingular { get; set; } = FrameworkVocabularyHelper.VocabularySingular(framework.FrameworkConfig); + public string FrameworkVocabularyPlural { get; set; } = FrameworkVocabularyHelper.VocabularyPlural(framework.FrameworkConfig); + public int PublishStatusID { get; set; } = framework.PublishStatusID; + public int NewCompetencies { get; set; } = newCompetencies; + public int ExistingCompetencies { get; set; } = existingCompetencies; + public IEnumerable? DefaultQuestions { get; set; } = defaultQuestions; + public SelectList? QuestionSelectList { get; set; } = questionSelectList; } } From 47543f75e309badcd8da896d317d63220ed84472 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 31 Dec 2024 16:36:33 +0000 Subject: [PATCH 032/271] TD-5155 Implements conditional preselected checkboxes for default questions --- .../ImportCompetencies.cs | 19 ++- .../Models/BulkCompetenciesData.cs | 7 +- .../Import/AddAssessmentQuestionsFormData.cs | 2 + .../Import/AddAssessmentQuestionsViewModel.cs | 15 ++- .../Import/AddAssessmentQuestions.cshtml | 86 ++++++++++++++ .../Developer/Import/ImportCompleted.cshtml | 108 +++++++++--------- .../Developer/Import/ImportFailed.cshtml | 2 +- .../Frameworks/Developer/Import/Index.cshtml | 2 +- .../Developer/Import/UploadResults.cshtml | 2 +- 9 files changed, 177 insertions(+), 66 deletions(-) create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index d9cbb44318..681d019a2c 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -4,9 +4,12 @@ using DigitalLearningSolutions.Web.Models; using DigitalLearningSolutions.Web.Services; using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import; +using DocumentFormat.OpenXml.Office2010.ExcelAc; using GDS.MultiPageFormData.Enums; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; +using Microsoft.DotNet.Scaffolding.Shared.Project; +using System.Collections.Generic; using System.IO; using System.Linq; @@ -89,7 +92,7 @@ public IActionResult ImportCompleted() catch (InvalidHeadersException) { FileHelper.DeleteFile(webHostEnvironment, data.CompetenciesFileName); - return View("ImportFailed"); + return View("Developer/Import/ImportFailed"); } } [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions")] @@ -98,6 +101,16 @@ public IActionResult AddAssessmentQuestions() var data = GetBulkUploadData(); var adminId = GetAdminId(); var defaultQuestions = frameworkService.GetFrameworkDefaultQuestionsById(data.FrameworkId, adminId); + if (!data.DefaultQuestionIDs.Any() && defaultQuestions.Any() && data.AddDefaultAssessmentQuestions == true) + { + var defaultQuestionsList = new List(); + foreach (var question in defaultQuestions) + { + defaultQuestionsList.Add(question.ID); + } + data.DefaultQuestionIDs = defaultQuestionsList; + setBulkUploadData(data); + } var questionList = frameworkService.GetAssessmentQuestions(data.FrameworkId, adminId).ToList(); var questionSelectList = new SelectList(questionList, "ID", "Label"); var model = new AddAssessmentQuestionsViewModel @@ -111,9 +124,11 @@ public IActionResult AddAssessmentQuestions() defaultQuestions, questionSelectList ); + model.AddDefaultAssessmentQuestions = data.AddDefaultAssessmentQuestions; + model.AddCustomAssessmentQuestion = data.AddCustomAssessmentQuestion; model.DefaultAssessmentQuestionIDs = data.DefaultQuestionIDs; model.OtherAssessmentQuestionIDs = data.AssessmentQuestionIDs; - return View(model); + return View("Developer/Import/AddAssessmentQuestions", model); } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 525437093c..69800b0187 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -27,9 +27,10 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public int AdminUserId { get; set; } public bool IsNotBlank { get; set; } public string CompetenciesFileName { get; set; } - public List DefaultQuestionIDs { get; set; } - public List AssessmentQuestionIDs { get; set; } - public int? AddAssessmentQuestionOption { get; set; } + public List DefaultQuestionIDs { get; set; } = []; + public List AssessmentQuestionIDs { get; set; } = []; + public bool AddDefaultAssessmentQuestions { get; set; } = true; + public bool AddCustomAssessmentQuestion { get; set; } = false; public int CompetenciesToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } public int CompetenciesToUpdateCount { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs index 428f7f22df..aa1e0ab2ce 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs @@ -4,6 +4,8 @@ namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { public class AddAssessmentQuestionsFormData { + public bool AddDefaultAssessmentQuestions { get; set; } + public bool AddCustomAssessmentQuestion { get; set; } public List DefaultAssessmentQuestionIDs { get; set; } public List OtherAssessmentQuestionIDs { get; set; } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs index 024378c538..bfd1cf3d12 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs @@ -6,18 +6,21 @@ namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { public class AddAssessmentQuestionsViewModel( - DetailFramework framework, + int frameworkId, + string frameworkName, + string frameworkVocabulary, + int publishStatusId, int newCompetencies, int existingCompetencies, IEnumerable defaultQuestions, SelectList questionSelectList ) : AddAssessmentQuestionsFormData { - public int FrameworkID { get; set; } = framework.ID; - public string FrameworkName { get; set; } = framework.FrameworkName; - public string FrameworkVocabularySingular { get; set; } = FrameworkVocabularyHelper.VocabularySingular(framework.FrameworkConfig); - public string FrameworkVocabularyPlural { get; set; } = FrameworkVocabularyHelper.VocabularyPlural(framework.FrameworkConfig); - public int PublishStatusID { get; set; } = framework.PublishStatusID; + public int FrameworkID { get; set; } = frameworkId; + public string FrameworkName { get; set; } = frameworkName; + public string FrameworkVocabularySingular { get; set; } = FrameworkVocabularyHelper.VocabularySingular(frameworkVocabulary); + public string FrameworkVocabularyPlural { get; set; } = FrameworkVocabularyHelper.VocabularyPlural(frameworkVocabulary); + public int PublishStatusID { get; set; } = publishStatusId; public int NewCompetencies { get; set; } = newCompetencies; public int ExistingCompetencies { get; set; } = existingCompetencies; public IEnumerable? DefaultQuestions { get; set; } = defaultQuestions; diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml new file mode 100644 index 0000000000..e3a0e29540 --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml @@ -0,0 +1,86 @@ +@using DigitalLearningSolutions.Web.Extensions +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import + +@model AddAssessmentQuestionsViewModel + +@{ + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + var checkListErrorClass = !ViewData.ModelState.IsValid && Model.AddDefaultAssessmentQuestions == null ? "nhsuk-form-group nhsuk-form-group--error" : "nhsuk-form-group"; + ViewData["Title"] = errorHasOccurred ? "Error: Add Assessment Questions" : "Add Assessment Questions"; + var cancelLinkData = Html.GetRouteValues(); + var hintTextString = Model.NewCompetencies != 0 && Model.ExistingCompetencies != 0 ? "new and/or updated " : (Model.NewCompetencies == 0 ? "updated " : "new "); +} + +@section NavMenuItems { + +} +@section NavBreadcrumbs { + +} +
+
+
+ @if (errorHasOccurred) + { + + } +
+
+
+ +

+ @ViewData["Title"] +

+
+
+ Which assessment questions would you like to attach to the @hintTextString @Model.FrameworkVocabularyPlural.ToLower()? +
+
+ @if (Model.DefaultQuestions.Any()) + { +
+ + +
+
+ +
+
+ @foreach (var (defaultQuestion, index) in Model.DefaultQuestions.Select((t, i) => (t, i))) + { +
+ + +
+ } +
+
+
+ } +
+
+
+
+
+
+
diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 1db1e511ba..fcabc89014 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -26,60 +26,64 @@ } -

Delegate file uploaded

-
-

@(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

-
    -
  • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
  • -
  • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
  • -
  • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
  • - @if (Model.ErrorCount > 0) - { -
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
  • - } - else - { -
  • No errors
  • - } -
- @if (Model.ErrorCount == 0) - { - Continue - } - else - { -

Check the information below. You will need fix these errors before continuing or remove the rows with errors from your spreadsheet:

-
- - Error: @Model.ErrorCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ErrorCount == 1 ? "row" : "rows") contain errors and cannot be processed - -
- @foreach (var (rowNumber, errorMessage) in Model.Errors) +
+
+

Delegate file uploaded

+
+

@(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

+
    +
  • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
  • +
  • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
  • +
  • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
  • + @if (Model.ErrorCount > 0) { -
    -
    - Row @rowNumber -
    -
    - @errorMessage -
    - -
    +
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
  • } -
-
-

Upload corrected file

-

- Once you have made corrections to the Excel competency workbook to address the errors above, save and restart the upload process. -

-
+ else + { +
  • No errors
  • + } + + @if (Model.ErrorCount == 0) + { + Continue + } + else + { +

    Check the information below. You will need fix these errors before continuing or remove the rows with errors from your spreadsheet:

    +
    + + Error: @Model.ErrorCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ErrorCount == 1 ? "row" : "rows") contain errors and cannot be processed + +
    + @foreach (var (rowNumber, errorMessage) in Model.Errors) + { +
    +
    + Row @rowNumber +
    +
    + @errorMessage +
    + +
    + } +
    +
    +

    Upload corrected file

    +

    + Once you have made corrections to the Excel competency workbook to address the errors above, save and restart the upload process. +

    + - - - + + + - - - } - + + + } + +
    + diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml index c16803e9df..1001851c70 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml @@ -30,7 +30,7 @@

    Import failed

    -
    +

    The file that you uploaded either does not have the correct column headers on the first row or is not formatted as a table.

    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 649f7a608f..a11a391b24 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -31,7 +31,7 @@ }

    Bulk upload @(Model.IsNotBlank ? "or update" : "") @Model.FrameworkVocabularyPlural.ToLower()

    -
    +
    @if (Model.PublishStatusID == 3) { diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index 16aac10fde..d83d3ca428 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -30,7 +30,7 @@

    Import competencies complete

    -
    +

    Summary of results:

    • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
    • From 549fbc8beae46708bd1ed73de58fee8430865713 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 2 Jan 2025 11:35:02 +0000 Subject: [PATCH 033/271] TD-5155 Implements add assessment questions form view --- .../ImportCompetencies.cs | 14 ++++- .../Models/BulkCompetenciesData.cs | 2 +- .../Import/AddAssessmentQuestionsFormData.cs | 2 +- .../Import/AddAssessmentQuestions.cshtml | 62 ++++++++++++------- 4 files changed, 55 insertions(+), 25 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 681d019a2c..62dbd65315 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -127,9 +127,21 @@ public IActionResult AddAssessmentQuestions() model.AddDefaultAssessmentQuestions = data.AddDefaultAssessmentQuestions; model.AddCustomAssessmentQuestion = data.AddCustomAssessmentQuestion; model.DefaultAssessmentQuestionIDs = data.DefaultQuestionIDs; - model.OtherAssessmentQuestionIDs = data.AssessmentQuestionIDs; + model.CustomAssessmentQuestionID = data.CustomAssessmentQuestionID; return View("Developer/Import/AddAssessmentQuestions", model); } + [HttpPost] + [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions")] + public IActionResult AddAssessmentQuestions(AddAssessmentQuestionsFormData model) + { + var data = GetBulkUploadData(); + data.AddDefaultAssessmentQuestions = model.AddDefaultAssessmentQuestions; + data.AddCustomAssessmentQuestion = model.AddCustomAssessmentQuestion; + data.DefaultQuestionIDs = model.DefaultAssessmentQuestionIDs; + data.CustomAssessmentQuestionID = model.CustomAssessmentQuestionID; + setBulkUploadData(data); + return RedirectToAction("AddQuestionsToWhichCompetencies"); + } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { TempData.Clear(); diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 69800b0187..2a8e40562d 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -28,7 +28,7 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public bool IsNotBlank { get; set; } public string CompetenciesFileName { get; set; } public List DefaultQuestionIDs { get; set; } = []; - public List AssessmentQuestionIDs { get; set; } = []; + public int CustomAssessmentQuestionID { get; set; } public bool AddDefaultAssessmentQuestions { get; set; } = true; public bool AddCustomAssessmentQuestion { get; set; } = false; public int CompetenciesToProcessCount { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs index aa1e0ab2ce..5db7d3b97a 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs @@ -7,6 +7,6 @@ public class AddAssessmentQuestionsFormData public bool AddDefaultAssessmentQuestions { get; set; } public bool AddCustomAssessmentQuestion { get; set; } public List DefaultAssessmentQuestionIDs { get; set; } - public List OtherAssessmentQuestionIDs { get; set; } + public int CustomAssessmentQuestionID { get; set; } } } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml index e3a0e29540..ae9cdec7c2 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml @@ -33,11 +33,11 @@
      @if (errorHasOccurred) { - + } -
      +
      -
      +

      @ViewData["Title"] @@ -50,37 +50,55 @@ @if (Model.DefaultQuestions.Any()) {
      - + -
      -
      +
      + choose which default questions associated with this framework to add to the imported and/or updated @Model.FrameworkVocabularyPlural.ToLower() +
      +
      -
      -
      - @foreach (var (defaultQuestion, index) in Model.DefaultQuestions.Select((t, i) => (t, i))) - { -
      - - -
      - } +
      +
      + @foreach (var (defaultQuestion, index) in Model.DefaultQuestions.Select((t, i) => (t, i))) + { +
      + + +
      + } +
      } +
      + + +
      +
      + + + +

      +
      +
    From a33c4dc444f29a67c7240e687700c4eaaf484857 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 2 Jan 2025 11:47:10 +0000 Subject: [PATCH 034/271] Tweaks post data processing to handle storing false values --- .../FrameworksController/ImportCompetencies.cs | 18 ++++++++++++++++-- .../Models/BulkCompetenciesData.cs | 2 +- .../Import/AddAssessmentQuestionsFormData.cs | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 62dbd65315..1e77c8f05c 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -136,9 +136,23 @@ public IActionResult AddAssessmentQuestions(AddAssessmentQuestionsFormData model { var data = GetBulkUploadData(); data.AddDefaultAssessmentQuestions = model.AddDefaultAssessmentQuestions; + if (model.AddDefaultAssessmentQuestions) + { + data.DefaultQuestionIDs = model.DefaultAssessmentQuestionIDs; + } + else + { + data.DefaultQuestionIDs = []; + } data.AddCustomAssessmentQuestion = model.AddCustomAssessmentQuestion; - data.DefaultQuestionIDs = model.DefaultAssessmentQuestionIDs; - data.CustomAssessmentQuestionID = model.CustomAssessmentQuestionID; + if (model.AddCustomAssessmentQuestion) + { + data.CustomAssessmentQuestionID = model.CustomAssessmentQuestionID; + } + else + { + data.CustomAssessmentQuestionID = null; + } setBulkUploadData(data); return RedirectToAction("AddQuestionsToWhichCompetencies"); } diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 2a8e40562d..bf7cb9b61d 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -28,7 +28,7 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public bool IsNotBlank { get; set; } public string CompetenciesFileName { get; set; } public List DefaultQuestionIDs { get; set; } = []; - public int CustomAssessmentQuestionID { get; set; } + public int? CustomAssessmentQuestionID { get; set; } public bool AddDefaultAssessmentQuestions { get; set; } = true; public bool AddCustomAssessmentQuestion { get; set; } = false; public int CompetenciesToProcessCount { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs index 5db7d3b97a..4b90f1198c 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs @@ -7,6 +7,6 @@ public class AddAssessmentQuestionsFormData public bool AddDefaultAssessmentQuestions { get; set; } public bool AddCustomAssessmentQuestion { get; set; } public List DefaultAssessmentQuestionIDs { get; set; } - public int CustomAssessmentQuestionID { get; set; } + public int? CustomAssessmentQuestionID { get; set; } } } From e14e53e899ebd3367dcae9ad8c8691380d43d240 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 2 Jan 2025 17:19:57 +0000 Subject: [PATCH 035/271] TD-5158 Implements add questions to which competencies form --- .../ImportCompetencies.cs | 47 ++++++++-- .../Models/BulkCompetenciesData.cs | 5 +- ...ddQuestionsToWhichCompetenciesViewModel.cs | 41 +++++++++ .../ImportCompetenciesPreProcessViewModel.cs | 5 -- .../AddQuestionsToWhichCompetencies.cshtml | 87 +++++++++++++++++++ 5 files changed, 173 insertions(+), 12 deletions(-) create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 1e77c8f05c..1a6150492c 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -1,14 +1,14 @@ -using ClosedXML.Excel; +using AngleSharp.Dom; +using ClosedXML.Excel; using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Web.Helpers; using DigitalLearningSolutions.Web.Models; using DigitalLearningSolutions.Web.Services; using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import; -using DocumentFormat.OpenXml.Office2010.ExcelAc; +using DocumentFormat.OpenXml.EMMA; using GDS.MultiPageFormData.Enums; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; -using Microsoft.DotNet.Scaffolding.Shared.Project; using System.Collections.Generic; using System.IO; using System.Linq; @@ -85,7 +85,7 @@ public IActionResult ImportCompleted() var resultsModel = new ImportCompetenciesPreProcessViewModel(results, data) { IsNotBlank = data.IsNotBlank, TabName = data.TabName }; data.CompetenciesToProcessCount = resultsModel.ToProcessCount; data.CompetenciesToAddCount = resultsModel.CompetenciesToAddCount; - data.CompetenciesToUpdateCount = resultsModel.CompetenciesToUpdateCount; + data.CompetenciesToUpdateCount = resultsModel.ToUpdateOrSkipCount; setBulkUploadData(data); return View("Developer/Import/ImportCompleted", resultsModel); } @@ -153,8 +153,45 @@ public IActionResult AddAssessmentQuestions(AddAssessmentQuestionsFormData model { data.CustomAssessmentQuestionID = null; } + if (data.CompetenciesToUpdateCount > 0) + { + data.AddAssessmentQuestionsOption = 2; + setBulkUploadData(data); + return RedirectToAction("AddQuestionsToWhichCompetencies", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } + else + { + data.AddAssessmentQuestionsOption = 1; + setBulkUploadData(data); + return RedirectToAction("Summary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } + } + [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions/Competencies")] + public IActionResult AddQuestionsToWhichCompetencies() + { + var data = GetBulkUploadData(); + var model = new AddQuestionsToWhichCompetenciesViewModel + ( + data.FrameworkId, + data.FrameworkName, + data.FrameworkVocubulary, + data.DefaultQuestionIDs, + data.CustomAssessmentQuestionID, + data.AddAssessmentQuestionsOption, + data.CompetenciesToProcessCount, + data.CompetenciesToAddCount, + data.CompetenciesToUpdateCount + ); + return View("Developer/Import/AddQuestionsToWhichCompetencies", model); + } + [HttpPost] + [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions/Competencies")] + public IActionResult AddQuestionsToWhichCompetencies(int AddAssessmentQuestionsOption) + { + var data = GetBulkUploadData(); + data.AddAssessmentQuestionsOption = AddAssessmentQuestionsOption; setBulkUploadData(data); - return RedirectToAction("AddQuestionsToWhichCompetencies"); + return RedirectToAction("Summary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index bf7cb9b61d..738acbf9ea 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -27,10 +27,11 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public int AdminUserId { get; set; } public bool IsNotBlank { get; set; } public string CompetenciesFileName { get; set; } - public List DefaultQuestionIDs { get; set; } = []; - public int? CustomAssessmentQuestionID { get; set; } public bool AddDefaultAssessmentQuestions { get; set; } = true; public bool AddCustomAssessmentQuestion { get; set; } = false; + public List DefaultQuestionIDs { get; set; } = []; + public int? CustomAssessmentQuestionID { get; set; } + public int AddAssessmentQuestionsOption { get; set; } //1 = only added, 2 = added and updated, 3 = all uploaded public int CompetenciesToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } public int CompetenciesToUpdateCount { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs new file mode 100644 index 0000000000..d6cbae84ca --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs @@ -0,0 +1,41 @@ +using DigitalLearningSolutions.Web.Helpers; +using System.Collections.Generic; +using System.Runtime.Versioning; + +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +{ + public class AddQuestionsToWhichCompetenciesViewModel + { + public AddQuestionsToWhichCompetenciesViewModel + ( + int frameworkId, + string frameworkName, + string frameworkVocabulary, + List defaultQuestions, + int? customQuestionId, + int addAssessmentQuestionsOption, + int competenciesToProcessCount, + int competenciesToAddCount, + int competenciesToUpdateCount) + { + FrameworkID = frameworkId; + FrameworkName = frameworkName; + FrameworkVocabularySingular = FrameworkVocabularyHelper.VocabularySingular(frameworkVocabulary); + FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(frameworkVocabulary); + TotalQuestions = defaultQuestions.Count + (customQuestionId != null ? 1 : 0); + AddAssessmentQuestionsOption = addAssessmentQuestionsOption; + CompetenciesToProcessCount = competenciesToProcessCount; + CompetenciesToAddCount = competenciesToAddCount; + CompetenciesToUpdateCount = competenciesToUpdateCount; + } + public int FrameworkID { get; set; } + public string FrameworkName { get; set; } + public string FrameworkVocabularySingular { get; set; } + public string FrameworkVocabularyPlural { get; set; } + public int TotalQuestions { get; set; } + public int AddAssessmentQuestionsOption { get; set; } = 1; //1 = only added, 2 = added and updated, 3 = all uploaded + public int CompetenciesToProcessCount { get; set; } + public int CompetenciesToAddCount { get; set; } + public int CompetenciesToUpdateCount { get; set; } + } +} diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs index f92f056115..67f604723a 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs @@ -18,8 +18,6 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet ToProcessCount = bulkCompetenciesResult.ProcessedCount; CompetenciesToAddCount = bulkCompetenciesResult.CompetencyAddedCount; ToUpdateOrSkipCount = bulkCompetenciesResult.CompetencyUpdatedCount; - CompetencyGroupsToAddCount = bulkCompetenciesResult.GroupAddedCount; - CompetencyGroupsToUpdateCount = bulkCompetenciesResult.GroupUpdatedCount; Errors = bulkCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason, FrameworkVocabularyHelper.VocabularySingular(bulkCompetenciesData.FrameworkVocubulary)))); } public string? FrameworkName { get; set; } @@ -30,9 +28,6 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet public int ErrorCount => Errors.Count(); public int ToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } - public int CompetenciesToUpdateCount { get; set; } - public int CompetencyGroupsToAddCount { get; set; } - public int CompetencyGroupsToUpdateCount { get; set; } public int ToUpdateOrSkipCount { get; set; } public string? ImportFile { get; set; } public bool IsNotBlank { get; set; } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml new file mode 100644 index 0000000000..bb5a3b3a5f --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml @@ -0,0 +1,87 @@ +@using DigitalLearningSolutions.Web.Extensions +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import + +@model AddQuestionsToWhichCompetenciesViewModel + +@{ + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + ViewData["Title"] = errorHasOccurred ? "Error: Add Assessment Questions" : "Add Assessment Questions"; + var cancelLinkData = Html.GetRouteValues(); +} + +@section NavMenuItems { + +} +@section NavBreadcrumbs { + +} +
    +
    +
    +
    +
    + +

    + Which @Model.FrameworkVocabularyPlural.ToLower() should the questions be added to? +

    +
    +
    + Choose which @Model.FrameworkVocabularyPlural.ToLower() you want to add the @Model.TotalQuestions assessment questions to +
    +
    + Select one option +
    +
    +
    + @if (Model.CompetenciesToAddCount > 0) + { +
    + + +
    + @Model.TotalQuestions assessment questions will be added to the @Model.CompetenciesToAddCount new @Model.FrameworkVocabularyPlural.ToLower() +
    +
    + } +
    + + +
    + @(Model.CompetenciesToAddCount > 0 ? Model.CompetenciesToAddCount + " new @Model.FrameworkVocabularyPlural.ToLower() and only those of the " : "Only those of the ") @Model.CompetenciesToUpdateCount existing @Model.FrameworkVocabularyPlural.ToLower() that have been modified in the sheet will have the assessment questions added +
    +
    +
    + + +
    + All @(Model.CompetenciesToProcessCount) @Model.FrameworkVocabularyPlural.ToLower() in the sheet that are will have the assessment questions added to them +
    +
    +
    +
    + +
    + Back + +
    + +
    +
    +
    From b8c3b9c9bf9e3fdce94e80221e7998dc79c17f44 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 2 Jan 2025 17:22:41 +0000 Subject: [PATCH 036/271] Removes spurious usings --- .../Controllers/FrameworksController/ImportCompetencies.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 1a6150492c..68d3e26d6f 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -1,11 +1,9 @@ -using AngleSharp.Dom; -using ClosedXML.Excel; +using ClosedXML.Excel; using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Web.Helpers; using DigitalLearningSolutions.Web.Models; using DigitalLearningSolutions.Web.Services; using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import; -using DocumentFormat.OpenXml.EMMA; using GDS.MultiPageFormData.Enums; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; From d80826ca9dbbd07a482248f9098e405ef12055cd Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 3 Jan 2025 11:24:40 +0000 Subject: [PATCH 037/271] TD-5219 Improvements to pre-processing summary and errors --- .../Frameworks/Import/BulkCompetency.cs | 2 +- .../Frameworks/Import/CompetencyTableRow.cs | 9 +++-- .../Import/ImportCompetenciesResult.cs | 18 ++++++++++ .../ImportCompetencies.cs | 2 +- .../ImportCompetenciesFromFileService.cs | 34 +++++++++++++------ .../ImportCompetenciesPreProcessViewModel.cs | 8 ++++- .../Developer/Import/ImportCompleted.cshtml | 2 ++ 7 files changed, 59 insertions(+), 16 deletions(-) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs index 298639d4c7..e59ba301be 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs @@ -8,7 +8,7 @@ namespace DigitalLearningSolutions.Data.Models.Frameworks.Import { public class BulkCompetency { - public int? id { get; set; } + public int? ID { get; set; } public string? CompetencyGroup { get; set; } public string? GroupDescription { get; set; } public string? Competency { get; set; } diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index 1f99fa9550..afed88f1e6 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -12,7 +12,8 @@ public enum RowStatus CompetencyGroupInserted, CompetencyGroupUpdated, CompetencyGroupAndCompetencyUpdated, - InvalidAlwaysShowDescription + InvalidAlwaysShowDescription, + InvalidId } public class CompetencyTableRow : BulkCompetency { @@ -25,7 +26,7 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) } RowNumber = row.RowNumber(); - id = row.Cell(1).GetValue(); + ID = row.Cell(1).GetValue(); CompetencyGroup = row.Cell(2).GetValue(); GroupDescription = row.Cell(3).GetValue(); Competency = row.Cell(4).GetValue(); @@ -57,6 +58,10 @@ public bool Validate() { Error = ImportCompetenciesResult.ErrorReason.InvalidAlwaysShowDescription; } + else if (RowStatus == RowStatus.InvalidId) + { + Error = ImportCompetenciesResult.ErrorReason.InvalidId; + } return !Error.HasValue; } diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs index 53f0beed1a..1f99a35a82 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs @@ -26,6 +26,21 @@ IReadOnlyCollection competencyTableRows GroupAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyGroupInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped); Errors = competencyTableRows.Where(dr => dr.Error.HasValue).Select(dr => (dr.RowNumber, dr.Error!.Value)); + FlagCount = competencyTableRows + .Where(row => !string.IsNullOrWhiteSpace(row.FlagsCsv)) + .SelectMany(static row => row.FlagsCsv.Split(',', StringSplitOptions.RemoveEmptyEntries)) + .Count(); + DistinctFlagsCount = competencyTableRows + .Where(row => !string.IsNullOrWhiteSpace(row.FlagsCsv)) + .SelectMany(row => row.FlagsCsv.Split(',', StringSplitOptions.RemoveEmptyEntries)) + .Select(flag => flag.Trim()) + .Distinct() + .Count(); + CompetencyGroupCount = competencyTableRows + .Where(row => !string.IsNullOrWhiteSpace(row.CompetencyGroup)) + .Select(static row => row.CompetencyGroup) + .Distinct() + .Count(); } public IEnumerable<(int RowNumber, ErrorReason Reason)>? Errors { get; set; } @@ -35,5 +50,8 @@ IReadOnlyCollection competencyTableRows public int GroupAddedCount { get; set; } public int GroupUpdatedCount { get; set; } public int SkippedCount { get; set; } + public int FlagCount { get; set; } + public int DistinctFlagsCount { get; set; } + public int CompetencyGroupCount { get; set; } } } diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 68d3e26d6f..ecbb7a2a9e 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -79,7 +79,7 @@ public IActionResult ImportCompleted() var workbook = new XLWorkbook(filePath); try { - var results = importCompetenciesFromFileService.PreProcessCompetenciesTable(workbook, data.FrameworkVocubulary); + var results = importCompetenciesFromFileService.PreProcessCompetenciesTable(workbook, data.FrameworkVocubulary, data.FrameworkId); var resultsModel = new ImportCompetenciesPreProcessViewModel(results, data) { IsNotBlank = data.IsNotBlank, TabName = data.TabName }; data.CompetenciesToProcessCount = resultsModel.ToProcessCount; data.CompetenciesToAddCount = resultsModel.CompetenciesToAddCount; diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index d8611a86f8..c5c82281f6 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -16,7 +16,7 @@ namespace DigitalLearningSolutions.Web.Services public interface IImportCompetenciesFromFileService { byte[] GetCompetencyFileForFramework(int frameworkId, bool isBlank, string vocabulary); - public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary); + public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary, int frameworkId); public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary); } public class ImportCompetenciesFromFileService : IImportCompetenciesFromFileService @@ -30,27 +30,36 @@ IFrameworkService frameworkService { this.frameworkService = frameworkService; } - public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary) + public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary, int frameworkId) { var table = OpenCompetenciesTable(workbook, vocabulary); var competencyRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); + var existingCompetencies = frameworkService.GetBulkCompetenciesForFramework(frameworkId); + var existingIds = existingCompetencies.Select(bc => (int)bc.ID).ToList(); foreach (var competencyRow in competencyRows) { - PreProcessCompetencyRow(competencyRow); + PreProcessCompetencyRow(competencyRow, existingIds); } return new ImportCompetenciesResult(competencyRows); } - private void PreProcessCompetencyRow(CompetencyTableRow competencyRow) + private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List existingIds) { - competencyRow.Validate(); - if (competencyRow.id == null) + if (competencyRow.ID == null) { competencyRow.RowStatus = RowStatus.CompetencyInserted; } else { - competencyRow.RowStatus = RowStatus.CompetencyUpdated; + if (!existingIds.Contains((int)(competencyRow?.ID))) + { + competencyRow.RowStatus = RowStatus.InvalidId; + } + else + { + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + } } + competencyRow.Validate(); } public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary) { @@ -77,7 +86,12 @@ internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId) { var competenciesRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); - + + var competencyGroupCount = competenciesRows + .Where(row => !string.IsNullOrWhiteSpace(row.CompetencyGroup)) + .Select(row => row.CompetencyGroup) + .Distinct() + .Count(); foreach (var competencyRow in competenciesRows) { maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, competencyRow); @@ -167,13 +181,11 @@ public byte[] GetCompetencyFileForFramework(int frameworkId, bool blank, string } private void PopulateCompetenciesSheet(IXLWorkbook workbook, int frameworkId, bool blank, string vocabulary) { - - var competencyRecords = frameworkService.GetBulkCompetenciesForFramework(blank ? 0 : frameworkId); var competencies = competencyRecords.Select( x => new { - ID = x.id, + x.ID, x.CompetencyGroup, x.GroupDescription, x.Competency, diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs index 67f604723a..343ad1a74c 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs @@ -19,6 +19,9 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet CompetenciesToAddCount = bulkCompetenciesResult.CompetencyAddedCount; ToUpdateOrSkipCount = bulkCompetenciesResult.CompetencyUpdatedCount; Errors = bulkCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason, FrameworkVocabularyHelper.VocabularySingular(bulkCompetenciesData.FrameworkVocubulary)))); + FlagCount = bulkCompetenciesResult.FlagCount; + DistinctFlagsCount = bulkCompetenciesResult.DistinctFlagsCount; + CompetencyGroupCount = bulkCompetenciesResult.CompetencyGroupCount; } public string? FrameworkName { get; set; } public int PublishStatusID { get; set; } @@ -32,6 +35,9 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet public string? ImportFile { get; set; } public bool IsNotBlank { get; set; } public string TabName { get; set; } + public int FlagCount { get; set; } + public int DistinctFlagsCount { get; set; } + public int CompetencyGroupCount { get; set; } private static string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReason reason, string vocabularySingular) { @@ -42,7 +48,7 @@ private static string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReas ImportCompetenciesResult.ErrorReason.MissingCompetencyName => vocabularySingular + " is blank. " + vocabularySingular + " is a required field and cannot be left blank", ImportCompetenciesResult.ErrorReason.InvalidId => - "The ID provided does not match a " + vocabularySingular + " ID in this Framework", + "The ID provided does not match a " + vocabularySingular + " ID in this Framework. Leave the ID column blank for new competencies.", ImportCompetenciesResult.ErrorReason.TooLongCompetencyName => vocabularySingular + " must be 500 characters or less.", ImportCompetenciesResult.ErrorReason.InvalidAlwaysShowDescription => diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index fcabc89014..35e6884155 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -35,6 +35,8 @@
  • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
  • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
  • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
  • +
  • In @Model.CompetencyGroupCount @Model.FrameworkVocabularySingular.ToLower() groups
  • +
  • With a total of @Model.FlagCount flags assigned to Model.FrameworkVocabularyPlural.ToLower() (@Model.DistinctFlagsCount distinct flags)
  • @if (Model.ErrorCount > 0) {
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
  • From cba6f1f73269ef602aa1b4318f80d0100a1b6308 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 3 Jan 2025 11:28:30 +0000 Subject: [PATCH 038/271] Adds missing @ to indicate inline code --- .../Views/Frameworks/Developer/Import/ImportCompleted.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 35e6884155..4a967c11fb 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -36,7 +36,7 @@
  • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
  • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
  • In @Model.CompetencyGroupCount @Model.FrameworkVocabularySingular.ToLower() groups
  • -
  • With a total of @Model.FlagCount flags assigned to Model.FrameworkVocabularyPlural.ToLower() (@Model.DistinctFlagsCount distinct flags)
  • +
  • With a total of @Model.FlagCount flags assigned to @Model.FrameworkVocabularyPlural.ToLower() (@Model.DistinctFlagsCount distinct flags)
  • @if (Model.ErrorCount > 0) {
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
  • From 0ba85e5ed37b587bf94b95555db9d715c6e84761 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 3 Jan 2025 16:25:22 +0000 Subject: [PATCH 039/271] TD-5220 Implements store competency ordering option form --- .../Frameworks/Import/CompetencyTableRow.cs | 1 + .../Import/ImportCompetenciesResult.cs | 4 +- .../ImportCompetencies.cs | 26 +++++++ .../Models/BulkCompetenciesData.cs | 2 + .../ImportCompetenciesFromFileService.cs | 19 ++++- .../Import/AddAssessmentQuestionsViewModel.cs | 2 + ...ddQuestionsToWhichCompetenciesViewModel.cs | 1 + .../ApplyCompetencyOrderingViewModel.cs | 30 ++++++++ .../ImportCompetenciesPreProcessViewModel.cs | 2 + .../Import/AddAssessmentQuestions.cshtml | 3 +- .../AddQuestionsToWhichCompetencies.cshtml | 4 +- .../Import/ApplyCompetencyOrdering.cshtml | 75 +++++++++++++++++++ .../Developer/Import/ImportCompleted.cshtml | 21 ++++-- .../Frameworks/Developer/Import/Index.cshtml | 2 +- 14 files changed, 176 insertions(+), 16 deletions(-) create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ApplyCompetencyOrderingViewModel.cs create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index afed88f1e6..16ea0b9e52 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -9,6 +9,7 @@ public enum RowStatus CompetencyGroupAndCompetencyInserted, CompetencyInserted, CompetencyUpdated, + CompetencyUpdatedAndReordered, CompetencyGroupInserted, CompetencyGroupUpdated, CompetencyGroupAndCompetencyUpdated, diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs index 1f99a35a82..15f5136274 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs @@ -22,7 +22,8 @@ IReadOnlyCollection competencyTableRows { ProcessedCount = competencyTableRows.Count; CompetencyAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); - CompetencyUpdatedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdated); + CompetencyUpdatedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdated | dr.RowStatus == RowStatus.CompetencyUpdatedAndReordered); + CompetencyReorderedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdatedAndReordered); GroupAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyGroupInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped); Errors = competencyTableRows.Where(dr => dr.Error.HasValue).Select(dr => (dr.RowNumber, dr.Error!.Value)); @@ -47,6 +48,7 @@ IReadOnlyCollection competencyTableRows public int ProcessedCount { get; set; } public int CompetencyAddedCount { get; set; } public int CompetencyUpdatedCount { get; set; } + public int CompetencyReorderedCount { get; set; } public int GroupAddedCount { get; set; } public int GroupUpdatedCount { get; set; } public int SkippedCount { get; set; } diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index ecbb7a2a9e..fa2d3a5214 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -84,6 +84,7 @@ public IActionResult ImportCompleted() data.CompetenciesToProcessCount = resultsModel.ToProcessCount; data.CompetenciesToAddCount = resultsModel.CompetenciesToAddCount; data.CompetenciesToUpdateCount = resultsModel.ToUpdateOrSkipCount; + data.CompetenciesToReorderCount = results.CompetencyReorderedCount; setBulkUploadData(data); return View("Developer/Import/ImportCompleted", resultsModel); } @@ -93,6 +94,30 @@ public IActionResult ImportCompleted() return View("Developer/Import/ImportFailed"); } } + [Route("/Framework/{frameworkId}/{tabname}/Import/Ordering")] + public IActionResult ApplyCompetencyOrdering() + { + var data = GetBulkUploadData(); + if (data.CompetenciesToReorderCount > 0) + { + var model = new ApplyCompetencyOrderingViewModel(data.FrameworkId, data.FrameworkName, data.FrameworkVocubulary, data.CompetenciesToReorderCount, data.ReorderCompetenciesOption); + return View("Developer/Import/ApplyCompetencyOrdering", model); + } + return RedirectToAction("AddAssessmentQuestions", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } + [HttpPost] + [Route("/Framework/{frameworkId}/{tabname}/Import/Ordering")] + public IActionResult ApplyCompetencyOrdering(int reorderCompetenciesOption) + { + var data = GetBulkUploadData(); + + if (data.ReorderCompetenciesOption != reorderCompetenciesOption) + { + data.ReorderCompetenciesOption = reorderCompetenciesOption; + setBulkUploadData(data); + } + return RedirectToAction("AddAssessmentQuestions", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions")] public IActionResult AddAssessmentQuestions() { @@ -119,6 +144,7 @@ public IActionResult AddAssessmentQuestions() data.PublishStatusID, data.CompetenciesToAddCount, data.CompetenciesToUpdateCount, + data.CompetenciesToReorderCount, defaultQuestions, questionSelectList ); diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 738acbf9ea..2d3ce9e4ac 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -35,6 +35,8 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public int CompetenciesToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } public int CompetenciesToUpdateCount { get; set; } + public int CompetenciesToReorderCount { get; set; } + public int ReorderCompetenciesOption { get; set; } = 1; //1 = ignore order, 2 = apply order public int LastRowProcessed { get; set; } public int SubtotalCompetenciesAdded { get; set; } public int SubtotalCompetenciesUpdated { get; set; } diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index c5c82281f6..592d17c015 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -34,15 +34,16 @@ public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook { var table = OpenCompetenciesTable(workbook, vocabulary); var competencyRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); + var newCompetencyIds = competencyRows.Select(row => row.ID ?? 0).ToList(); var existingCompetencies = frameworkService.GetBulkCompetenciesForFramework(frameworkId); var existingIds = existingCompetencies.Select(bc => (int)bc.ID).ToList(); foreach (var competencyRow in competencyRows) { - PreProcessCompetencyRow(competencyRow, existingIds); + PreProcessCompetencyRow(competencyRow, newCompetencyIds, existingIds); } return new ImportCompetenciesResult(competencyRows); } - private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List existingIds) + private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List newIds, List existingIds) { if (competencyRow.ID == null) { @@ -50,13 +51,23 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List } else { - if (!existingIds.Contains((int)(competencyRow?.ID))) + var id = (int)(competencyRow?.ID); + if (!existingIds.Contains(id)) { competencyRow.RowStatus = RowStatus.InvalidId; } else { - competencyRow.RowStatus = RowStatus.CompetencyUpdated; + int originalIndex = existingIds.IndexOf(id); + int newIndex = newIds.IndexOf(id); + if(originalIndex == newIndex) + { + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + } + else + { + competencyRow.RowStatus = RowStatus.CompetencyUpdatedAndReordered; + } } } competencyRow.Validate(); diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs index bfd1cf3d12..204f7e49e2 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs @@ -12,6 +12,7 @@ public class AddAssessmentQuestionsViewModel( int publishStatusId, int newCompetencies, int existingCompetencies, + int competenciesToReorderCount, IEnumerable defaultQuestions, SelectList questionSelectList ) : AddAssessmentQuestionsFormData @@ -23,6 +24,7 @@ SelectList questionSelectList public int PublishStatusID { get; set; } = publishStatusId; public int NewCompetencies { get; set; } = newCompetencies; public int ExistingCompetencies { get; set; } = existingCompetencies; + public int CompetenciesToReorderCount { get; set; } = competenciesToReorderCount; public IEnumerable? DefaultQuestions { get; set; } = defaultQuestions; public SelectList? QuestionSelectList { get; set; } = questionSelectList; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs index d6cbae84ca..fa86ccc30a 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs @@ -37,5 +37,6 @@ public AddQuestionsToWhichCompetenciesViewModel public int CompetenciesToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } public int CompetenciesToUpdateCount { get; set; } + } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ApplyCompetencyOrderingViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ApplyCompetencyOrderingViewModel.cs new file mode 100644 index 0000000000..ee912de97f --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ApplyCompetencyOrderingViewModel.cs @@ -0,0 +1,30 @@ +using DigitalLearningSolutions.Web.Helpers; + +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +{ + public class ApplyCompetencyOrderingViewModel + { + public ApplyCompetencyOrderingViewModel + ( + int frameworkId, + string frameworkName, + string frameworkVocabulary, + int competenciesToReorderCount, + int reorderCompetenciesOption + ) + { + FrameworkID = frameworkId; + FrameworkName = frameworkName; + FrameworkVocabularySingular = FrameworkVocabularyHelper.VocabularySingular(frameworkVocabulary); + FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(frameworkVocabulary); + CompetenciesToReorderCount = competenciesToReorderCount; + ReorderCompetenciesOption = reorderCompetenciesOption; + } + public int FrameworkID { get; set; } + public string FrameworkName { get; set; } + public string FrameworkVocabularySingular { get; set; } + public string FrameworkVocabularyPlural { get; set; } + public int ReorderCompetenciesOption { get; set; } = 1; //1 = ignore order, 2 = apply order + public int CompetenciesToReorderCount { get; set; } + } +} diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs index 343ad1a74c..96b7935ea3 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs @@ -17,6 +17,7 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(bulkCompetenciesData.FrameworkVocubulary); ToProcessCount = bulkCompetenciesResult.ProcessedCount; CompetenciesToAddCount = bulkCompetenciesResult.CompetencyAddedCount; + CompetenciesToReorderCount = bulkCompetenciesResult.CompetencyReorderedCount; ToUpdateOrSkipCount = bulkCompetenciesResult.CompetencyUpdatedCount; Errors = bulkCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason, FrameworkVocabularyHelper.VocabularySingular(bulkCompetenciesData.FrameworkVocubulary)))); FlagCount = bulkCompetenciesResult.FlagCount; @@ -31,6 +32,7 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet public int ErrorCount => Errors.Count(); public int ToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } + public int CompetenciesToReorderCount { get; set; } public int ToUpdateOrSkipCount { get; set; } public string? ImportFile { get; set; } public bool IsNotBlank { get; set; } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml index ae9cdec7c2..9e6c443d05 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml @@ -96,9 +96,10 @@
    + Back - +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml index bb5a3b3a5f..0dcf3bc1f2 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml @@ -29,7 +29,7 @@
    -
    +

    @@ -81,7 +81,7 @@ Back - +

    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml new file mode 100644 index 0000000000..398343f461 --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml @@ -0,0 +1,75 @@ +@using DigitalLearningSolutions.Web.Extensions +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import + +@model ApplyCompetencyOrderingViewModel + +@{ + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + ViewData["Title"] = errorHasOccurred ? "Error: Add Assessment Questions" : "Add Assessment Questions"; + var cancelLinkData = Html.GetRouteValues(); +} + +@section NavMenuItems { + +} +@section NavBreadcrumbs { + +} +
    +
    +
    +
    +
    + +

    + Apply @Model.FrameworkVocabularySingular.ToLower() sequence changes? +

    +
    +
    + Your uploaded file includes changes to the sequence of existing @Model.FrameworkVocabularyPlural.ToLower(). Choose whether to store the changes to @Model.FrameworkVocabularySingular.ToLower() sequence during update. +
    +
    + Select an option +
    +
    +
    +
    + + +
    + @Model.FrameworkVocabularyPlural will be updated if they have changed but there sequence/order in the framework will not change. +
    +
    +
    + + +
    + The sequence of @Model.FrameworkVocabularyPlural.ToLower() in the framework will be changed to reflect the order in the sheet during processing. +
    +
    +
    +
    + +
    + Back + +
    + +
    +
    +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 4a967c11fb..961829e3d6 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -32,23 +32,30 @@

    @(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

      -
    • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
    • -
    • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
    • -
    • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
    • -
    • In @Model.CompetencyGroupCount @Model.FrameworkVocabularySingular.ToLower() groups
    • -
    • With a total of @Model.FlagCount flags assigned to @Model.FrameworkVocabularyPlural.ToLower() (@Model.DistinctFlagsCount distinct flags)
    • +
    • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") uploaded
    • @if (Model.ErrorCount > 0) {
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
    • } else { +
    • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
    • +
    • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
    • +
    • In @Model.CompetencyGroupCount @Model.FrameworkVocabularySingular.ToLower() groups
    • +
    • With @Model.FlagCount flags assigned to @Model.FrameworkVocabularyPlural.ToLower() (@Model.DistinctFlagsCount distinct flags)
    • + @if (Model.CompetenciesToReorderCount > 0) + { + +
    • + @Model.CompetenciesToReorderCount existing @Model.FrameworkVocabularySingular.ToLower() @(Model.CompetenciesToReorderCount == 1 ? "record" : "records") have changed sequence in your uploaded sheet. You can choose whether to fix them in the new order next. +
    • + }
    • No errors
    • }
    @if (Model.ErrorCount == 0) { - Continue + Continue } else { @@ -85,7 +92,7 @@ } - +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index a11a391b24..78a5fb95bd 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -110,7 +110,7 @@ - +
    From 396297dcce98d161309b4d553546f477095215cd Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 6 Jan 2025 08:47:24 +0000 Subject: [PATCH 040/271] TD-5220 passes ids of uploaded competencies to get order of stored competencies --- .../DataServices/FrameworkDataService.cs | 12 ++++++++++++ .../Services/FrameworkService.cs | 6 ++++++ .../Services/ImportCompetenciesFromFileService.cs | 3 +-- .../Developer/Import/ImportCompleted.cshtml | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 9781639ad9..c50a8c32cf 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -100,6 +100,7 @@ bool zeroBased Competency? GetFrameworkCompetencyForPreview(int frameworkCompetencyId); IEnumerable GetBulkCompetenciesForFramework(int frameworkId); + List GetFrameworkCompetencyOrder(int frameworkId, List frameworkCompetencyIds); // Comments: IEnumerable GetCommentsForFrameworkId(int frameworkId, int adminId); @@ -2429,5 +2430,16 @@ Competencies AS c INNER JOIN } } + public List GetFrameworkCompetencyOrder(int frameworkId, List frameworkCompetencyIds) + { + return connection.Query( + @"SELECT fc.ID + FROM FrameworkCompetencies AS fc INNER JOIN + FrameworkCompetencyGroups AS fcg ON fc.FrameworkCompetencyGroupID = fcg.ID + WHERE (fc.FrameworkID = @frameworkId) AND (fc.ID IN @frameworkCompetencyIds) + ORDER BY fcg.Ordering, fc.Ordering", + new { frameworkId, frameworkCompetencyIds } + ).ToList(); + } } } diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index f69c07cbf6..c586fa071b 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -57,6 +57,7 @@ public interface IFrameworkService int GetMaxFrameworkCompetencyGroupID(); IEnumerable GetBulkCompetenciesForFramework(int frameworkId); + List GetFrameworkCompetencyOrder(int frameworkId, List frameworkCompetencyIds); // Assessment questions: IEnumerable GetAllCompetencyQuestions(int adminId); @@ -386,6 +387,11 @@ public IEnumerable GetBulkCompetenciesForFramework(int framework return frameworkDataService.GetBulkCompetenciesForFramework(frameworkId); } + public List GetFrameworkCompetencyOrder(int frameworkId, List frameworkCompetencyIds) + { + return frameworkDataService.GetFrameworkCompetencyOrder(frameworkId, frameworkCompetencyIds); + } + public CollaboratorNotification? GetCollaboratorNotification(int id, int invitedByAdminId) { return frameworkDataService.GetCollaboratorNotification(id, invitedByAdminId); diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 592d17c015..a26793b651 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -35,8 +35,7 @@ public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook var table = OpenCompetenciesTable(workbook, vocabulary); var competencyRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); var newCompetencyIds = competencyRows.Select(row => row.ID ?? 0).ToList(); - var existingCompetencies = frameworkService.GetBulkCompetenciesForFramework(frameworkId); - var existingIds = existingCompetencies.Select(bc => (int)bc.ID).ToList(); + var existingIds = frameworkService.GetFrameworkCompetencyOrder(frameworkId, newCompetencyIds); foreach (var competencyRow in competencyRows) { PreProcessCompetencyRow(competencyRow, newCompetencyIds, existingIds); diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 961829e3d6..b127e53979 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -59,7 +59,7 @@ } else { -

    Check the information below. You will need fix these errors before continuing or remove the rows with errors from your spreadsheet:

    +

    Check the information below. You will need to fix these errors before continuing or remove the rows with errors from your spreadsheet:

    Error: @Model.ErrorCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ErrorCount == 1 ? "row" : "rows") contain errors and cannot be processed From dcdc17b38c15bc32f8d3b7d7b19eacb1e88cc69e Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 6 Jan 2025 09:10:57 +0000 Subject: [PATCH 041/271] TD-5220 Implements CancelImport method to clear down uploaded file and temp data --- .../FrameworksController/ImportCompetencies.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index fa2d3a5214..133efd717f 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -217,6 +217,15 @@ public IActionResult AddQuestionsToWhichCompetencies(int AddAssessmentQuestionsO setBulkUploadData(data); return RedirectToAction("Summary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); } + [Route("CancelImport")] + public IActionResult CancelImport() + { + var data = GetBulkUploadData(); + var frameworkId = data.FrameworkId; + FileHelper.DeleteFile(webHostEnvironment, data.CompetenciesFileName); + TempData.Clear(); + return RedirectToAction("ViewFramework", new { frameworkId, tabname = "Structure" }); + } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { TempData.Clear(); From d85bdbd1294811e6edbf94f49abc59c056b00bf4 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 6 Jan 2025 16:38:10 +0000 Subject: [PATCH 042/271] TD-5162 Implements import summary screen --- .../ImportCompetencies.cs | 11 +- .../Import/ImportSummaryViewModel.cs | 41 +++++++ .../AddQuestionsToWhichCompetencies.cshtml | 4 +- .../Developer/Import/ImportSummary.cshtml | 110 ++++++++++++++++++ 4 files changed, 162 insertions(+), 4 deletions(-) create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportSummaryViewModel.cs create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 133efd717f..08ff1eb0ff 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -187,7 +187,7 @@ public IActionResult AddAssessmentQuestions(AddAssessmentQuestionsFormData model { data.AddAssessmentQuestionsOption = 1; setBulkUploadData(data); - return RedirectToAction("Summary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + return RedirectToAction("ImportSummary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); } } [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions/Competencies")] @@ -215,7 +215,14 @@ public IActionResult AddQuestionsToWhichCompetencies(int AddAssessmentQuestionsO var data = GetBulkUploadData(); data.AddAssessmentQuestionsOption = AddAssessmentQuestionsOption; setBulkUploadData(data); - return RedirectToAction("Summary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + return RedirectToAction("ImportSummary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } + [Route("/Framework/{frameworkId}/{tabname}/Import/Summary")] + public IActionResult ImportSummary() + { + var data = GetBulkUploadData(); + var model = new ImportSummaryViewModel(data); + return View("Developer/Import/ImportSummary", model); } [Route("CancelImport")] public IActionResult CancelImport() diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportSummaryViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportSummaryViewModel.cs new file mode 100644 index 0000000000..f59c14f72d --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportSummaryViewModel.cs @@ -0,0 +1,41 @@ +using DigitalLearningSolutions.Web.Helpers; +using DigitalLearningSolutions.Web.Models; +using System.Collections.Generic; + +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +{ + public class ImportSummaryViewModel + { + public ImportSummaryViewModel(BulkCompetenciesData data) + { + FrameworkName = data.FrameworkName; + PublishStatusID = data.PublishStatusID; + FrameworkVocabularySingular = FrameworkVocabularyHelper.VocabularySingular(data.FrameworkVocubulary); + FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(data.FrameworkVocubulary); + ToProcessCount = data.CompetenciesToProcessCount; + CompetenciesToAddCount = data.CompetenciesToAddCount; + CompetenciesToReorderCount = data.CompetenciesToReorderCount; + ToUpdateOrSkipCount = data.CompetenciesToUpdateCount; + AddAssessmentQuestionsOption = data.AddAssessmentQuestionsOption; + AddDefaultAssessmentQuestions = data.AddDefaultAssessmentQuestions; + AddCustomAssessmentQuestion = data.AddCustomAssessmentQuestion; + DefaultAssessmentQuestionIDs = data.DefaultQuestionIDs; + CustomAssessmentQuestionID = data.CustomAssessmentQuestionID; + ReorderCompetenciesOption = data.ReorderCompetenciesOption; + } + public string? FrameworkName { get; set; } + public int PublishStatusID { get; set; } + public string FrameworkVocabularySingular { get; set; } + public string FrameworkVocabularyPlural { get; set; } + public int ToProcessCount { get; set; } + public int CompetenciesToAddCount { get; set; } + public int CompetenciesToReorderCount { get; set; } + public int ToUpdateOrSkipCount { get; set; } + public int AddAssessmentQuestionsOption { get; set; } = 1; //1 = only added, 2 = added and updated, 3 = all uploaded + public bool AddDefaultAssessmentQuestions { get; set; } + public bool AddCustomAssessmentQuestion { get; set; } + public List DefaultAssessmentQuestionIDs { get; set; } + public int? CustomAssessmentQuestionID { get; set; } + public int ReorderCompetenciesOption { get; set; } = 1; //1 = ignore order, 2 = apply order + } +} diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml index 0dcf3bc1f2..eef8dbabe8 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml @@ -59,10 +59,10 @@
    - @(Model.CompetenciesToAddCount > 0 ? Model.CompetenciesToAddCount + " new @Model.FrameworkVocabularyPlural.ToLower() and only those of the " : "Only those of the ") @Model.CompetenciesToUpdateCount existing @Model.FrameworkVocabularyPlural.ToLower() that have been modified in the sheet will have the assessment questions added + @(Model.CompetenciesToAddCount > 0 ? Model.CompetenciesToAddCount + $" new {@Model.FrameworkVocabularyPlural.ToLower()} and only those of the " : "Only those of the ") @Model.CompetenciesToUpdateCount existing @Model.FrameworkVocabularyPlural.ToLower() that have been modified in the sheet will have the assessment questions added
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml new file mode 100644 index 0000000000..7fd3ada28f --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -0,0 +1,110 @@ +@inject IConfiguration Configuration +@using DigitalLearningSolutions.Web.Extensions +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +@using Microsoft.Extensions.Configuration +@model ImportSummaryViewModel +@{ + ViewData["Title"] = "Framework - Import Competencies"; + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + var cancelLinkData = Html.GetRouteValues(); + var process = Model.CompetenciesToAddCount > 0 && Model.ToUpdateOrSkipCount > 0 ? "add and update" : Model.CompetenciesToAddCount > 0 ? "add" : "update"; + var addQsTo = Model.AddAssessmentQuestionsOption == 1 ? "new" : Model.AddAssessmentQuestionsOption == 2 ? "new and updated" : "all"; +} + +@section NavMenuItems { + +} +@section NavBreadcrumbs { + +} +
    +
    +

    @Model.FrameworkVocabularyPlural import summary

    +

    Your @Model.FrameworkVocabularySingular.ToLower() sheet is ready to be processed. Please check the details below are correct before proceeding to @process @Model.FrameworkVocabularyPlural.ToLower() in the framework @Model.FrameworkName.

    +

    Upload summary

    +
    + +
    +
    + @Model.FrameworkVocabularySingular rows uploaded +
    +
    + @Model.ToProcessCount +
    + +
    + +
    +
    + @Model.FrameworkVocabularyPlural to add +
    +
    + @Model.CompetenciesToAddCount +
    + +
    + +
    +
    + @Model.FrameworkVocabularyPlural to update +
    +
    + @Model.ToUpdateOrSkipCount +
    +
    +
    +

    Additional processing steps

    +
    + @if(Model.CompetenciesToReorderCount > 0) + { +
    +
    + Changes to @Model.FrameworkVocabularySingular.ToLower() order +
    +
    + @(Model.ReorderCompetenciesOption == 1 ? "Ignore" : "Apply") changes to @Model.FrameworkVocabularySingular.ToLower() order +
    +
    + + Change @Model.FrameworkVocabularySingular.ToLower() order options + +
    +
    + } +
    +
    + Add questions to @addQsTo @Model.FrameworkVocabularyPlural.ToLower() in sheet +
    +
    + @Model.DefaultAssessmentQuestionIDs.Count() framework default questions @(Model.AddCustomAssessmentQuestion && Model.CustomAssessmentQuestionID != null ? "AND a custom question" : "") +
    +
    + + Change assessment question options + +
    +
    +
    + +
    + Important: +

    Once @Model.FrameworkVocabularySingular.ToLower() records are processed, changes cannot be undone.

    +
    +
    + Back + +
    + +
    +
    From c3feb4888783cec8055ad97c40587c9ef8c2a5a0 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 6 Jan 2025 16:41:13 +0000 Subject: [PATCH 043/271] formatter changes --- .../Views/Frameworks/Developer/Import/ImportSummary.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml index 7fd3ada28f..5a782d911f 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -66,7 +66,7 @@

    Additional processing steps

    - @if(Model.CompetenciesToReorderCount > 0) + @if (Model.CompetenciesToReorderCount > 0) {
    From 5da1bdd04f622147c03ddefe3a7061e2a652bc0f Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 7 Jan 2025 16:35:53 +0000 Subject: [PATCH 044/271] TD-5163 Process imported competencies --- .../DataServices/FrameworkDataService.cs | 26 +++-- .../Models/Frameworks/FrameworkCompetency.cs | 1 + .../ImportCompetencies.cs | 14 +++ .../Models/BulkCompetenciesData.cs | 2 + .../Services/FrameworkService.cs | 22 ++-- .../ImportCompetenciesFromFileService.cs | 106 +++++++++++++++--- 6 files changed, 132 insertions(+), 39 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index c50a8c32cf..9c853ea44f 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -131,10 +131,10 @@ bool zeroBased int InsertCompetency(string name, string? description, int adminId); - int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId); + int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false); int AddCollaboratorToFramework(int frameworkId, string userEmail, bool canModify); - void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); + int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); void UpdateFrameworkCustomFlag(int frameworkId, int id, string flagName, string flagGroup, string flagTagClass); void AddFrameworkDefaultQuestion(int frameworkId, int assessmentQuestionId, int adminId, bool addToExisting); @@ -205,7 +205,7 @@ void UpdateFrameworkCompetencyGroup( int adminId ); - void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId); + void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription); void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -656,7 +656,8 @@ public int InsertFrameworkCompetency( int competencyId, int? frameworkCompetencyGroupID, int adminId, - int frameworkId + int frameworkId, + bool alwaysShowDescription = false ) { if ((competencyId < 1) | (adminId < 1) | (frameworkId < 1)) @@ -978,7 +979,7 @@ FROM FrameworkCompetencyGroups AS fcg public FrameworkCompetency? GetFrameworkCompetencyById(int Id) { return connection.QueryFirstOrDefault( - @"SELECT fc.ID, c.ID AS CompetencyID, c.Name, c.Description, fc.Ordering + @"SELECT fc.ID, c.ID AS CompetencyID, c.Name, c.Description, fc.Ordering, c.AlwaysShowDescription FROM FrameworkCompetencies AS fc INNER JOIN Competencies AS c ON fc.CompetencyID = c.ID WHERE fc.ID = @Id", @@ -1045,7 +1046,7 @@ int adminId } } - public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId) + public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription) { if ((frameworkCompetencyId < 1) | (adminId < 1) | (name.Length < 3)) { @@ -1057,10 +1058,10 @@ public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, st //DO WE NEED SOMETHING IN HERE TO CHECK WHETHER IT IS USED ELSEWHERE AND WARN THE USER? var numberOfAffectedRows = connection.Execute( - @"UPDATE Competencies SET Name = @name, Description = @description, UpdatedByAdminID = @adminId + @"UPDATE Competencies SET Name = @name, Description = @description, UpdatedByAdminID = @adminId, AlwaysShowDescription = CASE WHEN @alwaysShowDescription IS NULL THEN AlwaysShowDescription ELSE @alwaysShowDescription END FROM Competencies INNER JOIN FrameworkCompetencies AS fc ON Competencies.ID = fc.CompetencyID WHERE (fc.Id = @frameworkCompetencyId)", - new { name, description, adminId, frameworkCompetencyId } + new { name, description, adminId, frameworkCompetencyId, alwaysShowDescription} ); if (numberOfAffectedRows < 1) { @@ -1094,11 +1095,12 @@ SELECT FlagID FROM CompetencyFlags new { competencyId, frameworkId }); } - public void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) + public int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) { - connection.Execute( - @$"INSERT INTO Flags(FrameworkID, FlagName, FlagGroup, FlagTagClass) - VALUES(@frameworkId, @flagName, @flagGroup, @flagTagClass)", + return connection.QuerySingle( + @"INSERT INTO Flags(FrameworkID, FlagName, FlagGroup, FlagTagClass) + OUTPUT INSERTED.ID + VALUES(@frameworkId, @flagName, @flagGroup, @flagTagClass);", new { frameworkId, flagName, flagGroup, flagTagClass }); } diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs b/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs index 56bd78ddc1..a42d3d10fe 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs @@ -14,6 +14,7 @@ public class FrameworkCompetency : BaseSearchableItem public int AssessmentQuestions { get; set; } public int CompetencyLearningResourcesCount { get; set; } public string? FrameworkName { get; set; } + public bool? AlwaysShowDescription { get; set; } public override string SearchableName { diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 08ff1eb0ff..735db4a3e5 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -224,6 +224,20 @@ public IActionResult ImportSummary() var model = new ImportSummaryViewModel(data); return View("Developer/Import/ImportSummary", model); } + [HttpPost] + [Route("/Framework/{frameworkId}/{tabname}/Import/Summary")] + public IActionResult ImportSummarySubmit() + { + var data = GetBulkUploadData(); + var adminId = GetAdminId(); + var uploadDir = Path.Combine(webHostEnvironment.WebRootPath, "Uploads\\"); + var filePath = Path.Combine(uploadDir, data.CompetenciesFileName); + var workbook = new XLWorkbook(filePath); + var results = importCompetenciesFromFileService.ProcessCompetenciesFromFile(workbook, adminId, data.FrameworkId, data.FrameworkVocubulary, data.ReorderCompetenciesOption, data.AddAssessmentQuestionsOption, data.AddCustomAssessmentQuestion ? (int)data.CustomAssessmentQuestionID : 0, data.AddDefaultAssessmentQuestions ? data.DefaultQuestionIDs : []); + data.ImportCompetenciesResult = results; + setBulkUploadData(data); + return RedirectToAction("UploadResults", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } [Route("CancelImport")] public IActionResult CancelImport() { diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 2d3ce9e4ac..344c674a89 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -1,4 +1,5 @@ using DigitalLearningSolutions.Data.Models.Frameworks; +using DigitalLearningSolutions.Data.Models.Frameworks.Import; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -42,5 +43,6 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public int SubtotalCompetenciesUpdated { get; set; } public int SubTotalSkipped { get; set; } public IEnumerable<(int RowNumber, string ErrorMessage)> Errors { get; set; } = Enumerable.Empty<(int, string)>(); + public ImportCompetenciesResult ImportCompetenciesResult { get;set;} } } diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index c586fa071b..c4f7035ba9 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -119,16 +119,16 @@ bool zeroBased int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId); - int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId); + int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false); IEnumerable GetAllCompetenciesForAdminId(string name, int adminId); int InsertCompetency(string name, string? description, int adminId); - int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId); + int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId); int AddCollaboratorToFramework(int frameworkId, string userEmail, bool canModify); - void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); + int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); void UpdateFrameworkCustomFlag(int frameworkId, int id, string flagName, string flagGroup, string flagTagClass); void AddFrameworkDefaultQuestion(int frameworkId, int assessmentQuestionId, int adminId, bool addToExisting); @@ -199,7 +199,7 @@ void UpdateFrameworkCompetencyGroup( int adminId ); - void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId); + void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription = false); void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -277,9 +277,9 @@ public void AddCompetencyAssessmentQuestion(int frameworkCompetencyId, int asses frameworkDataService.AddCompetencyAssessmentQuestion(frameworkCompetencyId, assessmentQuestionId, adminId); } - public void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) + public int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) { - frameworkDataService.AddCustomFlagToFramework(frameworkId, flagName, flagGroup, flagTagClass); + return frameworkDataService.AddCustomFlagToFramework(frameworkId, flagName, flagGroup, flagTagClass); } public void AddFrameworkDefaultQuestion(int frameworkId, int assessmentQuestionId, int adminId, bool addToExisting) @@ -602,9 +602,9 @@ public int InsertCompetencyGroup(string groupName, string? groupDescription, int return frameworkDataService.InsertCompetencyGroup(groupName, groupDescription, adminId); } - public int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId) + public int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false) { - return frameworkDataService.InsertFrameworkCompetency(competencyId, frameworkCompetencyGroupID, adminId, frameworkId); + return frameworkDataService.InsertFrameworkCompetency(competencyId, frameworkCompetencyGroupID, adminId, frameworkId, alwaysShowDescription); } public int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId) @@ -672,9 +672,9 @@ public void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selec return frameworkDataService.UpdateFrameworkBranding(frameworkId, brandId, categoryId, topicId, adminId); } - public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId) - { - frameworkDataService.UpdateFrameworkCompetency(frameworkCompetencyId, name, description, adminId); + public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription) + { + frameworkDataService.UpdateFrameworkCompetency(frameworkCompetencyId, name, description, adminId, alwaysShowDescription); } public void UpdateFrameworkCompetencyGroup(int frameworkCompetencyGroupId, int competencyGroupId, string name, string? description, int adminId) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index a26793b651..2367bcbefd 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -12,12 +12,13 @@ namespace DigitalLearningSolutions.Web.Services using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Data.Helpers; using DigitalLearningSolutions.Data.Models.Frameworks.Import; + using DocumentFormat.OpenXml.Office2010.Excel; public interface IImportCompetenciesFromFileService { byte[] GetCompetencyFileForFramework(int frameworkId, bool isBlank, string vocabulary); public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary, int frameworkId); - public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary); + public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary, int reorderCompetenciesOption, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds); } public class ImportCompetenciesFromFileService : IImportCompetenciesFromFileService { @@ -71,12 +72,12 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List } competencyRow.Validate(); } - public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary) + public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary, int reorderCompetenciesOption, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds) { int maxFrameworkCompetencyId = frameworkService.GetMaxFrameworkCompetencyID(); int maxFrameworkCompetencyGroupId = frameworkService.GetMaxFrameworkCompetencyGroupID(); var table = OpenCompetenciesTable(workbook, vocabulary); - return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId); + return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds); } internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) { @@ -93,7 +94,7 @@ internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) } return table; } - internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId) + internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds) { var competenciesRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); @@ -104,7 +105,7 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a .Count(); foreach (var competencyRow in competenciesRows) { - maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, competencyRow); + maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } return new ImportCompetenciesResult(competenciesRows); @@ -114,6 +115,9 @@ private int ProcessCompetencyRow( int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, + int addAssessmentQuestionsOption, + int customAssessmentQuestionID, + List defaultQuestionIds, CompetencyTableRow competencyRow ) { @@ -121,11 +125,13 @@ CompetencyTableRow competencyRow { return maxFrameworkCompetencyGroupId; } + int newCompetencyGroupId = 0; + int newCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID - int? frameworkCompetencyGroupId = null; + int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { - var newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, null, adminUserId); + newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); if (newCompetencyGroupId > 0) { frameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminUserId); @@ -136,21 +142,89 @@ CompetencyTableRow competencyRow } } } - - //Check if competency already exists in framework competency group and add if not - var newCompetencyId = frameworkService.InsertCompetency(competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId); - if (newCompetencyId > 0) + // If FrameworkCompetency ID is supplied, update the competency + if (competencyRow.ID != null) { - var newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId); - if (newFrameworkCompetencyId > maxFrameworkCompetencyId) + var frameworkCompetency = frameworkService.GetFrameworkCompetencyById((int)competencyRow.ID); + if (frameworkCompetency != null) { - competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyInserted : RowStatus.CompetencyInserted); + newCompetencyId = frameworkCompetency.CompetencyID; + if (frameworkCompetency.Name != competencyRow.Competency || frameworkCompetency.Description != competencyRow.CompetencyDescription || frameworkCompetency.AlwaysShowDescription != competencyRow.AlwaysShowDescription ) + { + frameworkService.UpdateFrameworkCompetency((int)competencyRow.ID, competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId, competencyRow.AlwaysShowDescription ?? false); + competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyUpdated: RowStatus.CompetencyUpdated); + } + else + { + competencyRow.RowStatus = RowStatus.Skipped; + } } - else + } + else + { + //Check if competency already exists in framework competency group and add if not + newCompetencyId = frameworkService.InsertCompetency(competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId); + if (newCompetencyId > 0) + { + var newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId, competencyRow.AlwaysShowDescription ?? false); //including always show desc flag + if (newFrameworkCompetencyId > maxFrameworkCompetencyId) + { + competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyInserted : RowStatus.CompetencyInserted); + } + else + { + competencyRow.RowStatus = RowStatus.Skipped; + } + } + } + + + // If flags are supplied, add them: + if (competencyRow.FlagsCsv != null) + { + var flags = competencyRow.FlagsCsv.Split(','); + int[] flagIds = []; + foreach (var flag in flags) { + int flagId = 0; + var frameworkFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, null); + if (frameworkFlags.Any()) + { + foreach (var frameworkFlag in frameworkFlags) + { + if (frameworkFlag.FlagName == flag) + { + flagId = frameworkFlag.FlagId; + } + } + } + if (flagId == 0) + { + flagId = frameworkService.AddCustomFlagToFramework(frameworkId, flag, "Flag", "nhsuk-tag--white"); + } + flagIds.Append(flagId); + } + if (flagIds.Any()) { + frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, flagIds); + } + } + + + // Add assessment questions if necessary: + if (defaultQuestionIds.Count > 0 | customAssessmentQuestionID > 0) + { + if (competencyRow.RowStatus == RowStatus.CompetencyInserted | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted || addAssessmentQuestionsOption == 2 && competencyRow.RowStatus == RowStatus.CompetencyUpdated | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated || addAssessmentQuestionsOption == 3) { - competencyRow.RowStatus = RowStatus.Skipped; + foreach(var id in defaultQuestionIds) + { + frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, id, adminUserId); + } + if(customAssessmentQuestionID > 0) + { + frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, customAssessmentQuestionID, adminUserId); + } } } + return maxFrameworkCompetencyGroupId; } From 91593d13a3024ffde6297e3b63efba2c2ab77fc9 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 7 Jan 2025 17:27:55 +0000 Subject: [PATCH 045/271] TD-5163 Implements the upload results view --- .../DataServices/FrameworkDataService.cs | 8 +++++++- .../FrameworksController/ImportCompetencies.cs | 12 ++++++++++++ .../Services/ImportCompetenciesFromFileService.cs | 7 ++++--- .../Import/ImportCompetenciesResultsViewModel.cs | 15 ++++++++++++++- .../Developer/Import/ImportSummary.cshtml | 2 +- .../Developer/Import/UploadResults.cshtml | 7 ++++--- 6 files changed, 42 insertions(+), 9 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 9c853ea44f..9765a8cfd2 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -1516,7 +1516,13 @@ public void AddCompetencyAssessmentQuestion(int frameworkCompetencyId, int asses FROM [CompetencyAssessmentQuestions] WHERE ([CompetencyId] = fc.CompetencyID)), 0)+1 FROM FrameworkCompetencies AS fc - WHERE Id = @frameworkCompetencyId", + WHERE Id = @frameworkCompetencyId + AND NOT EXISTS ( + SELECT 1 + FROM CompetencyAssessmentQuestions AS caq + WHERE caq.CompetencyId = fc.CompetencyID + AND caq.AssessmentQuestionID = @assessmentQuestionId + );", new { frameworkCompetencyId, assessmentQuestionId } ); if (numberOfAffectedRows < 1) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 735db4a3e5..31c34b8e0a 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -235,9 +235,21 @@ public IActionResult ImportSummarySubmit() var workbook = new XLWorkbook(filePath); var results = importCompetenciesFromFileService.ProcessCompetenciesFromFile(workbook, adminId, data.FrameworkId, data.FrameworkVocubulary, data.ReorderCompetenciesOption, data.AddAssessmentQuestionsOption, data.AddCustomAssessmentQuestion ? (int)data.CustomAssessmentQuestionID : 0, data.AddDefaultAssessmentQuestions ? data.DefaultQuestionIDs : []); data.ImportCompetenciesResult = results; + //TO DO apply ordering changes if required: + if (data.ReorderCompetenciesOption == 2 && data.CompetenciesToReorderCount > 0) + { + + } setBulkUploadData(data); return RedirectToAction("UploadResults", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); } + [Route("/Framework/{frameworkId}/{tabname}/Import/Results")] + public IActionResult UploadResults() + { + var data = GetBulkUploadData(); + var model = new ImportCompetenciesResultsViewModel(data.ImportCompetenciesResult, data.FrameworkId, data.FrameworkName, data.FrameworkVocubulary); + return View("Developer/Import/UploadResults", model); + } [Route("CancelImport")] public IActionResult CancelImport() { diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 2367bcbefd..a235f0a991 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -127,6 +127,7 @@ CompetencyTableRow competencyRow } int newCompetencyGroupId = 0; int newCompetencyId = 0; + int newFrameworkCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) @@ -166,7 +167,7 @@ CompetencyTableRow competencyRow newCompetencyId = frameworkService.InsertCompetency(competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId); if (newCompetencyId > 0) { - var newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId, competencyRow.AlwaysShowDescription ?? false); //including always show desc flag + newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId, competencyRow.AlwaysShowDescription ?? false); //including always show desc flag if (newFrameworkCompetencyId > maxFrameworkCompetencyId) { competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyInserted : RowStatus.CompetencyInserted); @@ -216,11 +217,11 @@ CompetencyTableRow competencyRow { foreach(var id in defaultQuestionIds) { - frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, id, adminUserId); + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, id, adminUserId); } if(customAssessmentQuestionID > 0) { - frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, customAssessmentQuestionID, adminUserId); + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, customAssessmentQuestionID, adminUserId); } } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs index b47108fe15..48204ae0d1 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs @@ -1,25 +1,38 @@ namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { using DigitalLearningSolutions.Data.Models.Frameworks.Import; + using DigitalLearningSolutions.Web.Helpers; using System.Collections.Generic; using System.Linq; public class ImportCompetenciesResultsViewModel { - public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompetenciesResult) + public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompetenciesResult, int frameworkId, string frameworkName, string frameworkVocabulary) { ProcessedCount = importCompetenciesResult.ProcessedCount; CompetenciesInsertedCount = importCompetenciesResult.CompetencyAddedCount; + CompetenciesUpdatedCount = importCompetenciesResult.CompetencyUpdatedCount; CompetencyGroupsInsertedCount = importCompetenciesResult.GroupAddedCount; + CompetencyGroupsUpdatedCount = importCompetenciesResult.GroupUpdatedCount; SkippedCount = importCompetenciesResult.SkippedCount; Errors = importCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason))); + FrameworkID = frameworkId; + FrameworkName = frameworkName; + FrameworkVocabularySingular = FrameworkVocabularyHelper.VocabularySingular(frameworkVocabulary); + FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(frameworkVocabulary); } public IEnumerable<(int RowNumber, string ErrorMessage)> Errors { get; set; } public int ErrorCount => Errors.Count(); public int ProcessedCount { get; set; } public int CompetenciesInsertedCount { get; set; } + public int CompetenciesUpdatedCount { get; set; } public int CompetencyGroupsInsertedCount { get; set; } + public int CompetencyGroupsUpdatedCount { get; set; } public int SkippedCount { get; set; } + public int FrameworkID { get; set; } + public string FrameworkName { get; set; } + public string FrameworkVocabularySingular { get; set; } + public string FrameworkVocabularyPlural { get; set; } private string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReason reason) { return reason switch diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml index 5a782d911f..fedee7029a 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -101,7 +101,7 @@ Important:

    Once @Model.FrameworkVocabularySingular.ToLower() records are processed, changes cannot be undone.

    -
    + Back
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index d83d3ca428..efb819495d 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -34,9 +34,10 @@

    Summary of results:

    • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
    • -
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? "competency group" : "competency groups") inserted
    • -
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? "competency" : "competencies") inserted
    • -
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "record" : "records") skipped (nothing inserted but no errors)
    • +
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
    • +
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
    • +
    • @Model.CompetenciesUpdatedCount new @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
    • +
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted but no errors)
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
    From ea6d9ff530d1c550eb6b4f5d1213d797b045139e Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 09:08:17 +0000 Subject: [PATCH 046/271] TD-5163 Fixes flag assignment during upload processing --- .../ImportCompetenciesFromFileService.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index a235f0a991..9841c5e429 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -11,6 +11,7 @@ namespace DigitalLearningSolutions.Web.Services using ClosedXML.Excel; using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Data.Helpers; + using DigitalLearningSolutions.Data.Models.Frameworks; using DigitalLearningSolutions.Data.Models.Frameworks.Import; using DocumentFormat.OpenXml.Office2010.Excel; @@ -125,14 +126,13 @@ CompetencyTableRow competencyRow { return maxFrameworkCompetencyGroupId; } - int newCompetencyGroupId = 0; int newCompetencyId = 0; int newFrameworkCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { - newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); + int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); if (newCompetencyGroupId > 0) { frameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminUserId); @@ -181,10 +181,10 @@ CompetencyTableRow competencyRow // If flags are supplied, add them: - if (competencyRow.FlagsCsv != null) + if (!string.IsNullOrWhiteSpace(competencyRow.FlagsCsv.Trim())) { var flags = competencyRow.FlagsCsv.Split(','); - int[] flagIds = []; + var flagIds = new List(); foreach (var flag in flags) { int flagId = 0; var frameworkFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, null); @@ -195,6 +195,7 @@ CompetencyTableRow competencyRow if (frameworkFlag.FlagName == flag) { flagId = frameworkFlag.FlagId; + break; } } } @@ -202,10 +203,14 @@ CompetencyTableRow competencyRow { flagId = frameworkService.AddCustomFlagToFramework(frameworkId, flag, "Flag", "nhsuk-tag--white"); } - flagIds.Append(flagId); + flagIds.Add(flagId); } - if (flagIds.Any()) { - frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, flagIds); + if (flagIds.Count > 0) { + frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); + if (competencyRow.RowStatus == RowStatus.Skipped) + { + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + } } } From cd4e4db10702e66524486222cca73bce3595ed0c Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 09:08:51 +0000 Subject: [PATCH 047/271] TD-5163 General tweaks to improve wording of buttons and body text --- .../Views/Frameworks/Developer/Import/Index.cshtml | 2 +- .../Views/Frameworks/Developer/Import/UploadResults.cshtml | 2 +- .../Views/Frameworks/Developer/_Structure.cshtml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 78a5fb95bd..11fd4f4b48 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -79,7 +79,7 @@
    This Excel file will include all existing @Model.FrameworkVocabularyPlural.ToLower() whose details you can update.
    - New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row. + New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row, leaving the ID column blank.
    Download @Model.FrameworkVocabularyPlural.ToLower() diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index efb819495d..b65e4026f1 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -36,7 +36,7 @@
  • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
  • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
  • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
  • -
  • @Model.CompetenciesUpdatedCount new @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
  • +
  • @Model.CompetenciesUpdatedCount existing @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
  • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted but no errors)
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
  • diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml index a1097f6e18..849b5121ba 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml @@ -81,7 +81,7 @@ else
    } From 2d009b51befab57f31360c85330689fbc16d66e1 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 16:55:34 +0000 Subject: [PATCH 048/271] TD-5163 Corrects heading --- .../Views/Frameworks/Developer/Import/ImportCompleted.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index b127e53979..93abdd4983 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -28,7 +28,7 @@ }
    -

    Delegate file uploaded

    +

    @Model.FrameworkVocabularySingular.ToLower() file uploaded

    @(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

      From d956c167137bae8bcd54868382e4d8756deeecb1 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 16:56:32 +0000 Subject: [PATCH 049/271] TD-5163 modifies the insert competency group method to take an optional framework id --- .../DataServices/FrameworkDataService.cs | 62 ++++++++++++------- .../Services/FrameworkService.cs | 6 +- .../ImportCompetenciesFromFileService.cs | 2 +- 3 files changed, 42 insertions(+), 28 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 9765a8cfd2..65541032f3 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -123,7 +123,7 @@ bool zeroBased //INSERT DATA BrandedFramework CreateFramework(DetailFramework detailFramework, int adminId); - int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId); + int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId); int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId); @@ -475,7 +475,7 @@ public BrandedFramework CreateFramework(DetailFramework detailFramework, int adm return new BrandedFramework(); } - var existingFrameworks = (int)connection.ExecuteScalar( + var existingFrameworks = connection.QuerySingle( @"SELECT COUNT(*) FROM Frameworks WHERE FrameworkName = @frameworkName", new { frameworkName } ); @@ -548,7 +548,7 @@ int adminId return GetBrandedFrameworkByFrameworkId(frameworkId, adminId); } - public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId) + public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId) { if ((groupName.Length == 0) | (adminId < 1)) { @@ -558,9 +558,16 @@ public int InsertCompetencyGroup(string groupName, string? groupDescription, int return -2; } groupDescription = (groupDescription?.Trim() == "" ? null : groupDescription); - var existingId = (int)connection.ExecuteScalar( - @"SELECT COALESCE ((SELECT TOP(1)ID FROM CompetencyGroups WHERE [Name] = @groupName AND (@groupDescription IS NULL OR Description = @groupDescription)), 0) AS CompetencyGroupID", - new { groupName, groupDescription } + var existingId = connection.QuerySingle( + @"SELECT COALESCE + ((SELECT TOP (1) ID + FROM CompetencyGroups + WHERE (Name = @groupName) AND EXISTS + (SELECT 1 AS Expr1 + FROM FrameworkCompetencyGroups + WHERE (CompetencyGroupID = CompetencyGroups.ID) AND (FrameworkID = @frameworkId) OR + (CompetencyGroupID = CompetencyGroups.ID) AND (@frameworkId IS NULL))), 0) AS CompetencyGroupID", + new { groupName, groupDescription, frameworkId } ); if (existingId > 0) { @@ -581,8 +588,15 @@ public int InsertCompetencyGroup(string groupName, string? groupDescription, int return -1; } - existingId = (int)connection.ExecuteScalar( - @"SELECT COALESCE ((SELECT TOP(1)ID FROM CompetencyGroups WHERE [Name] = @groupName AND (@groupDescription IS NULL OR Description = @groupDescription)), 0) AS CompetencyGroupID", + existingId = connection.QuerySingle( + @"SELECT COALESCE + ((SELECT TOP (1) ID + FROM CompetencyGroups + WHERE (Name = @groupName) AND EXISTS + (SELECT 1 AS Expr1 + FROM FrameworkCompetencyGroups + WHERE (CompetencyGroupID = CompetencyGroups.ID) AND (FrameworkID = @frameworkId) OR + (CompetencyGroupID = CompetencyGroups.ID) AND (@frameworkId IS NULL))), 0) AS CompetencyGroupID", new { groupName, groupDescription } ); return existingId; @@ -598,7 +612,7 @@ public int InsertFrameworkCompetencyGroup(int groupId, int frameworkId, int admi return -2; } - var existingId = (int)connection.ExecuteScalar( + var existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencyGroups WHERE CompetencyGroupID = @groupID AND FrameworkID = @frameworkID), 0) AS FrameworkCompetencyGroupID", new { groupId, frameworkId } ); @@ -624,7 +638,7 @@ FROM [FrameworkCompetencyGroups] return -1; } - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencyGroups WHERE CompetencyGroupID = @groupID AND FrameworkID = @frameworkID), 0) AS FrameworkCompetencyGroupID", new { groupId, frameworkId } ); @@ -671,14 +685,14 @@ public int InsertFrameworkCompetency( var existingId = 0; if (frameworkCompetencyGroupID == null) { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID IS NULL), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); } else { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID = @frameworkCompetencyGroupID), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); @@ -707,14 +721,14 @@ FROM [FrameworkCompetencies] if (frameworkCompetencyGroupID == null) { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID IS NULL), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); } else { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID = @frameworkCompetencyGroupID), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); @@ -765,7 +779,7 @@ public int AddCollaboratorToFramework(int frameworkId, string? userEmail, bool c return -3; } - var existingId = (int)connection.ExecuteScalar( + var existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCollaborators @@ -815,7 +829,7 @@ FROM FrameworkCollaborators ); } - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCollaborators @@ -907,7 +921,7 @@ public bool UpdateFrameworkName(int frameworkId, int adminId, string frameworkNa return false; } - var existingFrameworks = (int)connection.ExecuteScalar( + var existingFrameworks = connection.QuerySingle( @"SELECT COUNT(*) FROM Frameworks WHERE FrameworkName = @frameworkName AND ID <> @frameworkId", new { frameworkName, frameworkId } ); @@ -1003,7 +1017,7 @@ int adminId return; } - var usedElsewhere = (int)connection.ExecuteScalar( + var usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM FrameworkCompetencyGroups WHERE CompetencyGroupId = @competencyGroupId AND ID <> @frameworkCompetencyGroupId", @@ -1171,14 +1185,14 @@ public void DeleteFrameworkCompetencyGroup(int frameworkCompetencyGroupId, int c } //Check if used elsewhere and delete competency group if not: - var usedElsewhere = (int)connection.ExecuteScalar( + var usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM FrameworkCompetencyGroups WHERE CompetencyGroupId = @competencyGroupId", new { competencyGroupId } ); if (usedElsewhere == 0) { - usedElsewhere = (int)connection.ExecuteScalar( + usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM SelfAssessmentStructure WHERE CompetencyGroupId = @competencyGroupId", new { competencyGroupId } @@ -1209,7 +1223,7 @@ public void DeleteFrameworkCompetencyGroup(int frameworkCompetencyGroupId, int c public void DeleteFrameworkCompetency(int frameworkCompetencyId, int adminId) { - var competencyId = (int)connection.ExecuteScalar( + var competencyId = connection.QuerySingle( @"SELECT CompetencyID FROM FrameworkCompetencies WHERE ID = @frameworkCompetencyId", new { frameworkCompetencyId } ); @@ -1240,14 +1254,14 @@ public void DeleteFrameworkCompetency(int frameworkCompetencyId, int adminId) } //Check if used elsewhere and delete competency group if not: - var usedElsewhere = (int)connection.ExecuteScalar( + var usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM FrameworkCompetencies WHERE CompetencyID = @competencyId", new { competencyId } ); if (usedElsewhere == 0) { - usedElsewhere = (int)connection.ExecuteScalar( + usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM SelfAssessmentStructure WHERE CompetencyID = @competencyId", new { competencyId } @@ -1834,7 +1848,7 @@ FROM Competencies AS C INNER JOIN public int GetAdminUserRoleForFrameworkId(int adminId, int frameworkId) { - return (int)connection.ExecuteScalar( + return connection.QuerySingle( @"SELECT CASE WHEN FW.OwnerAdminID = @adminId THEN 3 WHEN fwc.CanModify = 1 THEN 2 WHEN fwc.CanModify = 0 THEN 1 ELSE 0 END AS UserRole FROM Frameworks AS FW LEFT OUTER JOIN FrameworkCollaborators AS fwc ON fwc.FrameworkID = FW.ID AND fwc.AdminID = @adminId diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index c4f7035ba9..2f47b79409 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -117,7 +117,7 @@ bool zeroBased //INSERT DATA BrandedFramework CreateFramework(DetailFramework detailFramework, int adminId); - int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId); + int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId = null); int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false); @@ -597,9 +597,9 @@ public int InsertCompetency(string name, string? description, int adminId) return frameworkDataService.InsertCompetency(name, description, adminId); } - public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId) + public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId) { - return frameworkDataService.InsertCompetencyGroup(groupName, groupDescription, adminId); + return frameworkDataService.InsertCompetencyGroup(groupName, groupDescription, adminId, frameworkId); } public int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 9841c5e429..2471f61605 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -132,7 +132,7 @@ CompetencyTableRow competencyRow int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { - int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); + int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId, frameworkId); if (newCompetencyGroupId > 0) { frameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminUserId); From a47d2ca5cfe94a9f9c17b6326cd47a6c66529e04 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 16:57:06 +0000 Subject: [PATCH 050/271] TD-5163 Clears down the uploaded sheet after processing --- .../Controllers/FrameworksController/ImportCompetencies.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 31c34b8e0a..43c91e9347 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -247,6 +247,8 @@ public IActionResult ImportSummarySubmit() public IActionResult UploadResults() { var data = GetBulkUploadData(); + FileHelper.DeleteFile(webHostEnvironment, data.CompetenciesFileName); + TempData.Clear(); var model = new ImportCompetenciesResultsViewModel(data.ImportCompetenciesResult, data.FrameworkId, data.FrameworkName, data.FrameworkVocubulary); return View("Developer/Import/UploadResults", model); } From caa020c91ae536067eb44f103b5ece04d70d4806 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 9 Jan 2025 16:59:26 +0000 Subject: [PATCH 051/271] TD-5163 Commits competency order changes if required --- .../DataServices/FrameworkDataService.cs | 18 ++++--- .../Frameworks/Import/CompetencyTableRow.cs | 1 + .../Services/FrameworkService.cs | 6 +-- .../ImportCompetenciesFromFileService.cs | 54 ++++++++++++++++--- .../Import/ApplyCompetencyOrdering.cshtml | 4 ++ .../Developer/Import/ImportCompleted.cshtml | 2 +- .../Developer/Import/UploadResults.cshtml | 2 +- 7 files changed, 68 insertions(+), 19 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 65541032f3..20dc80033e 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -206,7 +206,7 @@ int adminId ); void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription); - void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); + int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -1025,7 +1025,7 @@ int adminId ); if (usedElsewhere > 0) { - var newCompetencyGroupId = InsertCompetencyGroup(name, description, adminId); + var newCompetencyGroupId = InsertCompetencyGroup(name, description, adminId, null); if (newCompetencyGroupId > 0) { var numberOfAffectedRows = connection.Execute( @@ -1086,13 +1086,14 @@ public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, st } } - public void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) + public int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) { + int totalRowsAffected = 0; string? commaSeparatedSelectedFlagIds = null; if (selectedFlagIds?.Length > 0) { commaSeparatedSelectedFlagIds = String.Join(',', selectedFlagIds); - connection.Execute( + totalRowsAffected += connection.Execute( @$"INSERT INTO CompetencyFlags(CompetencyID, FlagID, Selected) SELECT @competencyId, f.ID, 1 FROM Flags f @@ -1102,11 +1103,12 @@ SELECT FlagID FROM CompetencyFlags )", new { competencyId, selectedFlagIds }); } - connection.Execute( + totalRowsAffected += connection.Execute( @$"UPDATE CompetencyFlags SET Selected = (CASE WHEN FlagID IN ({commaSeparatedSelectedFlagIds ?? "null"}) THEN 1 ELSE 0 END) - WHERE CompetencyID = @competencyId", + WHERE CompetencyID = @competencyId AND Selected <> (CASE WHEN FlagID IN ({commaSeparatedSelectedFlagIds ?? "null"}) THEN 1 ELSE 0 END)", new { competencyId, frameworkId }); + return totalRowsAffected; } public int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) @@ -1127,7 +1129,7 @@ public void UpdateFrameworkCustomFlag(int frameworkId, int id, string flagName, new { frameworkId, id, flagName, flagGroup, flagTagClass }); } - public void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction) + public void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction) // Valid directions are 'UP' and 'DOWN' { connection.Execute( "ReorderFrameworkCompetencyGroup", @@ -1136,7 +1138,7 @@ public void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool si ); } - public void MoveFrameworkCompetency(int frameworkCompetencyId, bool singleStep, string direction) + public void MoveFrameworkCompetency(int frameworkCompetencyId, bool singleStep, string direction) // Valid directions are 'UP' and 'DOWN' { connection.Execute( "ReorderFrameworkCompetency", diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index 16ea0b9e52..740ec961ca 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -38,6 +38,7 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) RowStatus = RowStatus.NotYetProcessed; } public int RowNumber { get; set; } + public int CompetencyOrderNumber { get; set; } public string? AlwaysShowDescriptionRaw { get; set; } public ImportCompetenciesResult.ErrorReason? Error { get; set; } public RowStatus RowStatus { get; set; } diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index 2f47b79409..795e8ba966 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -200,7 +200,7 @@ int adminId ); void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription = false); - void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); + int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -662,9 +662,9 @@ public void UpdateAssessmentQuestion(int id, string question, int assessmentQues frameworkDataService.UpdateAssessmentQuestion(id, question, assessmentQuestionInputTypeId, maxValueDescription, minValueDescription, scoringInstructions, minValue, maxValue, includeComments, adminId, commentsPrompt, commentsHint); } - public void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) + public int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) { - frameworkDataService.UpdateCompetencyFlags(frameworkId, competencyId, selectedFlagIds); + return frameworkDataService.UpdateCompetencyFlags(frameworkId, competencyId, selectedFlagIds); } public BrandedFramework? UpdateFrameworkBranding(int frameworkId, int brandId, int categoryId, int topicId, int adminId) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 2471f61605..7cec219ef9 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -78,7 +78,7 @@ public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook int maxFrameworkCompetencyId = frameworkService.GetMaxFrameworkCompetencyID(); int maxFrameworkCompetencyGroupId = frameworkService.GetMaxFrameworkCompetencyGroupID(); var table = OpenCompetenciesTable(workbook, vocabulary); - return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds); + return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds); } internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) { @@ -95,10 +95,28 @@ internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) } return table; } - internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds) + internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, int reorderCompetenciesOption, int customAssessmentQuestionID, List defaultQuestionIds) { var competenciesRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); - + int rowCount = 0; + string currentGroup = null; + competenciesRows = competenciesRows + .OrderBy(row => row.CompetencyGroup) + .Select(row => + { + if (row.CompetencyGroup != currentGroup) + { + currentGroup = row.CompetencyGroup; + rowCount = 1; + } + else + { + rowCount++; + } + row.CompetencyOrderNumber = rowCount; + return row; + }) + .ToList(); var competencyGroupCount = competenciesRows .Where(row => !string.IsNullOrWhiteSpace(row.CompetencyGroup)) .Select(row => row.CompetencyGroup) @@ -106,7 +124,7 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a .Count(); foreach (var competencyRow in competenciesRows) { - maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); + maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } return new ImportCompetenciesResult(competenciesRows); @@ -117,6 +135,7 @@ private int ProcessCompetencyRow( int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, + int reorderCompetenciesOption, int customAssessmentQuestionID, List defaultQuestionIds, CompetencyTableRow competencyRow @@ -206,8 +225,8 @@ CompetencyTableRow competencyRow flagIds.Add(flagId); } if (flagIds.Count > 0) { - frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); - if (competencyRow.RowStatus == RowStatus.Skipped) + var updated = frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); + if (updated > 0 && competencyRow.RowStatus == RowStatus.Skipped) { competencyRow.RowStatus = RowStatus.CompetencyUpdated; } @@ -231,6 +250,29 @@ CompetencyTableRow competencyRow } } + // Reorder competencies if required: + if (reorderCompetenciesOption == 2) + { + var frameworkCompetencyId = (int)competencyRow.ID; + var frameworkCompetency = frameworkService.GetFrameworkCompetencyById(frameworkCompetencyId); + var placesToMove = Math.Abs(frameworkCompetency.Ordering - competencyRow.CompetencyOrderNumber); + + if (placesToMove > 0) + { + var direction = frameworkCompetency.Ordering > competencyRow.CompetencyOrderNumber ? "UP" : "DOWN"; + + for (int i = 0; i < placesToMove; i++) + { + frameworkService.MoveFrameworkCompetency(frameworkCompetencyId, true, direction); + } + + if (competencyRow.RowStatus == RowStatus.Skipped) + { + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + } + } + } + return maxFrameworkCompetencyGroupId; } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml index 398343f461..6b21e8b765 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml @@ -36,6 +36,10 @@ Apply @Model.FrameworkVocabularySingular.ToLower() sequence changes? +
      + Information: +

      We strongly recommend including all framework competencies in your uploaded sheet if reordering competencies to ensure that the correct sequence is applied.

      +
      Your uploaded file includes changes to the sequence of existing @Model.FrameworkVocabularyPlural.ToLower(). Choose whether to store the changes to @Model.FrameworkVocabularySingular.ToLower() sequence during update.
      diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 93abdd4983..059712b059 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -47,7 +47,7 @@ {
    • - @Model.CompetenciesToReorderCount existing @Model.FrameworkVocabularySingular.ToLower() @(Model.CompetenciesToReorderCount == 1 ? "record" : "records") have changed sequence in your uploaded sheet. You can choose whether to fix them in the new order next. + Some existing @Model.FrameworkVocabularySingular.ToLower() @(Model.CompetenciesToReorderCount == 1 ? "record" : "records") have changed sequence in your uploaded sheet. You can choose whether to fix them in the new order next.
    • }
    • No errors
    • diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index b65e4026f1..3fa9b57408 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -37,7 +37,7 @@
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
    • @Model.CompetenciesUpdatedCount existing @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
    • -
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted but no errors)
    • +
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted or updated but no errors)
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
    From daa956130ca7d445929e0228aba73111b66602f8 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 08:19:01 +0000 Subject: [PATCH 052/271] TD-5163 Reorders competency groups if needed --- .../ImportCompetenciesFromFileService.cs | 75 +++++++++++++------ 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 7cec219ef9..b8b7883f23 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -61,7 +61,7 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List { int originalIndex = existingIds.IndexOf(id); int newIndex = newIds.IndexOf(id); - if(originalIndex == newIndex) + if (originalIndex == newIndex) { competencyRow.RowStatus = RowStatus.CompetencyUpdated; } @@ -101,7 +101,6 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a int rowCount = 0; string currentGroup = null; competenciesRows = competenciesRows - .OrderBy(row => row.CompetencyGroup) .Select(row => { if (row.CompetencyGroup != currentGroup) @@ -126,7 +125,32 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a { maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } + // TO DO: Check for changes to competency group order and apply them if appropriate: + if (reorderCompetenciesOption == 2) + { + var distinctCompetencyGroups = competenciesRows + .Where(row => !string.IsNullOrWhiteSpace(row.CompetencyGroup)) + .Select(row => row.CompetencyGroup) + .Distinct() + .ToList(); + var existingGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).Select(row => new { row.ID, row.Name }) + .Distinct() + .ToList(); + for (int i = 0; i < competencyGroupCount; i++) + { + var placesToMove = Math.Abs(existingGroups.FindIndex(group => group.Name == distinctCompetencyGroups[i])-i); + if (placesToMove > 0) + { + var thisGroup = existingGroups.FirstOrDefault(group => group.Name == distinctCompetencyGroups[i]); + var direction = existingGroups.FindIndex(group => group.Name == distinctCompetencyGroups[i]) > i ? "UP" : "DOWN"; + for (int p = 0; p < placesToMove; p++) + { + frameworkService.MoveFrameworkCompetencyGroup(thisGroup.ID, true, direction); + } + } + } + } return new ImportCompetenciesResult(competenciesRows); } private int ProcessCompetencyRow( @@ -148,7 +172,7 @@ CompetencyTableRow competencyRow int newCompetencyId = 0; int newFrameworkCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID - int ? frameworkCompetencyGroupId = null; + int? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId, frameworkId); @@ -169,10 +193,10 @@ CompetencyTableRow competencyRow if (frameworkCompetency != null) { newCompetencyId = frameworkCompetency.CompetencyID; - if (frameworkCompetency.Name != competencyRow.Competency || frameworkCompetency.Description != competencyRow.CompetencyDescription || frameworkCompetency.AlwaysShowDescription != competencyRow.AlwaysShowDescription ) + if (frameworkCompetency.Name != competencyRow.Competency || frameworkCompetency.Description != competencyRow.CompetencyDescription || frameworkCompetency.AlwaysShowDescription != competencyRow.AlwaysShowDescription) { frameworkService.UpdateFrameworkCompetency((int)competencyRow.ID, competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId, competencyRow.AlwaysShowDescription ?? false); - competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyUpdated: RowStatus.CompetencyUpdated); + competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyUpdated : RowStatus.CompetencyUpdated); } else { @@ -204,7 +228,8 @@ CompetencyTableRow competencyRow { var flags = competencyRow.FlagsCsv.Split(','); var flagIds = new List(); - foreach (var flag in flags) { + foreach (var flag in flags) + { int flagId = 0; var frameworkFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, null); if (frameworkFlags.Any()) @@ -224,7 +249,8 @@ CompetencyTableRow competencyRow } flagIds.Add(flagId); } - if (flagIds.Count > 0) { + if (flagIds.Count > 0) + { var updated = frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); if (updated > 0 && competencyRow.RowStatus == RowStatus.Skipped) { @@ -233,23 +259,6 @@ CompetencyTableRow competencyRow } } - - // Add assessment questions if necessary: - if (defaultQuestionIds.Count > 0 | customAssessmentQuestionID > 0) - { - if (competencyRow.RowStatus == RowStatus.CompetencyInserted | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted || addAssessmentQuestionsOption == 2 && competencyRow.RowStatus == RowStatus.CompetencyUpdated | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated || addAssessmentQuestionsOption == 3) - { - foreach(var id in defaultQuestionIds) - { - frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, id, adminUserId); - } - if(customAssessmentQuestionID > 0) - { - frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, customAssessmentQuestionID, adminUserId); - } - } - } - // Reorder competencies if required: if (reorderCompetenciesOption == 2) { @@ -273,6 +282,24 @@ CompetencyTableRow competencyRow } } + // Add assessment questions if necessary: + if (defaultQuestionIds.Count > 0 | customAssessmentQuestionID > 0) + { + if (competencyRow.RowStatus == RowStatus.CompetencyInserted | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted || addAssessmentQuestionsOption == 2 && competencyRow.RowStatus == RowStatus.CompetencyUpdated | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated || addAssessmentQuestionsOption == 3) + { + foreach (var id in defaultQuestionIds) + { + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, id, adminUserId); + } + if (customAssessmentQuestionID > 0) + { + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, customAssessmentQuestionID, adminUserId); + } + } + } + + + return maxFrameworkCompetencyGroupId; } From 3f3e2b4445d8590ee8382aa93067aa9e93a122b6 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 08:46:33 +0000 Subject: [PATCH 053/271] TD-5163 Fixes navigation and titles --- .../Controllers/FrameworksController/ImportCompetencies.cs | 4 ++++ .../Views/Frameworks/Developer/Import/ImportCompleted.cshtml | 2 +- .../Views/Frameworks/Developer/Import/ImportSummary.cshtml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 43c91e9347..846eeca19a 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -194,6 +194,10 @@ public IActionResult AddAssessmentQuestions(AddAssessmentQuestionsFormData model public IActionResult AddQuestionsToWhichCompetencies() { var data = GetBulkUploadData(); + if (data.DefaultQuestionIDs.Count ==0 && data.CustomAssessmentQuestionID == null) + { + return RedirectToAction("ImportSummary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } var model = new AddQuestionsToWhichCompetenciesViewModel ( data.FrameworkId, diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 059712b059..3a5cd7aa8d 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -28,7 +28,7 @@ }
    -

    @Model.FrameworkVocabularySingular.ToLower() file uploaded

    +

    @Model.FrameworkVocabularySingular file uploaded

    @(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

      diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml index fedee7029a..b14052b460 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -102,7 +102,7 @@

      Once @Model.FrameworkVocabularySingular.ToLower() records are processed, changes cannot be undone.

    - Back + 0 ? "AddQuestionsToWhichCompetencies" : "AddAssessmentQuestions") role="button" class="nhsuk-button nhsuk-button--secondary">Back
    From 65932d9b10dfd9deb44df3c32052814d8cdc8e1b Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 08:47:35 +0000 Subject: [PATCH 054/271] TD-5163 Fixes competency group reordering by reloading the committed order within the iterator --- .../Services/ImportCompetenciesFromFileService.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index b8b7883f23..c29bb1b177 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -133,12 +133,11 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a .Select(row => row.CompetencyGroup) .Distinct() .ToList(); - - var existingGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).Select(row => new { row.ID, row.Name }) - .Distinct() - .ToList(); for (int i = 0; i < competencyGroupCount; i++) { + var existingGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).Select(row => new { row.ID, row.Name }) + .Distinct() + .ToList(); var placesToMove = Math.Abs(existingGroups.FindIndex(group => group.Name == distinctCompetencyGroups[i])-i); if (placesToMove > 0) { From a73f76ab619bbdc8e7b66f1849a913db19df8684 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 09:14:59 +0000 Subject: [PATCH 055/271] Applies BR DLSFW1 to standard insert competency group functionality --- .../Controllers/FrameworksController/Competencies.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs index 328082ec28..0d26aee6a3 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs @@ -71,7 +71,7 @@ public IActionResult AddEditFrameworkCompetencyGroup(int frameworkId, Competency (competencyGroupBase.Description), adminId); return new RedirectResult(Url.Action("ViewFramework", new { tabname = "Structure", frameworkId }) + "#fcgroup-" + frameworkCompetencyGroupId.ToString()); } - var newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyGroupBase.Name, SanitizerHelper.SanitizeHtmlData(competencyGroupBase.Description), adminId); + var newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyGroupBase.Name, SanitizerHelper.SanitizeHtmlData(competencyGroupBase.Description), adminId, frameworkId); if (newCompetencyGroupId > 0) { var newFrameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminId); From 4a65bac22e69bd1153e7a28b6f254edca0e1b89a Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 14:28:00 +0000 Subject: [PATCH 056/271] Adds published framework warning to summary page --- .../Views/Frameworks/Developer/Import/ImportSummary.cshtml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml index b14052b460..ed715f4068 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -31,6 +31,10 @@

    @Model.FrameworkVocabularyPlural import summary

    + @if (Model.PublishStatusID == 3) + { + + }

    Your @Model.FrameworkVocabularySingular.ToLower() sheet is ready to be processed. Please check the details below are correct before proceeding to @process @Model.FrameworkVocabularyPlural.ToLower() in the framework @Model.FrameworkName.

    Upload summary

    From 58356fb7bd2a1995ca5fdda2f3952a5e9b1a4b2d Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 08:48:29 +0000 Subject: [PATCH 057/271] TD-5233 Add a limitations paragraph to the start page --- .../Frameworks/Developer/Import/Index.cshtml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 11fd4f4b48..c22a96d60e 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -40,7 +40,18 @@
    @if (Model.IsNotBlank) { - +
    + Note: +

    + Bulk upload cannot be used to: +

    +
      +
    • Delete competencies or competency groups
    • +
    • Remove assessment questions from existing competencies
    • +
    • Add more than one custom assessment question to uploaded competencies
    • +
    + +

    To bulk add and/or update @Model.FrameworkVocabularyPlural.ToLower() in the framework, @Model.FrameworkName, download an Excel workbook using one of the options below.

    @@ -91,6 +102,12 @@ } else { +
    + Note: +

    + Bulk upload cannot be used to add more than one custom assessment question to uploaded competencies. +

    +

    Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row.

    From 9151e7dcd655c7e1b8f3f8ab52ba285dae2c660e Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 09:12:10 +0000 Subject: [PATCH 058/271] Emphasises cannot --- .../Views/Frameworks/Developer/Import/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index c22a96d60e..1221cb9f4a 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -43,7 +43,7 @@
    Note:

    - Bulk upload cannot be used to: + Bulk upload cannot be used to:

    • Delete competencies or competency groups
    • From 7e3fb52a3e4185669dce79f8200d29cf010b911d Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 09:15:42 +0000 Subject: [PATCH 059/271] Moves single line inset text to view component --- .../Views/Frameworks/Developer/Import/Index.cshtml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 1221cb9f4a..f94adaf54a 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -36,7 +36,7 @@ { } - @* *@ +
      @if (Model.IsNotBlank) { @@ -102,12 +102,7 @@ } else { -
      - Note: -

      - Bulk upload cannot be used to add more than one custom assessment question to uploaded competencies. -

      -
      +

      Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row.

      From 32aeea1507accf416b38c86520015dce8cf9bff9 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 14:56:56 +0000 Subject: [PATCH 060/271] TD-5233 Indicates the number of competencies reordered in the upload results page --- .../Frameworks/Import/CompetencyTableRow.cs | 2 +- .../Import/ImportCompetenciesResult.cs | 6 +++--- .../ImportCompetenciesFromFileService.cs | 20 +++++++++---------- .../ImportCompetenciesResultsViewModel.cs | 2 ++ .../Import/ApplyCompetencyOrdering.cshtml | 6 +++--- .../Developer/Import/UploadResults.cshtml | 1 + 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index 740ec961ca..1dd67ed007 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -9,7 +9,6 @@ public enum RowStatus CompetencyGroupAndCompetencyInserted, CompetencyInserted, CompetencyUpdated, - CompetencyUpdatedAndReordered, CompetencyGroupInserted, CompetencyGroupUpdated, CompetencyGroupAndCompetencyUpdated, @@ -42,6 +41,7 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) public string? AlwaysShowDescriptionRaw { get; set; } public ImportCompetenciesResult.ErrorReason? Error { get; set; } public RowStatus RowStatus { get; set; } + public bool Reordered { get; set; } = false; public bool Validate() { if (string.IsNullOrEmpty(Competency)) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs index 15f5136274..5ca4536119 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs @@ -22,10 +22,10 @@ IReadOnlyCollection competencyTableRows { ProcessedCount = competencyTableRows.Count; CompetencyAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); - CompetencyUpdatedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdated | dr.RowStatus == RowStatus.CompetencyUpdatedAndReordered); - CompetencyReorderedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdatedAndReordered); + CompetencyUpdatedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdated | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated); GroupAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyGroupInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); - SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped); + SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped && dr.Reordered == false); + CompetencyReorderedCount = competencyTableRows.Count(dr => dr.Reordered == true); Errors = competencyTableRows.Where(dr => dr.Error.HasValue).Select(dr => (dr.RowNumber, dr.Error!.Value)); FlagCount = competencyTableRows .Where(row => !string.IsNullOrWhiteSpace(row.FlagsCsv)) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index c29bb1b177..9b2f32c1c9 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -61,13 +61,10 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List { int originalIndex = existingIds.IndexOf(id); int newIndex = newIds.IndexOf(id); - if (originalIndex == newIndex) + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + if (originalIndex != newIndex) { - competencyRow.RowStatus = RowStatus.CompetencyUpdated; - } - else - { - competencyRow.RowStatus = RowStatus.CompetencyUpdatedAndReordered; + competencyRow.Reordered = true; } } } @@ -125,7 +122,7 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a { maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } - // TO DO: Check for changes to competency group order and apply them if appropriate: + // Check for changes to competency group order and apply them if appropriate: if (reorderCompetenciesOption == 2) { var distinctCompetencyGroups = competenciesRows @@ -146,6 +143,10 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a for (int p = 0; p < placesToMove; p++) { frameworkService.MoveFrameworkCompetencyGroup(thisGroup.ID, true, direction); + competenciesRows + .Where(row => row.CompetencyGroup == thisGroup.Name) + .ToList() + .ForEach(row => row.Reordered = true); } } } @@ -274,10 +275,7 @@ CompetencyTableRow competencyRow frameworkService.MoveFrameworkCompetency(frameworkCompetencyId, true, direction); } - if (competencyRow.RowStatus == RowStatus.Skipped) - { - competencyRow.RowStatus = RowStatus.CompetencyUpdated; - } + competencyRow.Reordered = true; } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs index 48204ae0d1..6bc814b2a2 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs @@ -14,6 +14,7 @@ public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompete CompetenciesUpdatedCount = importCompetenciesResult.CompetencyUpdatedCount; CompetencyGroupsInsertedCount = importCompetenciesResult.GroupAddedCount; CompetencyGroupsUpdatedCount = importCompetenciesResult.GroupUpdatedCount; + CompetenciesReorderedCount = importCompetenciesResult.CompetencyReorderedCount; SkippedCount = importCompetenciesResult.SkippedCount; Errors = importCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason))); FrameworkID = frameworkId; @@ -26,6 +27,7 @@ public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompete public int ProcessedCount { get; set; } public int CompetenciesInsertedCount { get; set; } public int CompetenciesUpdatedCount { get; set; } + public int CompetenciesReorderedCount { get; set; } public int CompetencyGroupsInsertedCount { get; set; } public int CompetencyGroupsUpdatedCount { get; set; } public int SkippedCount { get; set; } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml index 6b21e8b765..b0f7fe5845 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml @@ -41,7 +41,7 @@

      We strongly recommend including all framework competencies in your uploaded sheet if reordering competencies to ensure that the correct sequence is applied.

      - Your uploaded file includes changes to the sequence of existing @Model.FrameworkVocabularyPlural.ToLower(). Choose whether to store the changes to @Model.FrameworkVocabularySingular.ToLower() sequence during update. + Your uploaded file includes changes to the order of existing @Model.FrameworkVocabularyPlural.ToLower(). Choose whether to store the changes to @Model.FrameworkVocabularySingular.ToLower() order during update.
      Select an option @@ -51,7 +51,7 @@
      @Model.FrameworkVocabularyPlural will be updated if they have changed but there sequence/order in the framework will not change. @@ -60,7 +60,7 @@
      The sequence of @Model.FrameworkVocabularyPlural.ToLower() in the framework will be changed to reflect the order in the sheet during processing. diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index 3fa9b57408..87278f516d 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -37,6 +37,7 @@
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
    • @Model.CompetenciesUpdatedCount existing @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
    • +
    • @Model.CompetenciesReorderedCount existing @(Model.CompetenciesReorderedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) reordered
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted or updated but no errors)
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
    From 59a91c3b3e35ff0028ebeb2fd5437352cb116bca Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 14:58:48 +0000 Subject: [PATCH 061/271] Update ApplyCompetencyOrdering.cshtml --- .../Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml index b0f7fe5845..456961288e 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml @@ -63,7 +63,7 @@ Apply changes to @Model.FrameworkVocabularySingular.ToLower() order
    - The sequence of @Model.FrameworkVocabularyPlural.ToLower() in the framework will be changed to reflect the order in the sheet during processing. + The oder of @Model.FrameworkVocabularyPlural.ToLower() in the framework will be changed to reflect the order in the sheet during processing.
    From 1ae3863f2012c48a97728b36ea91fce88925c4a5 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 15:13:11 +0000 Subject: [PATCH 062/271] TD-5233 added flags to the list of things that can't be removed and used framework vocab in list --- .../Views/Frameworks/Developer/Import/Index.cshtml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index f94adaf54a..7a31d64dca 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -46,9 +46,10 @@ Bulk upload cannot be used to:

      -
    • Delete competencies or competency groups
    • -
    • Remove assessment questions from existing competencies
    • -
    • Add more than one custom assessment question to uploaded competencies
    • +
    • Delete @Model.FrameworkVocabularyPlural.ToLower() or @Model.FrameworkVocabularySingular.ToLower() groups
    • +
    • Remove assessment questions from existing @Model.FrameworkVocabularyPlural.ToLower()
    • +
    • Add more than one custom assessment question to uploaded @Model.FrameworkVocabularyPlural.ToLower()
    • +
    • Remove flags from @Model.FrameworkVocabularyPlural.ToLower()
    @@ -102,7 +103,7 @@ } else { - +

    Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row.

    From bf2b2afde08b709ef24614f1406b92599dba661d Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 17:06:22 +0000 Subject: [PATCH 063/271] Formatting changes --- .../Services/ImportCompetenciesFromFileService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 9b2f32c1c9..02b8affac1 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -143,11 +143,11 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a for (int p = 0; p < placesToMove; p++) { frameworkService.MoveFrameworkCompetencyGroup(thisGroup.ID, true, direction); - competenciesRows + } + competenciesRows .Where(row => row.CompetencyGroup == thisGroup.Name) .ToList() .ForEach(row => row.Reordered = true); - } } } } From 54f6fbef6ecb99d6f846f83d1c2d7279c7450782 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 20 Jan 2025 17:19:38 +0000 Subject: [PATCH 064/271] Sets up controller, view and navigation for print layout --- .../FrameworksController/Frameworks.cs | 11 +++++++ .../Developer/FrameworkPrintLayout.cshtml | 31 +++++++++++++++++++ .../Frameworks/Developer/_Structure.cshtml | 1 + 3 files changed, 43 insertions(+) create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs index bdaa3d4e20..a66d5c46b0 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs @@ -716,6 +716,17 @@ public IActionResult ViewFramework(string tabname, int frameworkId, int? framewo return View("Developer/Framework", model); } + [Route("/Framework/{frameworkId}/Structure/PrintLayout")] + public IActionResult PrintLayout(int frameworkId) { + var adminId = GetAdminId(); + var detailFramework = frameworkService.GetFrameworkDetailByFrameworkId(frameworkId, adminId); + var routeData = new Dictionary { { "frameworkId", detailFramework?.ID.ToString() } }; + var model = new FrameworkViewModel() + { + DetailFramework = detailFramework, + }; + return View("Developer/FrameworkPrintLayout", model); + } [ResponseCache(CacheProfileName = "Never")] public IActionResult InsertFramework() { diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml new file mode 100644 index 0000000000..5d94c62025 --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml @@ -0,0 +1,31 @@ +@using DigitalLearningSolutions.Web.ViewModels.Frameworks; +@model FrameworkViewModel; +@{ + ViewData["Title"] = Model.DetailFramework.FrameworkName; + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; +} + +@section NavMenuItems { + +} +@section NavBreadcrumbs { + +} +
    + +
    +

    + @Model.DetailFramework.FrameworkName +

    +
    +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml index 849b5121ba..f6d566ad64 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml @@ -82,6 +82,7 @@ else Add @Model.VocabSingular().ToLower() group Add ungrouped @Model.VocabSingular().ToLower() Bulk upload/update @Model.VocabPlural().ToLower() + View for print
    } From 6ecf6396a708f6d7dd2c9e2ffe4b8f081ebc4cef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 18:20:08 +0000 Subject: [PATCH 065/271] Bump coverlet.collector from 6.0.0 to 6.0.4 (#3068) Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 6.0.0 to 6.0.4. - [Release notes](https://github.com/coverlet-coverage/coverlet/releases) - [Commits](https://github.com/coverlet-coverage/coverlet/compare/v6.0.0...v6.0.4) --- updated-dependencies: - dependency-name: coverlet.collector dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../DigitalLearningSolutions.Web.AutomatedUiTests.csproj | 2 +- .../DigitalLearningSolutions.Web.IntegrationTests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DigitalLearningSolutions.Web.AutomatedUiTests/DigitalLearningSolutions.Web.AutomatedUiTests.csproj b/DigitalLearningSolutions.Web.AutomatedUiTests/DigitalLearningSolutions.Web.AutomatedUiTests.csproj index 93355c7556..cfe53c6e62 100644 --- a/DigitalLearningSolutions.Web.AutomatedUiTests/DigitalLearningSolutions.Web.AutomatedUiTests.csproj +++ b/DigitalLearningSolutions.Web.AutomatedUiTests/DigitalLearningSolutions.Web.AutomatedUiTests.csproj @@ -19,7 +19,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/DigitalLearningSolutions.Web.IntegrationTests/DigitalLearningSolutions.Web.IntegrationTests.csproj b/DigitalLearningSolutions.Web.IntegrationTests/DigitalLearningSolutions.Web.IntegrationTests.csproj index 3551449b40..fa0060eb19 100644 --- a/DigitalLearningSolutions.Web.IntegrationTests/DigitalLearningSolutions.Web.IntegrationTests.csproj +++ b/DigitalLearningSolutions.Web.IntegrationTests/DigitalLearningSolutions.Web.IntegrationTests.csproj @@ -15,7 +15,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all From 968c78b4d81bc5f2c1b219a7d986cf39ded7dd16 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 21 Jan 2025 16:48:11 +0000 Subject: [PATCH 066/271] TD-5263 Implements "view for print" option for frameworks --- .../FrameworksController/Frameworks.cs | 3 + .../Styles/frameworks/frameworksShared.scss | 34 ++++++ .../Styles/layout.scss | 6 ++ .../Developer/FrameworkPrintLayout.cshtml | 100 +++++++++++++++++- .../Frameworks/Developer/_Structure.cshtml | 2 +- .../Views/Shared/_CookieConsentPartial.cshtml | 4 +- .../Views/Shared/_Layout.cshtml | 2 +- .../Shared/_UserFeedbackBarPartial.cshtml | 4 +- 8 files changed, 147 insertions(+), 8 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs index a66d5c46b0..ffb9460299 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs @@ -725,6 +725,9 @@ public IActionResult PrintLayout(int frameworkId) { { DetailFramework = detailFramework, }; + model.FrameworkCompetencyGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).ToList(); + model.CompetencyFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, selected: true); + model.FrameworkCompetencies = frameworkService.GetFrameworkCompetenciesUngrouped(frameworkId); return View("Developer/FrameworkPrintLayout", model); } [ResponseCache(CacheProfileName = "Never")] diff --git a/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss b/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss index a6cd8f8277..b452ab9178 100644 --- a/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss +++ b/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss @@ -251,3 +251,37 @@ h1.truncate-overflow::after { .float-right{ float:right; } +@media print { + + address, p, .nhsuk-body-m, ol, ul, td, .nhsuk-tag { + font-size: 12px !important; + } + + h1 { + font-size: 20px !important; + break-after: avoid; + } + + h2 { + font-size: 18px !important; + break-after: avoid; + } + + h3, table { + break-after: avoid; + break-before: auto; + } + + h3 { + font-size: 16px !important; + } + + h4, th { + font-size: 14px !important; + } + + tr { + break-inside: avoid; + page-break-inside: avoid; + } +} diff --git a/DigitalLearningSolutions.Web/Styles/layout.scss b/DigitalLearningSolutions.Web/Styles/layout.scss index 7e252f49ed..c0ef2ada6a 100644 --- a/DigitalLearningSolutions.Web/Styles/layout.scss +++ b/DigitalLearningSolutions.Web/Styles/layout.scss @@ -398,3 +398,9 @@ nav, .nhsuk-header__navigation, #header-navigation { .field-validation-valid { display: none !important; } + +@media print { + .no-print { + display: none; + } +} diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml index 5d94c62025..69ec377b44 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml @@ -4,6 +4,7 @@ ViewData["Title"] = Model.DetailFramework.FrameworkName; ViewData["Application"] = "Framework Service"; ViewData["HeaderPathName"] = "Framework Service"; + int groupNum = 0; } @section NavMenuItems { @@ -14,7 +15,7 @@
    1. Frameworks
    2. -
    3. Framework @ViewContext.RouteData.Values["tabname"]
    4. +
    5. Framework structure
    6. Print layout

    Back to Framework

    @@ -27,5 +28,100 @@

    @Model.DetailFramework.FrameworkName

    -
    + @if (!String.IsNullOrEmpty(Model.DetailFramework.Description)) + { +
    +
    +

    + Framework description + +

    +

    + @(Html.Raw(Model.DetailFramework.Description)) +

    +
    +
    + } +

    Framework @Model.VocabPlural().ToLower()

    + + @if (Model.FrameworkCompetencyGroups != null) + { + if (Model.FrameworkCompetencyGroups.Any()) + { + @foreach (var frameworkCompetencyGroup in Model.FrameworkCompetencyGroups) + { + groupNum++; +

    @frameworkCompetencyGroup.Name

    + if (frameworkCompetencyGroup.Description != null) + { +

    + @frameworkCompetencyGroup.Description +

    + } + + int compNum = 0; + if (frameworkCompetencyGroup.FrameworkCompetencies[0] != null) + { + + + + + + + + + @foreach (var frameworkCompetency in frameworkCompetencyGroup.FrameworkCompetencies) + { + compNum++; + + + + + } + +
    + @Model.VocabSingular() + + Date and Signature +
    + @frameworkCompetency.Name + + + @if (frameworkCompetency.Description != null) + { +

    + @Html.Raw(frameworkCompetency.Description) +

    + } +
    + +
    + } + } + } + } + @if (Model.FrameworkCompetencies != null) + { + if (Model.FrameworkCompetencies.Any()) + { + groupNum++; + int compNum = 0; +

    Ungrouped competencies

    + foreach (var frameworkCompetency in Model.FrameworkCompetencies) + { + compNum++; +
    +

    @frameworkCompetency.Name

    + + @if (frameworkCompetency.Description != null) + { +

    + @frameworkCompetency.Description +

    + } +
    + } + } + } +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml index f6d566ad64..ca13087c27 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml @@ -82,7 +82,7 @@ else Add @Model.VocabSingular().ToLower() group Add ungrouped @Model.VocabSingular().ToLower() Bulk upload/update @Model.VocabPlural().ToLower() - View for print + View for print
    } diff --git a/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml b/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml index 9500f932e9..bffbbc36f8 100644 --- a/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml +++ b/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml @@ -9,7 +9,7 @@ @if (showCookieBanner == null && validateCookieBannerViaTempData == null) // [BY] Show cookie banner when the value is null. if the user consent yes or no then we dont display the banner { -

    Additional processing steps

    - @if(Model.CompetenciesToReorderCount > 0) + @if (Model.CompetenciesToReorderCount > 0) {
    From a7c338fc8a54567f9dc5b7aaa0b43a4942e9b35f Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 7 Jan 2025 16:35:53 +0000 Subject: [PATCH 104/271] TD-5163 Process imported competencies --- .../DataServices/FrameworkDataService.cs | 26 +++-- .../Models/Frameworks/FrameworkCompetency.cs | 1 + .../ImportCompetencies.cs | 14 +++ .../Models/BulkCompetenciesData.cs | 2 + .../Services/FrameworkService.cs | 22 ++-- .../ImportCompetenciesFromFileService.cs | 106 +++++++++++++++--- 6 files changed, 132 insertions(+), 39 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index e2728b29d7..da00fb2bf2 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -131,10 +131,10 @@ bool zeroBased int InsertCompetency(string name, string? description, int adminId); - int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId); + int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false); int AddCollaboratorToFramework(int frameworkId, string userEmail, bool canModify); - void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); + int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); void UpdateFrameworkCustomFlag(int frameworkId, int id, string flagName, string flagGroup, string flagTagClass); void AddFrameworkDefaultQuestion(int frameworkId, int assessmentQuestionId, int adminId, bool addToExisting); @@ -205,7 +205,7 @@ void UpdateFrameworkCompetencyGroup( int adminId ); - void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId); + void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription); void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -656,7 +656,8 @@ public int InsertFrameworkCompetency( int competencyId, int? frameworkCompetencyGroupID, int adminId, - int frameworkId + int frameworkId, + bool alwaysShowDescription = false ) { if ((competencyId < 1) | (adminId < 1) | (frameworkId < 1)) @@ -978,7 +979,7 @@ FROM FrameworkCompetencyGroups AS fcg public FrameworkCompetency? GetFrameworkCompetencyById(int Id) { return connection.QueryFirstOrDefault( - @"SELECT fc.ID, c.ID AS CompetencyID, c.Name, c.Description, fc.Ordering + @"SELECT fc.ID, c.ID AS CompetencyID, c.Name, c.Description, fc.Ordering, c.AlwaysShowDescription FROM FrameworkCompetencies AS fc INNER JOIN Competencies AS c ON fc.CompetencyID = c.ID WHERE fc.ID = @Id", @@ -1045,7 +1046,7 @@ int adminId } } - public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId) + public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription) { if ((frameworkCompetencyId < 1) | (adminId < 1) | (name.Length < 3)) { @@ -1057,10 +1058,10 @@ public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, st //DO WE NEED SOMETHING IN HERE TO CHECK WHETHER IT IS USED ELSEWHERE AND WARN THE USER? var numberOfAffectedRows = connection.Execute( - @"UPDATE Competencies SET Name = @name, Description = @description, UpdatedByAdminID = @adminId + @"UPDATE Competencies SET Name = @name, Description = @description, UpdatedByAdminID = @adminId, AlwaysShowDescription = CASE WHEN @alwaysShowDescription IS NULL THEN AlwaysShowDescription ELSE @alwaysShowDescription END FROM Competencies INNER JOIN FrameworkCompetencies AS fc ON Competencies.ID = fc.CompetencyID WHERE (fc.Id = @frameworkCompetencyId)", - new { name, description, adminId, frameworkCompetencyId } + new { name, description, adminId, frameworkCompetencyId, alwaysShowDescription} ); if (numberOfAffectedRows < 1) { @@ -1094,11 +1095,12 @@ SELECT FlagID FROM CompetencyFlags new { competencyId, frameworkId }); } - public void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) + public int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) { - connection.Execute( - @$"INSERT INTO Flags(FrameworkID, FlagName, FlagGroup, FlagTagClass) - VALUES(@frameworkId, @flagName, @flagGroup, @flagTagClass)", + return connection.QuerySingle( + @"INSERT INTO Flags(FrameworkID, FlagName, FlagGroup, FlagTagClass) + OUTPUT INSERTED.ID + VALUES(@frameworkId, @flagName, @flagGroup, @flagTagClass);", new { frameworkId, flagName, flagGroup, flagTagClass }); } diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs b/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs index 56bd78ddc1..a42d3d10fe 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs @@ -14,6 +14,7 @@ public class FrameworkCompetency : BaseSearchableItem public int AssessmentQuestions { get; set; } public int CompetencyLearningResourcesCount { get; set; } public string? FrameworkName { get; set; } + public bool? AlwaysShowDescription { get; set; } public override string SearchableName { diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 08ff1eb0ff..735db4a3e5 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -224,6 +224,20 @@ public IActionResult ImportSummary() var model = new ImportSummaryViewModel(data); return View("Developer/Import/ImportSummary", model); } + [HttpPost] + [Route("/Framework/{frameworkId}/{tabname}/Import/Summary")] + public IActionResult ImportSummarySubmit() + { + var data = GetBulkUploadData(); + var adminId = GetAdminId(); + var uploadDir = Path.Combine(webHostEnvironment.WebRootPath, "Uploads\\"); + var filePath = Path.Combine(uploadDir, data.CompetenciesFileName); + var workbook = new XLWorkbook(filePath); + var results = importCompetenciesFromFileService.ProcessCompetenciesFromFile(workbook, adminId, data.FrameworkId, data.FrameworkVocubulary, data.ReorderCompetenciesOption, data.AddAssessmentQuestionsOption, data.AddCustomAssessmentQuestion ? (int)data.CustomAssessmentQuestionID : 0, data.AddDefaultAssessmentQuestions ? data.DefaultQuestionIDs : []); + data.ImportCompetenciesResult = results; + setBulkUploadData(data); + return RedirectToAction("UploadResults", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } [Route("CancelImport")] public IActionResult CancelImport() { diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 2d3ce9e4ac..344c674a89 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -1,4 +1,5 @@ using DigitalLearningSolutions.Data.Models.Frameworks; +using DigitalLearningSolutions.Data.Models.Frameworks.Import; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -42,5 +43,6 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public int SubtotalCompetenciesUpdated { get; set; } public int SubTotalSkipped { get; set; } public IEnumerable<(int RowNumber, string ErrorMessage)> Errors { get; set; } = Enumerable.Empty<(int, string)>(); + public ImportCompetenciesResult ImportCompetenciesResult { get;set;} } } diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index c586fa071b..c4f7035ba9 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -119,16 +119,16 @@ bool zeroBased int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId); - int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId); + int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false); IEnumerable GetAllCompetenciesForAdminId(string name, int adminId); int InsertCompetency(string name, string? description, int adminId); - int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId); + int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId); int AddCollaboratorToFramework(int frameworkId, string userEmail, bool canModify); - void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); + int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); void UpdateFrameworkCustomFlag(int frameworkId, int id, string flagName, string flagGroup, string flagTagClass); void AddFrameworkDefaultQuestion(int frameworkId, int assessmentQuestionId, int adminId, bool addToExisting); @@ -199,7 +199,7 @@ void UpdateFrameworkCompetencyGroup( int adminId ); - void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId); + void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription = false); void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -277,9 +277,9 @@ public void AddCompetencyAssessmentQuestion(int frameworkCompetencyId, int asses frameworkDataService.AddCompetencyAssessmentQuestion(frameworkCompetencyId, assessmentQuestionId, adminId); } - public void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) + public int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) { - frameworkDataService.AddCustomFlagToFramework(frameworkId, flagName, flagGroup, flagTagClass); + return frameworkDataService.AddCustomFlagToFramework(frameworkId, flagName, flagGroup, flagTagClass); } public void AddFrameworkDefaultQuestion(int frameworkId, int assessmentQuestionId, int adminId, bool addToExisting) @@ -602,9 +602,9 @@ public int InsertCompetencyGroup(string groupName, string? groupDescription, int return frameworkDataService.InsertCompetencyGroup(groupName, groupDescription, adminId); } - public int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId) + public int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false) { - return frameworkDataService.InsertFrameworkCompetency(competencyId, frameworkCompetencyGroupID, adminId, frameworkId); + return frameworkDataService.InsertFrameworkCompetency(competencyId, frameworkCompetencyGroupID, adminId, frameworkId, alwaysShowDescription); } public int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId) @@ -672,9 +672,9 @@ public void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selec return frameworkDataService.UpdateFrameworkBranding(frameworkId, brandId, categoryId, topicId, adminId); } - public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId) - { - frameworkDataService.UpdateFrameworkCompetency(frameworkCompetencyId, name, description, adminId); + public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription) + { + frameworkDataService.UpdateFrameworkCompetency(frameworkCompetencyId, name, description, adminId, alwaysShowDescription); } public void UpdateFrameworkCompetencyGroup(int frameworkCompetencyGroupId, int competencyGroupId, string name, string? description, int adminId) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index a26793b651..2367bcbefd 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -12,12 +12,13 @@ namespace DigitalLearningSolutions.Web.Services using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Data.Helpers; using DigitalLearningSolutions.Data.Models.Frameworks.Import; + using DocumentFormat.OpenXml.Office2010.Excel; public interface IImportCompetenciesFromFileService { byte[] GetCompetencyFileForFramework(int frameworkId, bool isBlank, string vocabulary); public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary, int frameworkId); - public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary); + public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary, int reorderCompetenciesOption, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds); } public class ImportCompetenciesFromFileService : IImportCompetenciesFromFileService { @@ -71,12 +72,12 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List } competencyRow.Validate(); } - public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary) + public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary, int reorderCompetenciesOption, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds) { int maxFrameworkCompetencyId = frameworkService.GetMaxFrameworkCompetencyID(); int maxFrameworkCompetencyGroupId = frameworkService.GetMaxFrameworkCompetencyGroupID(); var table = OpenCompetenciesTable(workbook, vocabulary); - return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId); + return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds); } internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) { @@ -93,7 +94,7 @@ internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) } return table; } - internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId) + internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds) { var competenciesRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); @@ -104,7 +105,7 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a .Count(); foreach (var competencyRow in competenciesRows) { - maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, competencyRow); + maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } return new ImportCompetenciesResult(competenciesRows); @@ -114,6 +115,9 @@ private int ProcessCompetencyRow( int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, + int addAssessmentQuestionsOption, + int customAssessmentQuestionID, + List defaultQuestionIds, CompetencyTableRow competencyRow ) { @@ -121,11 +125,13 @@ CompetencyTableRow competencyRow { return maxFrameworkCompetencyGroupId; } + int newCompetencyGroupId = 0; + int newCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID - int? frameworkCompetencyGroupId = null; + int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { - var newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, null, adminUserId); + newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); if (newCompetencyGroupId > 0) { frameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminUserId); @@ -136,21 +142,89 @@ CompetencyTableRow competencyRow } } } - - //Check if competency already exists in framework competency group and add if not - var newCompetencyId = frameworkService.InsertCompetency(competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId); - if (newCompetencyId > 0) + // If FrameworkCompetency ID is supplied, update the competency + if (competencyRow.ID != null) { - var newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId); - if (newFrameworkCompetencyId > maxFrameworkCompetencyId) + var frameworkCompetency = frameworkService.GetFrameworkCompetencyById((int)competencyRow.ID); + if (frameworkCompetency != null) { - competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyInserted : RowStatus.CompetencyInserted); + newCompetencyId = frameworkCompetency.CompetencyID; + if (frameworkCompetency.Name != competencyRow.Competency || frameworkCompetency.Description != competencyRow.CompetencyDescription || frameworkCompetency.AlwaysShowDescription != competencyRow.AlwaysShowDescription ) + { + frameworkService.UpdateFrameworkCompetency((int)competencyRow.ID, competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId, competencyRow.AlwaysShowDescription ?? false); + competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyUpdated: RowStatus.CompetencyUpdated); + } + else + { + competencyRow.RowStatus = RowStatus.Skipped; + } } - else + } + else + { + //Check if competency already exists in framework competency group and add if not + newCompetencyId = frameworkService.InsertCompetency(competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId); + if (newCompetencyId > 0) + { + var newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId, competencyRow.AlwaysShowDescription ?? false); //including always show desc flag + if (newFrameworkCompetencyId > maxFrameworkCompetencyId) + { + competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyInserted : RowStatus.CompetencyInserted); + } + else + { + competencyRow.RowStatus = RowStatus.Skipped; + } + } + } + + + // If flags are supplied, add them: + if (competencyRow.FlagsCsv != null) + { + var flags = competencyRow.FlagsCsv.Split(','); + int[] flagIds = []; + foreach (var flag in flags) { + int flagId = 0; + var frameworkFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, null); + if (frameworkFlags.Any()) + { + foreach (var frameworkFlag in frameworkFlags) + { + if (frameworkFlag.FlagName == flag) + { + flagId = frameworkFlag.FlagId; + } + } + } + if (flagId == 0) + { + flagId = frameworkService.AddCustomFlagToFramework(frameworkId, flag, "Flag", "nhsuk-tag--white"); + } + flagIds.Append(flagId); + } + if (flagIds.Any()) { + frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, flagIds); + } + } + + + // Add assessment questions if necessary: + if (defaultQuestionIds.Count > 0 | customAssessmentQuestionID > 0) + { + if (competencyRow.RowStatus == RowStatus.CompetencyInserted | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted || addAssessmentQuestionsOption == 2 && competencyRow.RowStatus == RowStatus.CompetencyUpdated | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated || addAssessmentQuestionsOption == 3) { - competencyRow.RowStatus = RowStatus.Skipped; + foreach(var id in defaultQuestionIds) + { + frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, id, adminUserId); + } + if(customAssessmentQuestionID > 0) + { + frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, customAssessmentQuestionID, adminUserId); + } } } + return maxFrameworkCompetencyGroupId; } From 810fd8e0bdbf081a537ff818131d41a2dc5e590b Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 7 Jan 2025 17:27:55 +0000 Subject: [PATCH 105/271] TD-5163 Implements the upload results view --- .../DataServices/FrameworkDataService.cs | 8 +++++++- .../FrameworksController/ImportCompetencies.cs | 12 ++++++++++++ .../Services/ImportCompetenciesFromFileService.cs | 7 ++++--- .../Import/ImportCompetenciesResultsViewModel.cs | 15 ++++++++++++++- .../Developer/Import/ImportSummary.cshtml | 2 +- .../Developer/Import/UploadResults.cshtml | 7 ++++--- 6 files changed, 42 insertions(+), 9 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index da00fb2bf2..17b6cd16ef 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -1516,7 +1516,13 @@ public void AddCompetencyAssessmentQuestion(int frameworkCompetencyId, int asses FROM [CompetencyAssessmentQuestions] WHERE ([CompetencyId] = fc.CompetencyID)), 0)+1 FROM FrameworkCompetencies AS fc - WHERE Id = @frameworkCompetencyId", + WHERE Id = @frameworkCompetencyId + AND NOT EXISTS ( + SELECT 1 + FROM CompetencyAssessmentQuestions AS caq + WHERE caq.CompetencyId = fc.CompetencyID + AND caq.AssessmentQuestionID = @assessmentQuestionId + );", new { frameworkCompetencyId, assessmentQuestionId } ); if (numberOfAffectedRows < 1) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 735db4a3e5..31c34b8e0a 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -235,9 +235,21 @@ public IActionResult ImportSummarySubmit() var workbook = new XLWorkbook(filePath); var results = importCompetenciesFromFileService.ProcessCompetenciesFromFile(workbook, adminId, data.FrameworkId, data.FrameworkVocubulary, data.ReorderCompetenciesOption, data.AddAssessmentQuestionsOption, data.AddCustomAssessmentQuestion ? (int)data.CustomAssessmentQuestionID : 0, data.AddDefaultAssessmentQuestions ? data.DefaultQuestionIDs : []); data.ImportCompetenciesResult = results; + //TO DO apply ordering changes if required: + if (data.ReorderCompetenciesOption == 2 && data.CompetenciesToReorderCount > 0) + { + + } setBulkUploadData(data); return RedirectToAction("UploadResults", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); } + [Route("/Framework/{frameworkId}/{tabname}/Import/Results")] + public IActionResult UploadResults() + { + var data = GetBulkUploadData(); + var model = new ImportCompetenciesResultsViewModel(data.ImportCompetenciesResult, data.FrameworkId, data.FrameworkName, data.FrameworkVocubulary); + return View("Developer/Import/UploadResults", model); + } [Route("CancelImport")] public IActionResult CancelImport() { diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 2367bcbefd..a235f0a991 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -127,6 +127,7 @@ CompetencyTableRow competencyRow } int newCompetencyGroupId = 0; int newCompetencyId = 0; + int newFrameworkCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) @@ -166,7 +167,7 @@ CompetencyTableRow competencyRow newCompetencyId = frameworkService.InsertCompetency(competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId); if (newCompetencyId > 0) { - var newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId, competencyRow.AlwaysShowDescription ?? false); //including always show desc flag + newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId, competencyRow.AlwaysShowDescription ?? false); //including always show desc flag if (newFrameworkCompetencyId > maxFrameworkCompetencyId) { competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyInserted : RowStatus.CompetencyInserted); @@ -216,11 +217,11 @@ CompetencyTableRow competencyRow { foreach(var id in defaultQuestionIds) { - frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, id, adminUserId); + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, id, adminUserId); } if(customAssessmentQuestionID > 0) { - frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, customAssessmentQuestionID, adminUserId); + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, customAssessmentQuestionID, adminUserId); } } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs index b47108fe15..48204ae0d1 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs @@ -1,25 +1,38 @@ namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { using DigitalLearningSolutions.Data.Models.Frameworks.Import; + using DigitalLearningSolutions.Web.Helpers; using System.Collections.Generic; using System.Linq; public class ImportCompetenciesResultsViewModel { - public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompetenciesResult) + public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompetenciesResult, int frameworkId, string frameworkName, string frameworkVocabulary) { ProcessedCount = importCompetenciesResult.ProcessedCount; CompetenciesInsertedCount = importCompetenciesResult.CompetencyAddedCount; + CompetenciesUpdatedCount = importCompetenciesResult.CompetencyUpdatedCount; CompetencyGroupsInsertedCount = importCompetenciesResult.GroupAddedCount; + CompetencyGroupsUpdatedCount = importCompetenciesResult.GroupUpdatedCount; SkippedCount = importCompetenciesResult.SkippedCount; Errors = importCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason))); + FrameworkID = frameworkId; + FrameworkName = frameworkName; + FrameworkVocabularySingular = FrameworkVocabularyHelper.VocabularySingular(frameworkVocabulary); + FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(frameworkVocabulary); } public IEnumerable<(int RowNumber, string ErrorMessage)> Errors { get; set; } public int ErrorCount => Errors.Count(); public int ProcessedCount { get; set; } public int CompetenciesInsertedCount { get; set; } + public int CompetenciesUpdatedCount { get; set; } public int CompetencyGroupsInsertedCount { get; set; } + public int CompetencyGroupsUpdatedCount { get; set; } public int SkippedCount { get; set; } + public int FrameworkID { get; set; } + public string FrameworkName { get; set; } + public string FrameworkVocabularySingular { get; set; } + public string FrameworkVocabularyPlural { get; set; } private string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReason reason) { return reason switch diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml index 5a782d911f..fedee7029a 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -101,7 +101,7 @@ Important:

    Once @Model.FrameworkVocabularySingular.ToLower() records are processed, changes cannot be undone.

    -
    + Back
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index d83d3ca428..efb819495d 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -34,9 +34,10 @@

    Summary of results:

    • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
    • -
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? "competency group" : "competency groups") inserted
    • -
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? "competency" : "competencies") inserted
    • -
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "record" : "records") skipped (nothing inserted but no errors)
    • +
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
    • +
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
    • +
    • @Model.CompetenciesUpdatedCount new @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
    • +
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted but no errors)
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
    From 4feeabe8d92884f42799c34e2d2fe3268b747f46 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 09:08:17 +0000 Subject: [PATCH 106/271] TD-5163 Fixes flag assignment during upload processing --- .../ImportCompetenciesFromFileService.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index a235f0a991..9841c5e429 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -11,6 +11,7 @@ namespace DigitalLearningSolutions.Web.Services using ClosedXML.Excel; using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Data.Helpers; + using DigitalLearningSolutions.Data.Models.Frameworks; using DigitalLearningSolutions.Data.Models.Frameworks.Import; using DocumentFormat.OpenXml.Office2010.Excel; @@ -125,14 +126,13 @@ CompetencyTableRow competencyRow { return maxFrameworkCompetencyGroupId; } - int newCompetencyGroupId = 0; int newCompetencyId = 0; int newFrameworkCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { - newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); + int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); if (newCompetencyGroupId > 0) { frameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminUserId); @@ -181,10 +181,10 @@ CompetencyTableRow competencyRow // If flags are supplied, add them: - if (competencyRow.FlagsCsv != null) + if (!string.IsNullOrWhiteSpace(competencyRow.FlagsCsv.Trim())) { var flags = competencyRow.FlagsCsv.Split(','); - int[] flagIds = []; + var flagIds = new List(); foreach (var flag in flags) { int flagId = 0; var frameworkFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, null); @@ -195,6 +195,7 @@ CompetencyTableRow competencyRow if (frameworkFlag.FlagName == flag) { flagId = frameworkFlag.FlagId; + break; } } } @@ -202,10 +203,14 @@ CompetencyTableRow competencyRow { flagId = frameworkService.AddCustomFlagToFramework(frameworkId, flag, "Flag", "nhsuk-tag--white"); } - flagIds.Append(flagId); + flagIds.Add(flagId); } - if (flagIds.Any()) { - frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, flagIds); + if (flagIds.Count > 0) { + frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); + if (competencyRow.RowStatus == RowStatus.Skipped) + { + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + } } } From 94d68b516ed9567bef263cd253a0ab5223cd3c69 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 09:08:51 +0000 Subject: [PATCH 107/271] TD-5163 General tweaks to improve wording of buttons and body text --- .../Views/Frameworks/Developer/Import/Index.cshtml | 2 +- .../Views/Frameworks/Developer/Import/UploadResults.cshtml | 2 +- .../Views/Frameworks/Developer/_Structure.cshtml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 78a5fb95bd..11fd4f4b48 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -79,7 +79,7 @@
    This Excel file will include all existing @Model.FrameworkVocabularyPlural.ToLower() whose details you can update.
    - New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row. + New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row, leaving the ID column blank.
    Download @Model.FrameworkVocabularyPlural.ToLower() diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index efb819495d..b65e4026f1 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -36,7 +36,7 @@
  • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
  • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
  • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
  • -
  • @Model.CompetenciesUpdatedCount new @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
  • +
  • @Model.CompetenciesUpdatedCount existing @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
  • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted but no errors)
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
  • diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml index a1097f6e18..849b5121ba 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml @@ -81,7 +81,7 @@ else
    } From 2695984bf210a41a513a496a88fdd34e77428498 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 16:55:34 +0000 Subject: [PATCH 108/271] TD-5163 Corrects heading --- .../Views/Frameworks/Developer/Import/ImportCompleted.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index b127e53979..93abdd4983 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -28,7 +28,7 @@ }
    -

    Delegate file uploaded

    +

    @Model.FrameworkVocabularySingular.ToLower() file uploaded

    @(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

      From b5dd0ff98514ab3ae4af31855508faa137ce86a4 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 16:56:32 +0000 Subject: [PATCH 109/271] TD-5163 modifies the insert competency group method to take an optional framework id --- .../DataServices/FrameworkDataService.cs | 62 ++++++++++++------- .../Services/FrameworkService.cs | 6 +- .../ImportCompetenciesFromFileService.cs | 2 +- 3 files changed, 42 insertions(+), 28 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 17b6cd16ef..73f20c7071 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -123,7 +123,7 @@ bool zeroBased //INSERT DATA BrandedFramework CreateFramework(DetailFramework detailFramework, int adminId); - int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId); + int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId); int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId); @@ -475,7 +475,7 @@ public BrandedFramework CreateFramework(DetailFramework detailFramework, int adm return new BrandedFramework(); } - var existingFrameworks = (int)connection.ExecuteScalar( + var existingFrameworks = connection.QuerySingle( @"SELECT COUNT(*) FROM Frameworks WHERE FrameworkName = @frameworkName", new { frameworkName } ); @@ -548,7 +548,7 @@ int adminId return GetBrandedFrameworkByFrameworkId(frameworkId, adminId); } - public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId) + public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId) { if ((groupName.Length == 0) | (adminId < 1)) { @@ -558,9 +558,16 @@ public int InsertCompetencyGroup(string groupName, string? groupDescription, int return -2; } groupDescription = (groupDescription?.Trim() == "" ? null : groupDescription); - var existingId = (int)connection.ExecuteScalar( - @"SELECT COALESCE ((SELECT TOP(1)ID FROM CompetencyGroups WHERE [Name] = @groupName AND (@groupDescription IS NULL OR Description = @groupDescription)), 0) AS CompetencyGroupID", - new { groupName, groupDescription } + var existingId = connection.QuerySingle( + @"SELECT COALESCE + ((SELECT TOP (1) ID + FROM CompetencyGroups + WHERE (Name = @groupName) AND EXISTS + (SELECT 1 AS Expr1 + FROM FrameworkCompetencyGroups + WHERE (CompetencyGroupID = CompetencyGroups.ID) AND (FrameworkID = @frameworkId) OR + (CompetencyGroupID = CompetencyGroups.ID) AND (@frameworkId IS NULL))), 0) AS CompetencyGroupID", + new { groupName, groupDescription, frameworkId } ); if (existingId > 0) { @@ -581,8 +588,15 @@ public int InsertCompetencyGroup(string groupName, string? groupDescription, int return -1; } - existingId = (int)connection.ExecuteScalar( - @"SELECT COALESCE ((SELECT TOP(1)ID FROM CompetencyGroups WHERE [Name] = @groupName AND (@groupDescription IS NULL OR Description = @groupDescription)), 0) AS CompetencyGroupID", + existingId = connection.QuerySingle( + @"SELECT COALESCE + ((SELECT TOP (1) ID + FROM CompetencyGroups + WHERE (Name = @groupName) AND EXISTS + (SELECT 1 AS Expr1 + FROM FrameworkCompetencyGroups + WHERE (CompetencyGroupID = CompetencyGroups.ID) AND (FrameworkID = @frameworkId) OR + (CompetencyGroupID = CompetencyGroups.ID) AND (@frameworkId IS NULL))), 0) AS CompetencyGroupID", new { groupName, groupDescription } ); return existingId; @@ -598,7 +612,7 @@ public int InsertFrameworkCompetencyGroup(int groupId, int frameworkId, int admi return -2; } - var existingId = (int)connection.ExecuteScalar( + var existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencyGroups WHERE CompetencyGroupID = @groupID AND FrameworkID = @frameworkID), 0) AS FrameworkCompetencyGroupID", new { groupId, frameworkId } ); @@ -624,7 +638,7 @@ FROM [FrameworkCompetencyGroups] return -1; } - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencyGroups WHERE CompetencyGroupID = @groupID AND FrameworkID = @frameworkID), 0) AS FrameworkCompetencyGroupID", new { groupId, frameworkId } ); @@ -671,14 +685,14 @@ public int InsertFrameworkCompetency( var existingId = 0; if (frameworkCompetencyGroupID == null) { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID IS NULL), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); } else { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID = @frameworkCompetencyGroupID), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); @@ -707,14 +721,14 @@ FROM [FrameworkCompetencies] if (frameworkCompetencyGroupID == null) { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID IS NULL), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); } else { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID = @frameworkCompetencyGroupID), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); @@ -765,7 +779,7 @@ public int AddCollaboratorToFramework(int frameworkId, string? userEmail, bool c return -3; } - var existingId = (int)connection.ExecuteScalar( + var existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCollaborators @@ -815,7 +829,7 @@ FROM FrameworkCollaborators ); } - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCollaborators @@ -907,7 +921,7 @@ public bool UpdateFrameworkName(int frameworkId, int adminId, string frameworkNa return false; } - var existingFrameworks = (int)connection.ExecuteScalar( + var existingFrameworks = connection.QuerySingle( @"SELECT COUNT(*) FROM Frameworks WHERE FrameworkName = @frameworkName AND ID <> @frameworkId", new { frameworkName, frameworkId } ); @@ -1003,7 +1017,7 @@ int adminId return; } - var usedElsewhere = (int)connection.ExecuteScalar( + var usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM FrameworkCompetencyGroups WHERE CompetencyGroupId = @competencyGroupId AND ID <> @frameworkCompetencyGroupId", @@ -1171,14 +1185,14 @@ public void DeleteFrameworkCompetencyGroup(int frameworkCompetencyGroupId, int c } //Check if used elsewhere and delete competency group if not: - var usedElsewhere = (int)connection.ExecuteScalar( + var usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM FrameworkCompetencyGroups WHERE CompetencyGroupId = @competencyGroupId", new { competencyGroupId } ); if (usedElsewhere == 0) { - usedElsewhere = (int)connection.ExecuteScalar( + usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM SelfAssessmentStructure WHERE CompetencyGroupId = @competencyGroupId", new { competencyGroupId } @@ -1209,7 +1223,7 @@ public void DeleteFrameworkCompetencyGroup(int frameworkCompetencyGroupId, int c public void DeleteFrameworkCompetency(int frameworkCompetencyId, int adminId) { - var competencyId = (int)connection.ExecuteScalar( + var competencyId = connection.QuerySingle( @"SELECT CompetencyID FROM FrameworkCompetencies WHERE ID = @frameworkCompetencyId", new { frameworkCompetencyId } ); @@ -1240,14 +1254,14 @@ public void DeleteFrameworkCompetency(int frameworkCompetencyId, int adminId) } //Check if used elsewhere and delete competency group if not: - var usedElsewhere = (int)connection.ExecuteScalar( + var usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM FrameworkCompetencies WHERE CompetencyID = @competencyId", new { competencyId } ); if (usedElsewhere == 0) { - usedElsewhere = (int)connection.ExecuteScalar( + usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM SelfAssessmentStructure WHERE CompetencyID = @competencyId", new { competencyId } @@ -1834,7 +1848,7 @@ FROM Competencies AS C INNER JOIN public int GetAdminUserRoleForFrameworkId(int adminId, int frameworkId) { - return (int)connection.ExecuteScalar( + return connection.QuerySingle( @"SELECT CASE WHEN FW.OwnerAdminID = @adminId THEN 3 WHEN fwc.CanModify = 1 THEN 2 WHEN fwc.CanModify = 0 THEN 1 ELSE 0 END AS UserRole FROM Frameworks AS FW LEFT OUTER JOIN FrameworkCollaborators AS fwc ON fwc.FrameworkID = FW.ID AND fwc.AdminID = @adminId diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index c4f7035ba9..2f47b79409 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -117,7 +117,7 @@ bool zeroBased //INSERT DATA BrandedFramework CreateFramework(DetailFramework detailFramework, int adminId); - int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId); + int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId = null); int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false); @@ -597,9 +597,9 @@ public int InsertCompetency(string name, string? description, int adminId) return frameworkDataService.InsertCompetency(name, description, adminId); } - public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId) + public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId) { - return frameworkDataService.InsertCompetencyGroup(groupName, groupDescription, adminId); + return frameworkDataService.InsertCompetencyGroup(groupName, groupDescription, adminId, frameworkId); } public int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 9841c5e429..2471f61605 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -132,7 +132,7 @@ CompetencyTableRow competencyRow int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { - int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); + int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId, frameworkId); if (newCompetencyGroupId > 0) { frameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminUserId); From 8a9c022296011b48ed83c14cf3cbd71a95277593 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 16:57:06 +0000 Subject: [PATCH 110/271] TD-5163 Clears down the uploaded sheet after processing --- .../Controllers/FrameworksController/ImportCompetencies.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 31c34b8e0a..43c91e9347 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -247,6 +247,8 @@ public IActionResult ImportSummarySubmit() public IActionResult UploadResults() { var data = GetBulkUploadData(); + FileHelper.DeleteFile(webHostEnvironment, data.CompetenciesFileName); + TempData.Clear(); var model = new ImportCompetenciesResultsViewModel(data.ImportCompetenciesResult, data.FrameworkId, data.FrameworkName, data.FrameworkVocubulary); return View("Developer/Import/UploadResults", model); } From 6e7653b1d6c305d4edeb59ea02381196ec8076be Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 9 Jan 2025 16:59:26 +0000 Subject: [PATCH 111/271] TD-5163 Commits competency order changes if required --- .../DataServices/FrameworkDataService.cs | 18 ++++--- .../Frameworks/Import/CompetencyTableRow.cs | 1 + .../Services/FrameworkService.cs | 6 +-- .../ImportCompetenciesFromFileService.cs | 54 ++++++++++++++++--- .../Import/ApplyCompetencyOrdering.cshtml | 4 ++ .../Developer/Import/ImportCompleted.cshtml | 2 +- .../Developer/Import/UploadResults.cshtml | 2 +- 7 files changed, 68 insertions(+), 19 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 73f20c7071..daeeefb540 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -206,7 +206,7 @@ int adminId ); void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription); - void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); + int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -1025,7 +1025,7 @@ int adminId ); if (usedElsewhere > 0) { - var newCompetencyGroupId = InsertCompetencyGroup(name, description, adminId); + var newCompetencyGroupId = InsertCompetencyGroup(name, description, adminId, null); if (newCompetencyGroupId > 0) { var numberOfAffectedRows = connection.Execute( @@ -1086,13 +1086,14 @@ public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, st } } - public void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) + public int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) { + int totalRowsAffected = 0; string? commaSeparatedSelectedFlagIds = null; if (selectedFlagIds?.Length > 0) { commaSeparatedSelectedFlagIds = String.Join(',', selectedFlagIds); - connection.Execute( + totalRowsAffected += connection.Execute( @$"INSERT INTO CompetencyFlags(CompetencyID, FlagID, Selected) SELECT @competencyId, f.ID, 1 FROM Flags f @@ -1102,11 +1103,12 @@ SELECT FlagID FROM CompetencyFlags )", new { competencyId, selectedFlagIds }); } - connection.Execute( + totalRowsAffected += connection.Execute( @$"UPDATE CompetencyFlags SET Selected = (CASE WHEN FlagID IN ({commaSeparatedSelectedFlagIds ?? "null"}) THEN 1 ELSE 0 END) - WHERE CompetencyID = @competencyId", + WHERE CompetencyID = @competencyId AND Selected <> (CASE WHEN FlagID IN ({commaSeparatedSelectedFlagIds ?? "null"}) THEN 1 ELSE 0 END)", new { competencyId, frameworkId }); + return totalRowsAffected; } public int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) @@ -1127,7 +1129,7 @@ public void UpdateFrameworkCustomFlag(int frameworkId, int id, string flagName, new { frameworkId, id, flagName, flagGroup, flagTagClass }); } - public void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction) + public void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction) // Valid directions are 'UP' and 'DOWN' { connection.Execute( "ReorderFrameworkCompetencyGroup", @@ -1136,7 +1138,7 @@ public void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool si ); } - public void MoveFrameworkCompetency(int frameworkCompetencyId, bool singleStep, string direction) + public void MoveFrameworkCompetency(int frameworkCompetencyId, bool singleStep, string direction) // Valid directions are 'UP' and 'DOWN' { connection.Execute( "ReorderFrameworkCompetency", diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index 16ea0b9e52..740ec961ca 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -38,6 +38,7 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) RowStatus = RowStatus.NotYetProcessed; } public int RowNumber { get; set; } + public int CompetencyOrderNumber { get; set; } public string? AlwaysShowDescriptionRaw { get; set; } public ImportCompetenciesResult.ErrorReason? Error { get; set; } public RowStatus RowStatus { get; set; } diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index 2f47b79409..795e8ba966 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -200,7 +200,7 @@ int adminId ); void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription = false); - void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); + int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -662,9 +662,9 @@ public void UpdateAssessmentQuestion(int id, string question, int assessmentQues frameworkDataService.UpdateAssessmentQuestion(id, question, assessmentQuestionInputTypeId, maxValueDescription, minValueDescription, scoringInstructions, minValue, maxValue, includeComments, adminId, commentsPrompt, commentsHint); } - public void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) + public int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) { - frameworkDataService.UpdateCompetencyFlags(frameworkId, competencyId, selectedFlagIds); + return frameworkDataService.UpdateCompetencyFlags(frameworkId, competencyId, selectedFlagIds); } public BrandedFramework? UpdateFrameworkBranding(int frameworkId, int brandId, int categoryId, int topicId, int adminId) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 2471f61605..7cec219ef9 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -78,7 +78,7 @@ public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook int maxFrameworkCompetencyId = frameworkService.GetMaxFrameworkCompetencyID(); int maxFrameworkCompetencyGroupId = frameworkService.GetMaxFrameworkCompetencyGroupID(); var table = OpenCompetenciesTable(workbook, vocabulary); - return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds); + return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds); } internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) { @@ -95,10 +95,28 @@ internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) } return table; } - internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds) + internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, int reorderCompetenciesOption, int customAssessmentQuestionID, List defaultQuestionIds) { var competenciesRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); - + int rowCount = 0; + string currentGroup = null; + competenciesRows = competenciesRows + .OrderBy(row => row.CompetencyGroup) + .Select(row => + { + if (row.CompetencyGroup != currentGroup) + { + currentGroup = row.CompetencyGroup; + rowCount = 1; + } + else + { + rowCount++; + } + row.CompetencyOrderNumber = rowCount; + return row; + }) + .ToList(); var competencyGroupCount = competenciesRows .Where(row => !string.IsNullOrWhiteSpace(row.CompetencyGroup)) .Select(row => row.CompetencyGroup) @@ -106,7 +124,7 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a .Count(); foreach (var competencyRow in competenciesRows) { - maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); + maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } return new ImportCompetenciesResult(competenciesRows); @@ -117,6 +135,7 @@ private int ProcessCompetencyRow( int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, + int reorderCompetenciesOption, int customAssessmentQuestionID, List defaultQuestionIds, CompetencyTableRow competencyRow @@ -206,8 +225,8 @@ CompetencyTableRow competencyRow flagIds.Add(flagId); } if (flagIds.Count > 0) { - frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); - if (competencyRow.RowStatus == RowStatus.Skipped) + var updated = frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); + if (updated > 0 && competencyRow.RowStatus == RowStatus.Skipped) { competencyRow.RowStatus = RowStatus.CompetencyUpdated; } @@ -231,6 +250,29 @@ CompetencyTableRow competencyRow } } + // Reorder competencies if required: + if (reorderCompetenciesOption == 2) + { + var frameworkCompetencyId = (int)competencyRow.ID; + var frameworkCompetency = frameworkService.GetFrameworkCompetencyById(frameworkCompetencyId); + var placesToMove = Math.Abs(frameworkCompetency.Ordering - competencyRow.CompetencyOrderNumber); + + if (placesToMove > 0) + { + var direction = frameworkCompetency.Ordering > competencyRow.CompetencyOrderNumber ? "UP" : "DOWN"; + + for (int i = 0; i < placesToMove; i++) + { + frameworkService.MoveFrameworkCompetency(frameworkCompetencyId, true, direction); + } + + if (competencyRow.RowStatus == RowStatus.Skipped) + { + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + } + } + } + return maxFrameworkCompetencyGroupId; } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml index 398343f461..6b21e8b765 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml @@ -36,6 +36,10 @@ Apply @Model.FrameworkVocabularySingular.ToLower() sequence changes? +
      + Information: +

      We strongly recommend including all framework competencies in your uploaded sheet if reordering competencies to ensure that the correct sequence is applied.

      +
      Your uploaded file includes changes to the sequence of existing @Model.FrameworkVocabularyPlural.ToLower(). Choose whether to store the changes to @Model.FrameworkVocabularySingular.ToLower() sequence during update.
      diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 93abdd4983..059712b059 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -47,7 +47,7 @@ {
    • - @Model.CompetenciesToReorderCount existing @Model.FrameworkVocabularySingular.ToLower() @(Model.CompetenciesToReorderCount == 1 ? "record" : "records") have changed sequence in your uploaded sheet. You can choose whether to fix them in the new order next. + Some existing @Model.FrameworkVocabularySingular.ToLower() @(Model.CompetenciesToReorderCount == 1 ? "record" : "records") have changed sequence in your uploaded sheet. You can choose whether to fix them in the new order next.
    • }
    • No errors
    • diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index b65e4026f1..3fa9b57408 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -37,7 +37,7 @@
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
    • @Model.CompetenciesUpdatedCount existing @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
    • -
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted but no errors)
    • +
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted or updated but no errors)
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
    From 5a1ce683a4ee8d81c2ff021bc4a96ea59f24badc Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 08:19:01 +0000 Subject: [PATCH 112/271] TD-5163 Reorders competency groups if needed --- .../ImportCompetenciesFromFileService.cs | 75 +++++++++++++------ 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 7cec219ef9..b8b7883f23 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -61,7 +61,7 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List { int originalIndex = existingIds.IndexOf(id); int newIndex = newIds.IndexOf(id); - if(originalIndex == newIndex) + if (originalIndex == newIndex) { competencyRow.RowStatus = RowStatus.CompetencyUpdated; } @@ -101,7 +101,6 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a int rowCount = 0; string currentGroup = null; competenciesRows = competenciesRows - .OrderBy(row => row.CompetencyGroup) .Select(row => { if (row.CompetencyGroup != currentGroup) @@ -126,7 +125,32 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a { maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } + // TO DO: Check for changes to competency group order and apply them if appropriate: + if (reorderCompetenciesOption == 2) + { + var distinctCompetencyGroups = competenciesRows + .Where(row => !string.IsNullOrWhiteSpace(row.CompetencyGroup)) + .Select(row => row.CompetencyGroup) + .Distinct() + .ToList(); + var existingGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).Select(row => new { row.ID, row.Name }) + .Distinct() + .ToList(); + for (int i = 0; i < competencyGroupCount; i++) + { + var placesToMove = Math.Abs(existingGroups.FindIndex(group => group.Name == distinctCompetencyGroups[i])-i); + if (placesToMove > 0) + { + var thisGroup = existingGroups.FirstOrDefault(group => group.Name == distinctCompetencyGroups[i]); + var direction = existingGroups.FindIndex(group => group.Name == distinctCompetencyGroups[i]) > i ? "UP" : "DOWN"; + for (int p = 0; p < placesToMove; p++) + { + frameworkService.MoveFrameworkCompetencyGroup(thisGroup.ID, true, direction); + } + } + } + } return new ImportCompetenciesResult(competenciesRows); } private int ProcessCompetencyRow( @@ -148,7 +172,7 @@ CompetencyTableRow competencyRow int newCompetencyId = 0; int newFrameworkCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID - int ? frameworkCompetencyGroupId = null; + int? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId, frameworkId); @@ -169,10 +193,10 @@ CompetencyTableRow competencyRow if (frameworkCompetency != null) { newCompetencyId = frameworkCompetency.CompetencyID; - if (frameworkCompetency.Name != competencyRow.Competency || frameworkCompetency.Description != competencyRow.CompetencyDescription || frameworkCompetency.AlwaysShowDescription != competencyRow.AlwaysShowDescription ) + if (frameworkCompetency.Name != competencyRow.Competency || frameworkCompetency.Description != competencyRow.CompetencyDescription || frameworkCompetency.AlwaysShowDescription != competencyRow.AlwaysShowDescription) { frameworkService.UpdateFrameworkCompetency((int)competencyRow.ID, competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId, competencyRow.AlwaysShowDescription ?? false); - competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyUpdated: RowStatus.CompetencyUpdated); + competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyUpdated : RowStatus.CompetencyUpdated); } else { @@ -204,7 +228,8 @@ CompetencyTableRow competencyRow { var flags = competencyRow.FlagsCsv.Split(','); var flagIds = new List(); - foreach (var flag in flags) { + foreach (var flag in flags) + { int flagId = 0; var frameworkFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, null); if (frameworkFlags.Any()) @@ -224,7 +249,8 @@ CompetencyTableRow competencyRow } flagIds.Add(flagId); } - if (flagIds.Count > 0) { + if (flagIds.Count > 0) + { var updated = frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); if (updated > 0 && competencyRow.RowStatus == RowStatus.Skipped) { @@ -233,23 +259,6 @@ CompetencyTableRow competencyRow } } - - // Add assessment questions if necessary: - if (defaultQuestionIds.Count > 0 | customAssessmentQuestionID > 0) - { - if (competencyRow.RowStatus == RowStatus.CompetencyInserted | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted || addAssessmentQuestionsOption == 2 && competencyRow.RowStatus == RowStatus.CompetencyUpdated | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated || addAssessmentQuestionsOption == 3) - { - foreach(var id in defaultQuestionIds) - { - frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, id, adminUserId); - } - if(customAssessmentQuestionID > 0) - { - frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, customAssessmentQuestionID, adminUserId); - } - } - } - // Reorder competencies if required: if (reorderCompetenciesOption == 2) { @@ -273,6 +282,24 @@ CompetencyTableRow competencyRow } } + // Add assessment questions if necessary: + if (defaultQuestionIds.Count > 0 | customAssessmentQuestionID > 0) + { + if (competencyRow.RowStatus == RowStatus.CompetencyInserted | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted || addAssessmentQuestionsOption == 2 && competencyRow.RowStatus == RowStatus.CompetencyUpdated | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated || addAssessmentQuestionsOption == 3) + { + foreach (var id in defaultQuestionIds) + { + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, id, adminUserId); + } + if (customAssessmentQuestionID > 0) + { + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, customAssessmentQuestionID, adminUserId); + } + } + } + + + return maxFrameworkCompetencyGroupId; } From b516c569d76f5b412521cec5163dad073a95452c Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 08:46:33 +0000 Subject: [PATCH 113/271] TD-5163 Fixes navigation and titles --- .../Controllers/FrameworksController/ImportCompetencies.cs | 4 ++++ .../Views/Frameworks/Developer/Import/ImportCompleted.cshtml | 2 +- .../Views/Frameworks/Developer/Import/ImportSummary.cshtml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 43c91e9347..846eeca19a 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -194,6 +194,10 @@ public IActionResult AddAssessmentQuestions(AddAssessmentQuestionsFormData model public IActionResult AddQuestionsToWhichCompetencies() { var data = GetBulkUploadData(); + if (data.DefaultQuestionIDs.Count ==0 && data.CustomAssessmentQuestionID == null) + { + return RedirectToAction("ImportSummary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } var model = new AddQuestionsToWhichCompetenciesViewModel ( data.FrameworkId, diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 059712b059..3a5cd7aa8d 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -28,7 +28,7 @@ }
    -

    @Model.FrameworkVocabularySingular.ToLower() file uploaded

    +

    @Model.FrameworkVocabularySingular file uploaded

    @(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

      diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml index fedee7029a..b14052b460 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -102,7 +102,7 @@

      Once @Model.FrameworkVocabularySingular.ToLower() records are processed, changes cannot be undone.

    - Back + 0 ? "AddQuestionsToWhichCompetencies" : "AddAssessmentQuestions") role="button" class="nhsuk-button nhsuk-button--secondary">Back
    From b002c2ba1ff62d26c48f7de7e40574ab46f746a4 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 08:47:35 +0000 Subject: [PATCH 114/271] TD-5163 Fixes competency group reordering by reloading the committed order within the iterator --- .../Services/ImportCompetenciesFromFileService.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index b8b7883f23..c29bb1b177 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -133,12 +133,11 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a .Select(row => row.CompetencyGroup) .Distinct() .ToList(); - - var existingGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).Select(row => new { row.ID, row.Name }) - .Distinct() - .ToList(); for (int i = 0; i < competencyGroupCount; i++) { + var existingGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).Select(row => new { row.ID, row.Name }) + .Distinct() + .ToList(); var placesToMove = Math.Abs(existingGroups.FindIndex(group => group.Name == distinctCompetencyGroups[i])-i); if (placesToMove > 0) { From 3ec6b0c9a4a1a34dfccae300e43f2756def02da2 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 09:14:59 +0000 Subject: [PATCH 115/271] Applies BR DLSFW1 to standard insert competency group functionality --- .../Controllers/FrameworksController/Competencies.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs index 328082ec28..0d26aee6a3 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs @@ -71,7 +71,7 @@ public IActionResult AddEditFrameworkCompetencyGroup(int frameworkId, Competency (competencyGroupBase.Description), adminId); return new RedirectResult(Url.Action("ViewFramework", new { tabname = "Structure", frameworkId }) + "#fcgroup-" + frameworkCompetencyGroupId.ToString()); } - var newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyGroupBase.Name, SanitizerHelper.SanitizeHtmlData(competencyGroupBase.Description), adminId); + var newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyGroupBase.Name, SanitizerHelper.SanitizeHtmlData(competencyGroupBase.Description), adminId, frameworkId); if (newCompetencyGroupId > 0) { var newFrameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminId); From 9305903846f371708292ed95763bef4c2e0b6978 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 14:28:00 +0000 Subject: [PATCH 116/271] Adds published framework warning to summary page --- .../Views/Frameworks/Developer/Import/ImportSummary.cshtml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml index b14052b460..ed715f4068 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -31,6 +31,10 @@

    @Model.FrameworkVocabularyPlural import summary

    + @if (Model.PublishStatusID == 3) + { + + }

    Your @Model.FrameworkVocabularySingular.ToLower() sheet is ready to be processed. Please check the details below are correct before proceeding to @process @Model.FrameworkVocabularyPlural.ToLower() in the framework @Model.FrameworkName.

    Upload summary

    From f7e05161a8d3456701810c2d031cb4acc71ef7d0 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 08:48:29 +0000 Subject: [PATCH 117/271] TD-5233 Add a limitations paragraph to the start page --- .../Frameworks/Developer/Import/Index.cshtml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 11fd4f4b48..c22a96d60e 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -40,7 +40,18 @@
    @if (Model.IsNotBlank) { - +
    + Note: +

    + Bulk upload cannot be used to: +

    +
      +
    • Delete competencies or competency groups
    • +
    • Remove assessment questions from existing competencies
    • +
    • Add more than one custom assessment question to uploaded competencies
    • +
    + +

    To bulk add and/or update @Model.FrameworkVocabularyPlural.ToLower() in the framework, @Model.FrameworkName, download an Excel workbook using one of the options below.

    @@ -91,6 +102,12 @@ } else { +
    + Note: +

    + Bulk upload cannot be used to add more than one custom assessment question to uploaded competencies. +

    +

    Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row.

    From d1a8687be09feab71b5bc25e9220da150d915837 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 09:12:10 +0000 Subject: [PATCH 118/271] Emphasises cannot --- .../Views/Frameworks/Developer/Import/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index c22a96d60e..1221cb9f4a 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -43,7 +43,7 @@
    Note:

    - Bulk upload cannot be used to: + Bulk upload cannot be used to:

    • Delete competencies or competency groups
    • From a25e7b5175dfe397c509d35623fa7489ef81f6a2 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 09:15:42 +0000 Subject: [PATCH 119/271] Moves single line inset text to view component --- .../Views/Frameworks/Developer/Import/Index.cshtml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 1221cb9f4a..f94adaf54a 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -36,7 +36,7 @@ { } - @* *@ +
      @if (Model.IsNotBlank) { @@ -102,12 +102,7 @@ } else { -
      - Note: -

      - Bulk upload cannot be used to add more than one custom assessment question to uploaded competencies. -

      -
      +

      Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row.

      From 732ab4257e8280267a4e176d96ef9625b753fe7f Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 14:56:56 +0000 Subject: [PATCH 120/271] TD-5233 Indicates the number of competencies reordered in the upload results page --- .../Frameworks/Import/CompetencyTableRow.cs | 2 +- .../Import/ImportCompetenciesResult.cs | 6 +++--- .../ImportCompetenciesFromFileService.cs | 20 +++++++++---------- .../ImportCompetenciesResultsViewModel.cs | 2 ++ .../Import/ApplyCompetencyOrdering.cshtml | 6 +++--- .../Developer/Import/UploadResults.cshtml | 1 + 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index 740ec961ca..1dd67ed007 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -9,7 +9,6 @@ public enum RowStatus CompetencyGroupAndCompetencyInserted, CompetencyInserted, CompetencyUpdated, - CompetencyUpdatedAndReordered, CompetencyGroupInserted, CompetencyGroupUpdated, CompetencyGroupAndCompetencyUpdated, @@ -42,6 +41,7 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) public string? AlwaysShowDescriptionRaw { get; set; } public ImportCompetenciesResult.ErrorReason? Error { get; set; } public RowStatus RowStatus { get; set; } + public bool Reordered { get; set; } = false; public bool Validate() { if (string.IsNullOrEmpty(Competency)) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs index 15f5136274..5ca4536119 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs @@ -22,10 +22,10 @@ IReadOnlyCollection competencyTableRows { ProcessedCount = competencyTableRows.Count; CompetencyAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); - CompetencyUpdatedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdated | dr.RowStatus == RowStatus.CompetencyUpdatedAndReordered); - CompetencyReorderedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdatedAndReordered); + CompetencyUpdatedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdated | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated); GroupAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyGroupInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); - SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped); + SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped && dr.Reordered == false); + CompetencyReorderedCount = competencyTableRows.Count(dr => dr.Reordered == true); Errors = competencyTableRows.Where(dr => dr.Error.HasValue).Select(dr => (dr.RowNumber, dr.Error!.Value)); FlagCount = competencyTableRows .Where(row => !string.IsNullOrWhiteSpace(row.FlagsCsv)) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index c29bb1b177..9b2f32c1c9 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -61,13 +61,10 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List { int originalIndex = existingIds.IndexOf(id); int newIndex = newIds.IndexOf(id); - if (originalIndex == newIndex) + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + if (originalIndex != newIndex) { - competencyRow.RowStatus = RowStatus.CompetencyUpdated; - } - else - { - competencyRow.RowStatus = RowStatus.CompetencyUpdatedAndReordered; + competencyRow.Reordered = true; } } } @@ -125,7 +122,7 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a { maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } - // TO DO: Check for changes to competency group order and apply them if appropriate: + // Check for changes to competency group order and apply them if appropriate: if (reorderCompetenciesOption == 2) { var distinctCompetencyGroups = competenciesRows @@ -146,6 +143,10 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a for (int p = 0; p < placesToMove; p++) { frameworkService.MoveFrameworkCompetencyGroup(thisGroup.ID, true, direction); + competenciesRows + .Where(row => row.CompetencyGroup == thisGroup.Name) + .ToList() + .ForEach(row => row.Reordered = true); } } } @@ -274,10 +275,7 @@ CompetencyTableRow competencyRow frameworkService.MoveFrameworkCompetency(frameworkCompetencyId, true, direction); } - if (competencyRow.RowStatus == RowStatus.Skipped) - { - competencyRow.RowStatus = RowStatus.CompetencyUpdated; - } + competencyRow.Reordered = true; } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs index 48204ae0d1..6bc814b2a2 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs @@ -14,6 +14,7 @@ public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompete CompetenciesUpdatedCount = importCompetenciesResult.CompetencyUpdatedCount; CompetencyGroupsInsertedCount = importCompetenciesResult.GroupAddedCount; CompetencyGroupsUpdatedCount = importCompetenciesResult.GroupUpdatedCount; + CompetenciesReorderedCount = importCompetenciesResult.CompetencyReorderedCount; SkippedCount = importCompetenciesResult.SkippedCount; Errors = importCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason))); FrameworkID = frameworkId; @@ -26,6 +27,7 @@ public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompete public int ProcessedCount { get; set; } public int CompetenciesInsertedCount { get; set; } public int CompetenciesUpdatedCount { get; set; } + public int CompetenciesReorderedCount { get; set; } public int CompetencyGroupsInsertedCount { get; set; } public int CompetencyGroupsUpdatedCount { get; set; } public int SkippedCount { get; set; } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml index 6b21e8b765..b0f7fe5845 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml @@ -41,7 +41,7 @@

      We strongly recommend including all framework competencies in your uploaded sheet if reordering competencies to ensure that the correct sequence is applied.

      - Your uploaded file includes changes to the sequence of existing @Model.FrameworkVocabularyPlural.ToLower(). Choose whether to store the changes to @Model.FrameworkVocabularySingular.ToLower() sequence during update. + Your uploaded file includes changes to the order of existing @Model.FrameworkVocabularyPlural.ToLower(). Choose whether to store the changes to @Model.FrameworkVocabularySingular.ToLower() order during update.
      Select an option @@ -51,7 +51,7 @@
      @Model.FrameworkVocabularyPlural will be updated if they have changed but there sequence/order in the framework will not change. @@ -60,7 +60,7 @@
      The sequence of @Model.FrameworkVocabularyPlural.ToLower() in the framework will be changed to reflect the order in the sheet during processing. diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index 3fa9b57408..87278f516d 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -37,6 +37,7 @@
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
    • @Model.CompetenciesUpdatedCount existing @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
    • +
    • @Model.CompetenciesReorderedCount existing @(Model.CompetenciesReorderedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) reordered
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted or updated but no errors)
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
    From b55778ad42200d0d67be12c886ed9fc706580ce9 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 14:58:48 +0000 Subject: [PATCH 121/271] Update ApplyCompetencyOrdering.cshtml --- .../Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml index b0f7fe5845..456961288e 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml @@ -63,7 +63,7 @@ Apply changes to @Model.FrameworkVocabularySingular.ToLower() order
    - The sequence of @Model.FrameworkVocabularyPlural.ToLower() in the framework will be changed to reflect the order in the sheet during processing. + The oder of @Model.FrameworkVocabularyPlural.ToLower() in the framework will be changed to reflect the order in the sheet during processing.
    From 51d55de9be754d753a5de31e638b9adb63d22fb9 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 15:13:11 +0000 Subject: [PATCH 122/271] TD-5233 added flags to the list of things that can't be removed and used framework vocab in list --- .../Views/Frameworks/Developer/Import/Index.cshtml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index f94adaf54a..7a31d64dca 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -46,9 +46,10 @@ Bulk upload cannot be used to:

      -
    • Delete competencies or competency groups
    • -
    • Remove assessment questions from existing competencies
    • -
    • Add more than one custom assessment question to uploaded competencies
    • +
    • Delete @Model.FrameworkVocabularyPlural.ToLower() or @Model.FrameworkVocabularySingular.ToLower() groups
    • +
    • Remove assessment questions from existing @Model.FrameworkVocabularyPlural.ToLower()
    • +
    • Add more than one custom assessment question to uploaded @Model.FrameworkVocabularyPlural.ToLower()
    • +
    • Remove flags from @Model.FrameworkVocabularyPlural.ToLower()
    @@ -102,7 +103,7 @@ } else { - +

    Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row.

    From e54096747875ccf14bb8c17ff23ede1bba8dc42b Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 17:06:22 +0000 Subject: [PATCH 123/271] Formatting changes --- .../Services/ImportCompetenciesFromFileService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 9b2f32c1c9..02b8affac1 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -143,11 +143,11 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a for (int p = 0; p < placesToMove; p++) { frameworkService.MoveFrameworkCompetencyGroup(thisGroup.ID, true, direction); - competenciesRows + } + competenciesRows .Where(row => row.CompetencyGroup == thisGroup.Name) .ToList() .ForEach(row => row.Reordered = true); - } } } } From fb78c0ea46e9aad8e6359d45c4bbe6366e951a93 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 20 Jan 2025 17:19:38 +0000 Subject: [PATCH 124/271] Sets up controller, view and navigation for print layout --- .../FrameworksController/Frameworks.cs | 11 +++++++ .../Developer/FrameworkPrintLayout.cshtml | 31 +++++++++++++++++++ .../Frameworks/Developer/_Structure.cshtml | 1 + 3 files changed, 43 insertions(+) create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs index bdaa3d4e20..a66d5c46b0 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs @@ -716,6 +716,17 @@ public IActionResult ViewFramework(string tabname, int frameworkId, int? framewo return View("Developer/Framework", model); } + [Route("/Framework/{frameworkId}/Structure/PrintLayout")] + public IActionResult PrintLayout(int frameworkId) { + var adminId = GetAdminId(); + var detailFramework = frameworkService.GetFrameworkDetailByFrameworkId(frameworkId, adminId); + var routeData = new Dictionary { { "frameworkId", detailFramework?.ID.ToString() } }; + var model = new FrameworkViewModel() + { + DetailFramework = detailFramework, + }; + return View("Developer/FrameworkPrintLayout", model); + } [ResponseCache(CacheProfileName = "Never")] public IActionResult InsertFramework() { diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml new file mode 100644 index 0000000000..5d94c62025 --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml @@ -0,0 +1,31 @@ +@using DigitalLearningSolutions.Web.ViewModels.Frameworks; +@model FrameworkViewModel; +@{ + ViewData["Title"] = Model.DetailFramework.FrameworkName; + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; +} + +@section NavMenuItems { + +} +@section NavBreadcrumbs { + +} +
    + +
    +

    + @Model.DetailFramework.FrameworkName +

    +
    +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml index 849b5121ba..f6d566ad64 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml @@ -82,6 +82,7 @@ else Add @Model.VocabSingular().ToLower() group Add ungrouped @Model.VocabSingular().ToLower() Bulk upload/update @Model.VocabPlural().ToLower() + View for print
    } From 95833cdf75955008d3f638edea2a9d1ecb528c8a Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 21 Jan 2025 16:48:11 +0000 Subject: [PATCH 125/271] TD-5263 Implements "view for print" option for frameworks --- .../FrameworksController/Frameworks.cs | 3 + .../Styles/frameworks/frameworksShared.scss | 34 ++++++ .../Styles/layout.scss | 6 ++ .../Developer/FrameworkPrintLayout.cshtml | 100 +++++++++++++++++- .../Frameworks/Developer/_Structure.cshtml | 2 +- .../Views/Shared/_CookieConsentPartial.cshtml | 4 +- .../Views/Shared/_Layout.cshtml | 2 +- .../Shared/_UserFeedbackBarPartial.cshtml | 4 +- 8 files changed, 147 insertions(+), 8 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs index a66d5c46b0..ffb9460299 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs @@ -725,6 +725,9 @@ public IActionResult PrintLayout(int frameworkId) { { DetailFramework = detailFramework, }; + model.FrameworkCompetencyGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).ToList(); + model.CompetencyFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, selected: true); + model.FrameworkCompetencies = frameworkService.GetFrameworkCompetenciesUngrouped(frameworkId); return View("Developer/FrameworkPrintLayout", model); } [ResponseCache(CacheProfileName = "Never")] diff --git a/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss b/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss index a6cd8f8277..b452ab9178 100644 --- a/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss +++ b/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss @@ -251,3 +251,37 @@ h1.truncate-overflow::after { .float-right{ float:right; } +@media print { + + address, p, .nhsuk-body-m, ol, ul, td, .nhsuk-tag { + font-size: 12px !important; + } + + h1 { + font-size: 20px !important; + break-after: avoid; + } + + h2 { + font-size: 18px !important; + break-after: avoid; + } + + h3, table { + break-after: avoid; + break-before: auto; + } + + h3 { + font-size: 16px !important; + } + + h4, th { + font-size: 14px !important; + } + + tr { + break-inside: avoid; + page-break-inside: avoid; + } +} diff --git a/DigitalLearningSolutions.Web/Styles/layout.scss b/DigitalLearningSolutions.Web/Styles/layout.scss index 7e252f49ed..c0ef2ada6a 100644 --- a/DigitalLearningSolutions.Web/Styles/layout.scss +++ b/DigitalLearningSolutions.Web/Styles/layout.scss @@ -398,3 +398,9 @@ nav, .nhsuk-header__navigation, #header-navigation { .field-validation-valid { display: none !important; } + +@media print { + .no-print { + display: none; + } +} diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml index 5d94c62025..69ec377b44 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml @@ -4,6 +4,7 @@ ViewData["Title"] = Model.DetailFramework.FrameworkName; ViewData["Application"] = "Framework Service"; ViewData["HeaderPathName"] = "Framework Service"; + int groupNum = 0; } @section NavMenuItems { @@ -14,7 +15,7 @@
    1. Frameworks
    2. -
    3. Framework @ViewContext.RouteData.Values["tabname"]
    4. +
    5. Framework structure
    6. Print layout

    Back to Framework

    @@ -27,5 +28,100 @@

    @Model.DetailFramework.FrameworkName

    -
    + @if (!String.IsNullOrEmpty(Model.DetailFramework.Description)) + { +
    +
    +

    + Framework description + +

    +

    + @(Html.Raw(Model.DetailFramework.Description)) +

    +
    +
    + } +

    Framework @Model.VocabPlural().ToLower()

    + + @if (Model.FrameworkCompetencyGroups != null) + { + if (Model.FrameworkCompetencyGroups.Any()) + { + @foreach (var frameworkCompetencyGroup in Model.FrameworkCompetencyGroups) + { + groupNum++; +

    @frameworkCompetencyGroup.Name

    + if (frameworkCompetencyGroup.Description != null) + { +

    + @frameworkCompetencyGroup.Description +

    + } + + int compNum = 0; + if (frameworkCompetencyGroup.FrameworkCompetencies[0] != null) + { + + + + + + + + + @foreach (var frameworkCompetency in frameworkCompetencyGroup.FrameworkCompetencies) + { + compNum++; + + + + + } + +
    + @Model.VocabSingular() + + Date and Signature +
    + @frameworkCompetency.Name + + + @if (frameworkCompetency.Description != null) + { +

    + @Html.Raw(frameworkCompetency.Description) +

    + } +
    + +
    + } + } + } + } + @if (Model.FrameworkCompetencies != null) + { + if (Model.FrameworkCompetencies.Any()) + { + groupNum++; + int compNum = 0; +

    Ungrouped competencies

    + foreach (var frameworkCompetency in Model.FrameworkCompetencies) + { + compNum++; +
    +

    @frameworkCompetency.Name

    + + @if (frameworkCompetency.Description != null) + { +

    + @frameworkCompetency.Description +

    + } +
    + } + } + } +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml index f6d566ad64..ca13087c27 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml @@ -82,7 +82,7 @@ else Add @Model.VocabSingular().ToLower() group Add ungrouped @Model.VocabSingular().ToLower() Bulk upload/update @Model.VocabPlural().ToLower() - View for print + View for print
    } diff --git a/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml b/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml index 9500f932e9..bffbbc36f8 100644 --- a/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml +++ b/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml @@ -9,7 +9,7 @@ @if (showCookieBanner == null && validateCookieBannerViaTempData == null) // [BY] Show cookie banner when the value is null. if the user consent yes or no then we dont display the banner { - @@ -94,7 +94,7 @@

    Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row.

    - + Download template } From 992c4715388664dde4dee3e94b9c5a78b7911ef2 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 30 Dec 2024 16:36:34 +0000 Subject: [PATCH 150/271] IDE formatter changes --- .../Controllers/FrameworksController/ImportCompetencies.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index db606548a0..dad1bbd4c1 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -21,7 +21,7 @@ public IActionResult ImportCompetencies(int frameworkId, string tabname, bool is if (userRole < 2) return StatusCode(403); var model = new ImportCompetenciesViewModel(framework, isNotBlank); - + return View("Developer/Import/Index", model); } public IActionResult DownloadCompetencies(int frameworkId, int DownloadOption, string vocabulary) From a0a7e7c8c6b223a4d280af859491ca240608ae33 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 30 Dec 2024 10:43:24 +0000 Subject: [PATCH 151/271] TD-5155 Begins to implement add questions view model --- .../Import/AddAssessmentQuestionsViewModel.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs new file mode 100644 index 0000000000..b50b1dc6a1 --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs @@ -0,0 +1,13 @@ +using DigitalLearningSolutions.Data.Models.Frameworks; +using Microsoft.AspNetCore.Mvc.Rendering; +using System.Collections.Generic; + +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +{ + public class AddAssessmentQuestionsViewModel + { + public DetailFramework Framework { get; set; } + public IEnumerable? FrameworkDefaultQuestions { get; set; } + public SelectList? QuestionSelectList { get; set; } + } +} From 336b97c40d43b9842b4eacdb6ded29fcd91b0e6a Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 31 Dec 2024 09:37:40 +0000 Subject: [PATCH 152/271] TD-5155 Adds view model and constructor --- .../ImportCompetencies.cs | 22 +++++++++++++++++-- .../Models/BulkCompetenciesData.cs | 1 + .../Import/AddAssessmentQuestionsFormData.cs | 10 +++++++++ .../Import/AddAssessmentQuestionsViewModel.cs | 21 ++++++++++++++---- 4 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index dad1bbd4c1..d9cbb44318 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -6,7 +6,9 @@ using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import; using GDS.MultiPageFormData.Enums; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Rendering; using System.IO; +using System.Linq; namespace DigitalLearningSolutions.Web.Controllers.FrameworksController { @@ -94,8 +96,24 @@ public IActionResult ImportCompleted() public IActionResult AddAssessmentQuestions() { var data = GetBulkUploadData(); - - return View(); + var adminId = GetAdminId(); + var defaultQuestions = frameworkService.GetFrameworkDefaultQuestionsById(data.FrameworkId, adminId); + var questionList = frameworkService.GetAssessmentQuestions(data.FrameworkId, adminId).ToList(); + var questionSelectList = new SelectList(questionList, "ID", "Label"); + var model = new AddAssessmentQuestionsViewModel + ( + data.FrameworkId, + data.FrameworkName, + data.FrameworkVocubulary, + data.PublishStatusID, + data.CompetenciesToAddCount, + data.CompetenciesToUpdateCount, + defaultQuestions, + questionSelectList + ); + model.DefaultAssessmentQuestionIDs = data.DefaultQuestionIDs; + model.OtherAssessmentQuestionIDs = data.AssessmentQuestionIDs; + return View(model); } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 44ae69f92b..525437093c 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -27,6 +27,7 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public int AdminUserId { get; set; } public bool IsNotBlank { get; set; } public string CompetenciesFileName { get; set; } + public List DefaultQuestionIDs { get; set; } public List AssessmentQuestionIDs { get; set; } public int? AddAssessmentQuestionOption { get; set; } public int CompetenciesToProcessCount { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs new file mode 100644 index 0000000000..428f7f22df --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +{ + public class AddAssessmentQuestionsFormData + { + public List DefaultAssessmentQuestionIDs { get; set; } + public List OtherAssessmentQuestionIDs { get; set; } + } +} diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs index b50b1dc6a1..024378c538 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs @@ -1,13 +1,26 @@ using DigitalLearningSolutions.Data.Models.Frameworks; +using DigitalLearningSolutions.Web.Helpers; using Microsoft.AspNetCore.Mvc.Rendering; using System.Collections.Generic; namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { - public class AddAssessmentQuestionsViewModel + public class AddAssessmentQuestionsViewModel( + DetailFramework framework, + int newCompetencies, + int existingCompetencies, + IEnumerable defaultQuestions, + SelectList questionSelectList + ) : AddAssessmentQuestionsFormData { - public DetailFramework Framework { get; set; } - public IEnumerable? FrameworkDefaultQuestions { get; set; } - public SelectList? QuestionSelectList { get; set; } + public int FrameworkID { get; set; } = framework.ID; + public string FrameworkName { get; set; } = framework.FrameworkName; + public string FrameworkVocabularySingular { get; set; } = FrameworkVocabularyHelper.VocabularySingular(framework.FrameworkConfig); + public string FrameworkVocabularyPlural { get; set; } = FrameworkVocabularyHelper.VocabularyPlural(framework.FrameworkConfig); + public int PublishStatusID { get; set; } = framework.PublishStatusID; + public int NewCompetencies { get; set; } = newCompetencies; + public int ExistingCompetencies { get; set; } = existingCompetencies; + public IEnumerable? DefaultQuestions { get; set; } = defaultQuestions; + public SelectList? QuestionSelectList { get; set; } = questionSelectList; } } From 0c2c9952a15ada59b6be61ec2bd81db944b080e3 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 31 Dec 2024 16:36:33 +0000 Subject: [PATCH 153/271] TD-5155 Implements conditional preselected checkboxes for default questions --- .../ImportCompetencies.cs | 19 ++- .../Models/BulkCompetenciesData.cs | 7 +- .../Import/AddAssessmentQuestionsFormData.cs | 2 + .../Import/AddAssessmentQuestionsViewModel.cs | 15 ++- .../Import/AddAssessmentQuestions.cshtml | 86 ++++++++++++++ .../Developer/Import/ImportCompleted.cshtml | 108 +++++++++--------- .../Developer/Import/ImportFailed.cshtml | 2 +- .../Frameworks/Developer/Import/Index.cshtml | 2 +- .../Developer/Import/UploadResults.cshtml | 2 +- 9 files changed, 177 insertions(+), 66 deletions(-) create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index d9cbb44318..681d019a2c 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -4,9 +4,12 @@ using DigitalLearningSolutions.Web.Models; using DigitalLearningSolutions.Web.Services; using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import; +using DocumentFormat.OpenXml.Office2010.ExcelAc; using GDS.MultiPageFormData.Enums; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; +using Microsoft.DotNet.Scaffolding.Shared.Project; +using System.Collections.Generic; using System.IO; using System.Linq; @@ -89,7 +92,7 @@ public IActionResult ImportCompleted() catch (InvalidHeadersException) { FileHelper.DeleteFile(webHostEnvironment, data.CompetenciesFileName); - return View("ImportFailed"); + return View("Developer/Import/ImportFailed"); } } [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions")] @@ -98,6 +101,16 @@ public IActionResult AddAssessmentQuestions() var data = GetBulkUploadData(); var adminId = GetAdminId(); var defaultQuestions = frameworkService.GetFrameworkDefaultQuestionsById(data.FrameworkId, adminId); + if (!data.DefaultQuestionIDs.Any() && defaultQuestions.Any() && data.AddDefaultAssessmentQuestions == true) + { + var defaultQuestionsList = new List(); + foreach (var question in defaultQuestions) + { + defaultQuestionsList.Add(question.ID); + } + data.DefaultQuestionIDs = defaultQuestionsList; + setBulkUploadData(data); + } var questionList = frameworkService.GetAssessmentQuestions(data.FrameworkId, adminId).ToList(); var questionSelectList = new SelectList(questionList, "ID", "Label"); var model = new AddAssessmentQuestionsViewModel @@ -111,9 +124,11 @@ public IActionResult AddAssessmentQuestions() defaultQuestions, questionSelectList ); + model.AddDefaultAssessmentQuestions = data.AddDefaultAssessmentQuestions; + model.AddCustomAssessmentQuestion = data.AddCustomAssessmentQuestion; model.DefaultAssessmentQuestionIDs = data.DefaultQuestionIDs; model.OtherAssessmentQuestionIDs = data.AssessmentQuestionIDs; - return View(model); + return View("Developer/Import/AddAssessmentQuestions", model); } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 525437093c..69800b0187 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -27,9 +27,10 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public int AdminUserId { get; set; } public bool IsNotBlank { get; set; } public string CompetenciesFileName { get; set; } - public List DefaultQuestionIDs { get; set; } - public List AssessmentQuestionIDs { get; set; } - public int? AddAssessmentQuestionOption { get; set; } + public List DefaultQuestionIDs { get; set; } = []; + public List AssessmentQuestionIDs { get; set; } = []; + public bool AddDefaultAssessmentQuestions { get; set; } = true; + public bool AddCustomAssessmentQuestion { get; set; } = false; public int CompetenciesToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } public int CompetenciesToUpdateCount { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs index 428f7f22df..aa1e0ab2ce 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs @@ -4,6 +4,8 @@ namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { public class AddAssessmentQuestionsFormData { + public bool AddDefaultAssessmentQuestions { get; set; } + public bool AddCustomAssessmentQuestion { get; set; } public List DefaultAssessmentQuestionIDs { get; set; } public List OtherAssessmentQuestionIDs { get; set; } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs index 024378c538..bfd1cf3d12 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs @@ -6,18 +6,21 @@ namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { public class AddAssessmentQuestionsViewModel( - DetailFramework framework, + int frameworkId, + string frameworkName, + string frameworkVocabulary, + int publishStatusId, int newCompetencies, int existingCompetencies, IEnumerable defaultQuestions, SelectList questionSelectList ) : AddAssessmentQuestionsFormData { - public int FrameworkID { get; set; } = framework.ID; - public string FrameworkName { get; set; } = framework.FrameworkName; - public string FrameworkVocabularySingular { get; set; } = FrameworkVocabularyHelper.VocabularySingular(framework.FrameworkConfig); - public string FrameworkVocabularyPlural { get; set; } = FrameworkVocabularyHelper.VocabularyPlural(framework.FrameworkConfig); - public int PublishStatusID { get; set; } = framework.PublishStatusID; + public int FrameworkID { get; set; } = frameworkId; + public string FrameworkName { get; set; } = frameworkName; + public string FrameworkVocabularySingular { get; set; } = FrameworkVocabularyHelper.VocabularySingular(frameworkVocabulary); + public string FrameworkVocabularyPlural { get; set; } = FrameworkVocabularyHelper.VocabularyPlural(frameworkVocabulary); + public int PublishStatusID { get; set; } = publishStatusId; public int NewCompetencies { get; set; } = newCompetencies; public int ExistingCompetencies { get; set; } = existingCompetencies; public IEnumerable? DefaultQuestions { get; set; } = defaultQuestions; diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml new file mode 100644 index 0000000000..e3a0e29540 --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml @@ -0,0 +1,86 @@ +@using DigitalLearningSolutions.Web.Extensions +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import + +@model AddAssessmentQuestionsViewModel + +@{ + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + var checkListErrorClass = !ViewData.ModelState.IsValid && Model.AddDefaultAssessmentQuestions == null ? "nhsuk-form-group nhsuk-form-group--error" : "nhsuk-form-group"; + ViewData["Title"] = errorHasOccurred ? "Error: Add Assessment Questions" : "Add Assessment Questions"; + var cancelLinkData = Html.GetRouteValues(); + var hintTextString = Model.NewCompetencies != 0 && Model.ExistingCompetencies != 0 ? "new and/or updated " : (Model.NewCompetencies == 0 ? "updated " : "new "); +} + +@section NavMenuItems { + +} +@section NavBreadcrumbs { + +} +
    +
    +
    + @if (errorHasOccurred) + { + + } +
    +
    +
    + +

    + @ViewData["Title"] +

    +
    +
    + Which assessment questions would you like to attach to the @hintTextString @Model.FrameworkVocabularyPlural.ToLower()? +
    +
    + @if (Model.DefaultQuestions.Any()) + { +
    + + +
    +
    + +
    +
    + @foreach (var (defaultQuestion, index) in Model.DefaultQuestions.Select((t, i) => (t, i))) + { +
    + + +
    + } +
    +
    +
    + } +
    +
    +
    +
    +
    +
    +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 1db1e511ba..fcabc89014 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -26,60 +26,64 @@
    } -

    Delegate file uploaded

    -
    -

    @(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

    -
      -
    • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
    • -
    • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
    • -
    • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
    • - @if (Model.ErrorCount > 0) - { -
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
    • - } - else - { -
    • No errors
    • - } -
    - @if (Model.ErrorCount == 0) - { - Continue - } - else - { -

    Check the information below. You will need fix these errors before continuing or remove the rows with errors from your spreadsheet:

    -
    - - Error: @Model.ErrorCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ErrorCount == 1 ? "row" : "rows") contain errors and cannot be processed - -
    - @foreach (var (rowNumber, errorMessage) in Model.Errors) +
    +
    +

    Delegate file uploaded

    +
    +

    @(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

    +
      +
    • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
    • +
    • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
    • +
    • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
    • + @if (Model.ErrorCount > 0) { -
      -
      - Row @rowNumber -
      -
      - @errorMessage -
      - -
      +
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
    • } -
    -
    -

    Upload corrected file

    -

    - Once you have made corrections to the Excel competency workbook to address the errors above, save and restart the upload process. -

    -
    + else + { +
  • No errors
  • + } + + @if (Model.ErrorCount == 0) + { + Continue + } + else + { +

    Check the information below. You will need fix these errors before continuing or remove the rows with errors from your spreadsheet:

    +
    + + Error: @Model.ErrorCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ErrorCount == 1 ? "row" : "rows") contain errors and cannot be processed + +
    + @foreach (var (rowNumber, errorMessage) in Model.Errors) + { +
    +
    + Row @rowNumber +
    +
    + @errorMessage +
    + +
    + } +
    +
    +

    Upload corrected file

    +

    + Once you have made corrections to the Excel competency workbook to address the errors above, save and restart the upload process. +

    + - - - + + + - - - } - + + + } + +
    +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml index c16803e9df..1001851c70 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportFailed.cshtml @@ -30,7 +30,7 @@

    Import failed

    -
    +

    The file that you uploaded either does not have the correct column headers on the first row or is not formatted as a table.

    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 649f7a608f..a11a391b24 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -31,7 +31,7 @@ }

    Bulk upload @(Model.IsNotBlank ? "or update" : "") @Model.FrameworkVocabularyPlural.ToLower()

    -
    +
    @if (Model.PublishStatusID == 3) { diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index 16aac10fde..d83d3ca428 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -30,7 +30,7 @@

    Import competencies complete

    -
    +

    Summary of results:

    • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
    • From fa36c9a1c50a5c6e69aa1ae3ba4701adee356cd6 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 2 Jan 2025 11:35:02 +0000 Subject: [PATCH 154/271] TD-5155 Implements add assessment questions form view --- .../ImportCompetencies.cs | 14 ++++- .../Models/BulkCompetenciesData.cs | 2 +- .../Import/AddAssessmentQuestionsFormData.cs | 2 +- .../Import/AddAssessmentQuestions.cshtml | 62 ++++++++++++------- 4 files changed, 55 insertions(+), 25 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 681d019a2c..62dbd65315 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -127,9 +127,21 @@ public IActionResult AddAssessmentQuestions() model.AddDefaultAssessmentQuestions = data.AddDefaultAssessmentQuestions; model.AddCustomAssessmentQuestion = data.AddCustomAssessmentQuestion; model.DefaultAssessmentQuestionIDs = data.DefaultQuestionIDs; - model.OtherAssessmentQuestionIDs = data.AssessmentQuestionIDs; + model.CustomAssessmentQuestionID = data.CustomAssessmentQuestionID; return View("Developer/Import/AddAssessmentQuestions", model); } + [HttpPost] + [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions")] + public IActionResult AddAssessmentQuestions(AddAssessmentQuestionsFormData model) + { + var data = GetBulkUploadData(); + data.AddDefaultAssessmentQuestions = model.AddDefaultAssessmentQuestions; + data.AddCustomAssessmentQuestion = model.AddCustomAssessmentQuestion; + data.DefaultQuestionIDs = model.DefaultAssessmentQuestionIDs; + data.CustomAssessmentQuestionID = model.CustomAssessmentQuestionID; + setBulkUploadData(data); + return RedirectToAction("AddQuestionsToWhichCompetencies"); + } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { TempData.Clear(); diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 69800b0187..2a8e40562d 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -28,7 +28,7 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public bool IsNotBlank { get; set; } public string CompetenciesFileName { get; set; } public List DefaultQuestionIDs { get; set; } = []; - public List AssessmentQuestionIDs { get; set; } = []; + public int CustomAssessmentQuestionID { get; set; } public bool AddDefaultAssessmentQuestions { get; set; } = true; public bool AddCustomAssessmentQuestion { get; set; } = false; public int CompetenciesToProcessCount { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs index aa1e0ab2ce..5db7d3b97a 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs @@ -7,6 +7,6 @@ public class AddAssessmentQuestionsFormData public bool AddDefaultAssessmentQuestions { get; set; } public bool AddCustomAssessmentQuestion { get; set; } public List DefaultAssessmentQuestionIDs { get; set; } - public List OtherAssessmentQuestionIDs { get; set; } + public int CustomAssessmentQuestionID { get; set; } } } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml index e3a0e29540..ae9cdec7c2 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml @@ -33,11 +33,11 @@
      @if (errorHasOccurred) { - + } -
      +
      -
      +

      @ViewData["Title"] @@ -50,37 +50,55 @@ @if (Model.DefaultQuestions.Any()) {
      - + -
      -
      +
      + choose which default questions associated with this framework to add to the imported and/or updated @Model.FrameworkVocabularyPlural.ToLower() +
      +
      -
      -
      - @foreach (var (defaultQuestion, index) in Model.DefaultQuestions.Select((t, i) => (t, i))) - { -
      - - -
      - } +
      +
      + @foreach (var (defaultQuestion, index) in Model.DefaultQuestions.Select((t, i) => (t, i))) + { +
      + + +
      + } +
      } +
      + + +
      +
      + + + +

      +
      +
    From cdb22d1711cff67ed6938af9d168f7a7b51b8b15 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 2 Jan 2025 11:47:10 +0000 Subject: [PATCH 155/271] Tweaks post data processing to handle storing false values --- .../FrameworksController/ImportCompetencies.cs | 18 ++++++++++++++++-- .../Models/BulkCompetenciesData.cs | 2 +- .../Import/AddAssessmentQuestionsFormData.cs | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 62dbd65315..1e77c8f05c 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -136,9 +136,23 @@ public IActionResult AddAssessmentQuestions(AddAssessmentQuestionsFormData model { var data = GetBulkUploadData(); data.AddDefaultAssessmentQuestions = model.AddDefaultAssessmentQuestions; + if (model.AddDefaultAssessmentQuestions) + { + data.DefaultQuestionIDs = model.DefaultAssessmentQuestionIDs; + } + else + { + data.DefaultQuestionIDs = []; + } data.AddCustomAssessmentQuestion = model.AddCustomAssessmentQuestion; - data.DefaultQuestionIDs = model.DefaultAssessmentQuestionIDs; - data.CustomAssessmentQuestionID = model.CustomAssessmentQuestionID; + if (model.AddCustomAssessmentQuestion) + { + data.CustomAssessmentQuestionID = model.CustomAssessmentQuestionID; + } + else + { + data.CustomAssessmentQuestionID = null; + } setBulkUploadData(data); return RedirectToAction("AddQuestionsToWhichCompetencies"); } diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 2a8e40562d..bf7cb9b61d 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -28,7 +28,7 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public bool IsNotBlank { get; set; } public string CompetenciesFileName { get; set; } public List DefaultQuestionIDs { get; set; } = []; - public int CustomAssessmentQuestionID { get; set; } + public int? CustomAssessmentQuestionID { get; set; } public bool AddDefaultAssessmentQuestions { get; set; } = true; public bool AddCustomAssessmentQuestion { get; set; } = false; public int CompetenciesToProcessCount { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs index 5db7d3b97a..4b90f1198c 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsFormData.cs @@ -7,6 +7,6 @@ public class AddAssessmentQuestionsFormData public bool AddDefaultAssessmentQuestions { get; set; } public bool AddCustomAssessmentQuestion { get; set; } public List DefaultAssessmentQuestionIDs { get; set; } - public int CustomAssessmentQuestionID { get; set; } + public int? CustomAssessmentQuestionID { get; set; } } } From ed5bc7359757b1deebcda599abc47cfe0e5de360 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 2 Jan 2025 17:19:57 +0000 Subject: [PATCH 156/271] TD-5158 Implements add questions to which competencies form --- .../ImportCompetencies.cs | 47 ++++++++-- .../Models/BulkCompetenciesData.cs | 5 +- ...ddQuestionsToWhichCompetenciesViewModel.cs | 41 +++++++++ .../ImportCompetenciesPreProcessViewModel.cs | 5 -- .../AddQuestionsToWhichCompetencies.cshtml | 87 +++++++++++++++++++ 5 files changed, 173 insertions(+), 12 deletions(-) create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 1e77c8f05c..1a6150492c 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -1,14 +1,14 @@ -using ClosedXML.Excel; +using AngleSharp.Dom; +using ClosedXML.Excel; using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Web.Helpers; using DigitalLearningSolutions.Web.Models; using DigitalLearningSolutions.Web.Services; using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import; -using DocumentFormat.OpenXml.Office2010.ExcelAc; +using DocumentFormat.OpenXml.EMMA; using GDS.MultiPageFormData.Enums; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; -using Microsoft.DotNet.Scaffolding.Shared.Project; using System.Collections.Generic; using System.IO; using System.Linq; @@ -85,7 +85,7 @@ public IActionResult ImportCompleted() var resultsModel = new ImportCompetenciesPreProcessViewModel(results, data) { IsNotBlank = data.IsNotBlank, TabName = data.TabName }; data.CompetenciesToProcessCount = resultsModel.ToProcessCount; data.CompetenciesToAddCount = resultsModel.CompetenciesToAddCount; - data.CompetenciesToUpdateCount = resultsModel.CompetenciesToUpdateCount; + data.CompetenciesToUpdateCount = resultsModel.ToUpdateOrSkipCount; setBulkUploadData(data); return View("Developer/Import/ImportCompleted", resultsModel); } @@ -153,8 +153,45 @@ public IActionResult AddAssessmentQuestions(AddAssessmentQuestionsFormData model { data.CustomAssessmentQuestionID = null; } + if (data.CompetenciesToUpdateCount > 0) + { + data.AddAssessmentQuestionsOption = 2; + setBulkUploadData(data); + return RedirectToAction("AddQuestionsToWhichCompetencies", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } + else + { + data.AddAssessmentQuestionsOption = 1; + setBulkUploadData(data); + return RedirectToAction("Summary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } + } + [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions/Competencies")] + public IActionResult AddQuestionsToWhichCompetencies() + { + var data = GetBulkUploadData(); + var model = new AddQuestionsToWhichCompetenciesViewModel + ( + data.FrameworkId, + data.FrameworkName, + data.FrameworkVocubulary, + data.DefaultQuestionIDs, + data.CustomAssessmentQuestionID, + data.AddAssessmentQuestionsOption, + data.CompetenciesToProcessCount, + data.CompetenciesToAddCount, + data.CompetenciesToUpdateCount + ); + return View("Developer/Import/AddQuestionsToWhichCompetencies", model); + } + [HttpPost] + [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions/Competencies")] + public IActionResult AddQuestionsToWhichCompetencies(int AddAssessmentQuestionsOption) + { + var data = GetBulkUploadData(); + data.AddAssessmentQuestionsOption = AddAssessmentQuestionsOption; setBulkUploadData(data); - return RedirectToAction("AddQuestionsToWhichCompetencies"); + return RedirectToAction("Summary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index bf7cb9b61d..738acbf9ea 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -27,10 +27,11 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public int AdminUserId { get; set; } public bool IsNotBlank { get; set; } public string CompetenciesFileName { get; set; } - public List DefaultQuestionIDs { get; set; } = []; - public int? CustomAssessmentQuestionID { get; set; } public bool AddDefaultAssessmentQuestions { get; set; } = true; public bool AddCustomAssessmentQuestion { get; set; } = false; + public List DefaultQuestionIDs { get; set; } = []; + public int? CustomAssessmentQuestionID { get; set; } + public int AddAssessmentQuestionsOption { get; set; } //1 = only added, 2 = added and updated, 3 = all uploaded public int CompetenciesToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } public int CompetenciesToUpdateCount { get; set; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs new file mode 100644 index 0000000000..d6cbae84ca --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs @@ -0,0 +1,41 @@ +using DigitalLearningSolutions.Web.Helpers; +using System.Collections.Generic; +using System.Runtime.Versioning; + +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +{ + public class AddQuestionsToWhichCompetenciesViewModel + { + public AddQuestionsToWhichCompetenciesViewModel + ( + int frameworkId, + string frameworkName, + string frameworkVocabulary, + List defaultQuestions, + int? customQuestionId, + int addAssessmentQuestionsOption, + int competenciesToProcessCount, + int competenciesToAddCount, + int competenciesToUpdateCount) + { + FrameworkID = frameworkId; + FrameworkName = frameworkName; + FrameworkVocabularySingular = FrameworkVocabularyHelper.VocabularySingular(frameworkVocabulary); + FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(frameworkVocabulary); + TotalQuestions = defaultQuestions.Count + (customQuestionId != null ? 1 : 0); + AddAssessmentQuestionsOption = addAssessmentQuestionsOption; + CompetenciesToProcessCount = competenciesToProcessCount; + CompetenciesToAddCount = competenciesToAddCount; + CompetenciesToUpdateCount = competenciesToUpdateCount; + } + public int FrameworkID { get; set; } + public string FrameworkName { get; set; } + public string FrameworkVocabularySingular { get; set; } + public string FrameworkVocabularyPlural { get; set; } + public int TotalQuestions { get; set; } + public int AddAssessmentQuestionsOption { get; set; } = 1; //1 = only added, 2 = added and updated, 3 = all uploaded + public int CompetenciesToProcessCount { get; set; } + public int CompetenciesToAddCount { get; set; } + public int CompetenciesToUpdateCount { get; set; } + } +} diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs index f92f056115..67f604723a 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs @@ -18,8 +18,6 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet ToProcessCount = bulkCompetenciesResult.ProcessedCount; CompetenciesToAddCount = bulkCompetenciesResult.CompetencyAddedCount; ToUpdateOrSkipCount = bulkCompetenciesResult.CompetencyUpdatedCount; - CompetencyGroupsToAddCount = bulkCompetenciesResult.GroupAddedCount; - CompetencyGroupsToUpdateCount = bulkCompetenciesResult.GroupUpdatedCount; Errors = bulkCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason, FrameworkVocabularyHelper.VocabularySingular(bulkCompetenciesData.FrameworkVocubulary)))); } public string? FrameworkName { get; set; } @@ -30,9 +28,6 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet public int ErrorCount => Errors.Count(); public int ToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } - public int CompetenciesToUpdateCount { get; set; } - public int CompetencyGroupsToAddCount { get; set; } - public int CompetencyGroupsToUpdateCount { get; set; } public int ToUpdateOrSkipCount { get; set; } public string? ImportFile { get; set; } public bool IsNotBlank { get; set; } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml new file mode 100644 index 0000000000..bb5a3b3a5f --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml @@ -0,0 +1,87 @@ +@using DigitalLearningSolutions.Web.Extensions +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import + +@model AddQuestionsToWhichCompetenciesViewModel + +@{ + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + ViewData["Title"] = errorHasOccurred ? "Error: Add Assessment Questions" : "Add Assessment Questions"; + var cancelLinkData = Html.GetRouteValues(); +} + +@section NavMenuItems { + +} +@section NavBreadcrumbs { + +} +
    +
    +
    +
    +
    + +

    + Which @Model.FrameworkVocabularyPlural.ToLower() should the questions be added to? +

    +
    +
    + Choose which @Model.FrameworkVocabularyPlural.ToLower() you want to add the @Model.TotalQuestions assessment questions to +
    +
    + Select one option +
    +
    +
    + @if (Model.CompetenciesToAddCount > 0) + { +
    + + +
    + @Model.TotalQuestions assessment questions will be added to the @Model.CompetenciesToAddCount new @Model.FrameworkVocabularyPlural.ToLower() +
    +
    + } +
    + + +
    + @(Model.CompetenciesToAddCount > 0 ? Model.CompetenciesToAddCount + " new @Model.FrameworkVocabularyPlural.ToLower() and only those of the " : "Only those of the ") @Model.CompetenciesToUpdateCount existing @Model.FrameworkVocabularyPlural.ToLower() that have been modified in the sheet will have the assessment questions added +
    +
    +
    + + +
    + All @(Model.CompetenciesToProcessCount) @Model.FrameworkVocabularyPlural.ToLower() in the sheet that are will have the assessment questions added to them +
    +
    +
    +
    + +
    + Back + +
    + +
    +
    +
    From 81ec4fb59de0d420ef3c1918b147727073911132 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 2 Jan 2025 17:22:41 +0000 Subject: [PATCH 157/271] Removes spurious usings --- .../Controllers/FrameworksController/ImportCompetencies.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 1a6150492c..68d3e26d6f 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -1,11 +1,9 @@ -using AngleSharp.Dom; -using ClosedXML.Excel; +using ClosedXML.Excel; using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Web.Helpers; using DigitalLearningSolutions.Web.Models; using DigitalLearningSolutions.Web.Services; using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import; -using DocumentFormat.OpenXml.EMMA; using GDS.MultiPageFormData.Enums; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; From 4fe8778f750984884a10503bd4943e6ba3a2fc14 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 3 Jan 2025 11:24:40 +0000 Subject: [PATCH 158/271] TD-5219 Improvements to pre-processing summary and errors --- .../Frameworks/Import/BulkCompetency.cs | 2 +- .../Frameworks/Import/CompetencyTableRow.cs | 9 +++-- .../Import/ImportCompetenciesResult.cs | 18 ++++++++++ .../ImportCompetencies.cs | 2 +- .../ImportCompetenciesFromFileService.cs | 34 +++++++++++++------ .../ImportCompetenciesPreProcessViewModel.cs | 8 ++++- .../Developer/Import/ImportCompleted.cshtml | 2 ++ 7 files changed, 59 insertions(+), 16 deletions(-) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs index 298639d4c7..e59ba301be 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/BulkCompetency.cs @@ -8,7 +8,7 @@ namespace DigitalLearningSolutions.Data.Models.Frameworks.Import { public class BulkCompetency { - public int? id { get; set; } + public int? ID { get; set; } public string? CompetencyGroup { get; set; } public string? GroupDescription { get; set; } public string? Competency { get; set; } diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index 1f99fa9550..afed88f1e6 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -12,7 +12,8 @@ public enum RowStatus CompetencyGroupInserted, CompetencyGroupUpdated, CompetencyGroupAndCompetencyUpdated, - InvalidAlwaysShowDescription + InvalidAlwaysShowDescription, + InvalidId } public class CompetencyTableRow : BulkCompetency { @@ -25,7 +26,7 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) } RowNumber = row.RowNumber(); - id = row.Cell(1).GetValue(); + ID = row.Cell(1).GetValue(); CompetencyGroup = row.Cell(2).GetValue(); GroupDescription = row.Cell(3).GetValue(); Competency = row.Cell(4).GetValue(); @@ -57,6 +58,10 @@ public bool Validate() { Error = ImportCompetenciesResult.ErrorReason.InvalidAlwaysShowDescription; } + else if (RowStatus == RowStatus.InvalidId) + { + Error = ImportCompetenciesResult.ErrorReason.InvalidId; + } return !Error.HasValue; } diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs index 53f0beed1a..1f99a35a82 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs @@ -26,6 +26,21 @@ IReadOnlyCollection competencyTableRows GroupAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyGroupInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped); Errors = competencyTableRows.Where(dr => dr.Error.HasValue).Select(dr => (dr.RowNumber, dr.Error!.Value)); + FlagCount = competencyTableRows + .Where(row => !string.IsNullOrWhiteSpace(row.FlagsCsv)) + .SelectMany(static row => row.FlagsCsv.Split(',', StringSplitOptions.RemoveEmptyEntries)) + .Count(); + DistinctFlagsCount = competencyTableRows + .Where(row => !string.IsNullOrWhiteSpace(row.FlagsCsv)) + .SelectMany(row => row.FlagsCsv.Split(',', StringSplitOptions.RemoveEmptyEntries)) + .Select(flag => flag.Trim()) + .Distinct() + .Count(); + CompetencyGroupCount = competencyTableRows + .Where(row => !string.IsNullOrWhiteSpace(row.CompetencyGroup)) + .Select(static row => row.CompetencyGroup) + .Distinct() + .Count(); } public IEnumerable<(int RowNumber, ErrorReason Reason)>? Errors { get; set; } @@ -35,5 +50,8 @@ IReadOnlyCollection competencyTableRows public int GroupAddedCount { get; set; } public int GroupUpdatedCount { get; set; } public int SkippedCount { get; set; } + public int FlagCount { get; set; } + public int DistinctFlagsCount { get; set; } + public int CompetencyGroupCount { get; set; } } } diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 68d3e26d6f..ecbb7a2a9e 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -79,7 +79,7 @@ public IActionResult ImportCompleted() var workbook = new XLWorkbook(filePath); try { - var results = importCompetenciesFromFileService.PreProcessCompetenciesTable(workbook, data.FrameworkVocubulary); + var results = importCompetenciesFromFileService.PreProcessCompetenciesTable(workbook, data.FrameworkVocubulary, data.FrameworkId); var resultsModel = new ImportCompetenciesPreProcessViewModel(results, data) { IsNotBlank = data.IsNotBlank, TabName = data.TabName }; data.CompetenciesToProcessCount = resultsModel.ToProcessCount; data.CompetenciesToAddCount = resultsModel.CompetenciesToAddCount; diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index d8611a86f8..c5c82281f6 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -16,7 +16,7 @@ namespace DigitalLearningSolutions.Web.Services public interface IImportCompetenciesFromFileService { byte[] GetCompetencyFileForFramework(int frameworkId, bool isBlank, string vocabulary); - public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary); + public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary, int frameworkId); public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary); } public class ImportCompetenciesFromFileService : IImportCompetenciesFromFileService @@ -30,27 +30,36 @@ IFrameworkService frameworkService { this.frameworkService = frameworkService; } - public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary) + public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary, int frameworkId) { var table = OpenCompetenciesTable(workbook, vocabulary); var competencyRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); + var existingCompetencies = frameworkService.GetBulkCompetenciesForFramework(frameworkId); + var existingIds = existingCompetencies.Select(bc => (int)bc.ID).ToList(); foreach (var competencyRow in competencyRows) { - PreProcessCompetencyRow(competencyRow); + PreProcessCompetencyRow(competencyRow, existingIds); } return new ImportCompetenciesResult(competencyRows); } - private void PreProcessCompetencyRow(CompetencyTableRow competencyRow) + private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List existingIds) { - competencyRow.Validate(); - if (competencyRow.id == null) + if (competencyRow.ID == null) { competencyRow.RowStatus = RowStatus.CompetencyInserted; } else { - competencyRow.RowStatus = RowStatus.CompetencyUpdated; + if (!existingIds.Contains((int)(competencyRow?.ID))) + { + competencyRow.RowStatus = RowStatus.InvalidId; + } + else + { + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + } } + competencyRow.Validate(); } public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary) { @@ -77,7 +86,12 @@ internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId) { var competenciesRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); - + + var competencyGroupCount = competenciesRows + .Where(row => !string.IsNullOrWhiteSpace(row.CompetencyGroup)) + .Select(row => row.CompetencyGroup) + .Distinct() + .Count(); foreach (var competencyRow in competenciesRows) { maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, competencyRow); @@ -167,13 +181,11 @@ public byte[] GetCompetencyFileForFramework(int frameworkId, bool blank, string } private void PopulateCompetenciesSheet(IXLWorkbook workbook, int frameworkId, bool blank, string vocabulary) { - - var competencyRecords = frameworkService.GetBulkCompetenciesForFramework(blank ? 0 : frameworkId); var competencies = competencyRecords.Select( x => new { - ID = x.id, + x.ID, x.CompetencyGroup, x.GroupDescription, x.Competency, diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs index 67f604723a..343ad1a74c 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs @@ -19,6 +19,9 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet CompetenciesToAddCount = bulkCompetenciesResult.CompetencyAddedCount; ToUpdateOrSkipCount = bulkCompetenciesResult.CompetencyUpdatedCount; Errors = bulkCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason, FrameworkVocabularyHelper.VocabularySingular(bulkCompetenciesData.FrameworkVocubulary)))); + FlagCount = bulkCompetenciesResult.FlagCount; + DistinctFlagsCount = bulkCompetenciesResult.DistinctFlagsCount; + CompetencyGroupCount = bulkCompetenciesResult.CompetencyGroupCount; } public string? FrameworkName { get; set; } public int PublishStatusID { get; set; } @@ -32,6 +35,9 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet public string? ImportFile { get; set; } public bool IsNotBlank { get; set; } public string TabName { get; set; } + public int FlagCount { get; set; } + public int DistinctFlagsCount { get; set; } + public int CompetencyGroupCount { get; set; } private static string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReason reason, string vocabularySingular) { @@ -42,7 +48,7 @@ private static string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReas ImportCompetenciesResult.ErrorReason.MissingCompetencyName => vocabularySingular + " is blank. " + vocabularySingular + " is a required field and cannot be left blank", ImportCompetenciesResult.ErrorReason.InvalidId => - "The ID provided does not match a " + vocabularySingular + " ID in this Framework", + "The ID provided does not match a " + vocabularySingular + " ID in this Framework. Leave the ID column blank for new competencies.", ImportCompetenciesResult.ErrorReason.TooLongCompetencyName => vocabularySingular + " must be 500 characters or less.", ImportCompetenciesResult.ErrorReason.InvalidAlwaysShowDescription => diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index fcabc89014..35e6884155 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -35,6 +35,8 @@
  • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
  • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
  • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
  • +
  • In @Model.CompetencyGroupCount @Model.FrameworkVocabularySingular.ToLower() groups
  • +
  • With a total of @Model.FlagCount flags assigned to Model.FrameworkVocabularyPlural.ToLower() (@Model.DistinctFlagsCount distinct flags)
  • @if (Model.ErrorCount > 0) {
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
  • From 0b4d3c1678c3d62c17656d8579e9daa77cdc1c35 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 3 Jan 2025 11:28:30 +0000 Subject: [PATCH 159/271] Adds missing @ to indicate inline code --- .../Views/Frameworks/Developer/Import/ImportCompleted.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 35e6884155..4a967c11fb 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -36,7 +36,7 @@
  • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
  • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
  • In @Model.CompetencyGroupCount @Model.FrameworkVocabularySingular.ToLower() groups
  • -
  • With a total of @Model.FlagCount flags assigned to Model.FrameworkVocabularyPlural.ToLower() (@Model.DistinctFlagsCount distinct flags)
  • +
  • With a total of @Model.FlagCount flags assigned to @Model.FrameworkVocabularyPlural.ToLower() (@Model.DistinctFlagsCount distinct flags)
  • @if (Model.ErrorCount > 0) {
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
  • From b7bb294c48fd8e8ad3f17313f448bc05a41e9542 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 3 Jan 2025 16:25:22 +0000 Subject: [PATCH 160/271] TD-5220 Implements store competency ordering option form --- .../Frameworks/Import/CompetencyTableRow.cs | 1 + .../Import/ImportCompetenciesResult.cs | 4 +- .../ImportCompetencies.cs | 26 +++++++ .../Models/BulkCompetenciesData.cs | 2 + .../ImportCompetenciesFromFileService.cs | 19 ++++- .../Import/AddAssessmentQuestionsViewModel.cs | 2 + ...ddQuestionsToWhichCompetenciesViewModel.cs | 1 + .../ApplyCompetencyOrderingViewModel.cs | 30 ++++++++ .../ImportCompetenciesPreProcessViewModel.cs | 2 + .../Import/AddAssessmentQuestions.cshtml | 3 +- .../AddQuestionsToWhichCompetencies.cshtml | 4 +- .../Import/ApplyCompetencyOrdering.cshtml | 75 +++++++++++++++++++ .../Developer/Import/ImportCompleted.cshtml | 21 ++++-- .../Frameworks/Developer/Import/Index.cshtml | 2 +- 14 files changed, 176 insertions(+), 16 deletions(-) create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ApplyCompetencyOrderingViewModel.cs create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index afed88f1e6..16ea0b9e52 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -9,6 +9,7 @@ public enum RowStatus CompetencyGroupAndCompetencyInserted, CompetencyInserted, CompetencyUpdated, + CompetencyUpdatedAndReordered, CompetencyGroupInserted, CompetencyGroupUpdated, CompetencyGroupAndCompetencyUpdated, diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs index 1f99a35a82..15f5136274 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs @@ -22,7 +22,8 @@ IReadOnlyCollection competencyTableRows { ProcessedCount = competencyTableRows.Count; CompetencyAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); - CompetencyUpdatedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdated); + CompetencyUpdatedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdated | dr.RowStatus == RowStatus.CompetencyUpdatedAndReordered); + CompetencyReorderedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdatedAndReordered); GroupAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyGroupInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped); Errors = competencyTableRows.Where(dr => dr.Error.HasValue).Select(dr => (dr.RowNumber, dr.Error!.Value)); @@ -47,6 +48,7 @@ IReadOnlyCollection competencyTableRows public int ProcessedCount { get; set; } public int CompetencyAddedCount { get; set; } public int CompetencyUpdatedCount { get; set; } + public int CompetencyReorderedCount { get; set; } public int GroupAddedCount { get; set; } public int GroupUpdatedCount { get; set; } public int SkippedCount { get; set; } diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index ecbb7a2a9e..fa2d3a5214 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -84,6 +84,7 @@ public IActionResult ImportCompleted() data.CompetenciesToProcessCount = resultsModel.ToProcessCount; data.CompetenciesToAddCount = resultsModel.CompetenciesToAddCount; data.CompetenciesToUpdateCount = resultsModel.ToUpdateOrSkipCount; + data.CompetenciesToReorderCount = results.CompetencyReorderedCount; setBulkUploadData(data); return View("Developer/Import/ImportCompleted", resultsModel); } @@ -93,6 +94,30 @@ public IActionResult ImportCompleted() return View("Developer/Import/ImportFailed"); } } + [Route("/Framework/{frameworkId}/{tabname}/Import/Ordering")] + public IActionResult ApplyCompetencyOrdering() + { + var data = GetBulkUploadData(); + if (data.CompetenciesToReorderCount > 0) + { + var model = new ApplyCompetencyOrderingViewModel(data.FrameworkId, data.FrameworkName, data.FrameworkVocubulary, data.CompetenciesToReorderCount, data.ReorderCompetenciesOption); + return View("Developer/Import/ApplyCompetencyOrdering", model); + } + return RedirectToAction("AddAssessmentQuestions", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } + [HttpPost] + [Route("/Framework/{frameworkId}/{tabname}/Import/Ordering")] + public IActionResult ApplyCompetencyOrdering(int reorderCompetenciesOption) + { + var data = GetBulkUploadData(); + + if (data.ReorderCompetenciesOption != reorderCompetenciesOption) + { + data.ReorderCompetenciesOption = reorderCompetenciesOption; + setBulkUploadData(data); + } + return RedirectToAction("AddAssessmentQuestions", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions")] public IActionResult AddAssessmentQuestions() { @@ -119,6 +144,7 @@ public IActionResult AddAssessmentQuestions() data.PublishStatusID, data.CompetenciesToAddCount, data.CompetenciesToUpdateCount, + data.CompetenciesToReorderCount, defaultQuestions, questionSelectList ); diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 738acbf9ea..2d3ce9e4ac 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -35,6 +35,8 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public int CompetenciesToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } public int CompetenciesToUpdateCount { get; set; } + public int CompetenciesToReorderCount { get; set; } + public int ReorderCompetenciesOption { get; set; } = 1; //1 = ignore order, 2 = apply order public int LastRowProcessed { get; set; } public int SubtotalCompetenciesAdded { get; set; } public int SubtotalCompetenciesUpdated { get; set; } diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index c5c82281f6..592d17c015 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -34,15 +34,16 @@ public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook { var table = OpenCompetenciesTable(workbook, vocabulary); var competencyRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); + var newCompetencyIds = competencyRows.Select(row => row.ID ?? 0).ToList(); var existingCompetencies = frameworkService.GetBulkCompetenciesForFramework(frameworkId); var existingIds = existingCompetencies.Select(bc => (int)bc.ID).ToList(); foreach (var competencyRow in competencyRows) { - PreProcessCompetencyRow(competencyRow, existingIds); + PreProcessCompetencyRow(competencyRow, newCompetencyIds, existingIds); } return new ImportCompetenciesResult(competencyRows); } - private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List existingIds) + private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List newIds, List existingIds) { if (competencyRow.ID == null) { @@ -50,13 +51,23 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List } else { - if (!existingIds.Contains((int)(competencyRow?.ID))) + var id = (int)(competencyRow?.ID); + if (!existingIds.Contains(id)) { competencyRow.RowStatus = RowStatus.InvalidId; } else { - competencyRow.RowStatus = RowStatus.CompetencyUpdated; + int originalIndex = existingIds.IndexOf(id); + int newIndex = newIds.IndexOf(id); + if(originalIndex == newIndex) + { + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + } + else + { + competencyRow.RowStatus = RowStatus.CompetencyUpdatedAndReordered; + } } } competencyRow.Validate(); diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs index bfd1cf3d12..204f7e49e2 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddAssessmentQuestionsViewModel.cs @@ -12,6 +12,7 @@ public class AddAssessmentQuestionsViewModel( int publishStatusId, int newCompetencies, int existingCompetencies, + int competenciesToReorderCount, IEnumerable defaultQuestions, SelectList questionSelectList ) : AddAssessmentQuestionsFormData @@ -23,6 +24,7 @@ SelectList questionSelectList public int PublishStatusID { get; set; } = publishStatusId; public int NewCompetencies { get; set; } = newCompetencies; public int ExistingCompetencies { get; set; } = existingCompetencies; + public int CompetenciesToReorderCount { get; set; } = competenciesToReorderCount; public IEnumerable? DefaultQuestions { get; set; } = defaultQuestions; public SelectList? QuestionSelectList { get; set; } = questionSelectList; } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs index d6cbae84ca..fa86ccc30a 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/AddQuestionsToWhichCompetenciesViewModel.cs @@ -37,5 +37,6 @@ public AddQuestionsToWhichCompetenciesViewModel public int CompetenciesToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } public int CompetenciesToUpdateCount { get; set; } + } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ApplyCompetencyOrderingViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ApplyCompetencyOrderingViewModel.cs new file mode 100644 index 0000000000..ee912de97f --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ApplyCompetencyOrderingViewModel.cs @@ -0,0 +1,30 @@ +using DigitalLearningSolutions.Web.Helpers; + +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +{ + public class ApplyCompetencyOrderingViewModel + { + public ApplyCompetencyOrderingViewModel + ( + int frameworkId, + string frameworkName, + string frameworkVocabulary, + int competenciesToReorderCount, + int reorderCompetenciesOption + ) + { + FrameworkID = frameworkId; + FrameworkName = frameworkName; + FrameworkVocabularySingular = FrameworkVocabularyHelper.VocabularySingular(frameworkVocabulary); + FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(frameworkVocabulary); + CompetenciesToReorderCount = competenciesToReorderCount; + ReorderCompetenciesOption = reorderCompetenciesOption; + } + public int FrameworkID { get; set; } + public string FrameworkName { get; set; } + public string FrameworkVocabularySingular { get; set; } + public string FrameworkVocabularyPlural { get; set; } + public int ReorderCompetenciesOption { get; set; } = 1; //1 = ignore order, 2 = apply order + public int CompetenciesToReorderCount { get; set; } + } +} diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs index 343ad1a74c..96b7935ea3 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesPreProcessViewModel.cs @@ -17,6 +17,7 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(bulkCompetenciesData.FrameworkVocubulary); ToProcessCount = bulkCompetenciesResult.ProcessedCount; CompetenciesToAddCount = bulkCompetenciesResult.CompetencyAddedCount; + CompetenciesToReorderCount = bulkCompetenciesResult.CompetencyReorderedCount; ToUpdateOrSkipCount = bulkCompetenciesResult.CompetencyUpdatedCount; Errors = bulkCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason, FrameworkVocabularyHelper.VocabularySingular(bulkCompetenciesData.FrameworkVocubulary)))); FlagCount = bulkCompetenciesResult.FlagCount; @@ -31,6 +32,7 @@ public ImportCompetenciesPreProcessViewModel(ImportCompetenciesResult bulkCompet public int ErrorCount => Errors.Count(); public int ToProcessCount { get; set; } public int CompetenciesToAddCount { get; set; } + public int CompetenciesToReorderCount { get; set; } public int ToUpdateOrSkipCount { get; set; } public string? ImportFile { get; set; } public bool IsNotBlank { get; set; } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml index ae9cdec7c2..9e6c443d05 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddAssessmentQuestions.cshtml @@ -96,9 +96,10 @@
    + Back - +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml index bb5a3b3a5f..0dcf3bc1f2 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml @@ -29,7 +29,7 @@
    -
    +

    @@ -81,7 +81,7 @@ Back - +

    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml new file mode 100644 index 0000000000..398343f461 --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml @@ -0,0 +1,75 @@ +@using DigitalLearningSolutions.Web.Extensions +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import + +@model ApplyCompetencyOrderingViewModel + +@{ + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + ViewData["Title"] = errorHasOccurred ? "Error: Add Assessment Questions" : "Add Assessment Questions"; + var cancelLinkData = Html.GetRouteValues(); +} + +@section NavMenuItems { + +} +@section NavBreadcrumbs { + +} +
    +
    +
    +
    +
    + +

    + Apply @Model.FrameworkVocabularySingular.ToLower() sequence changes? +

    +
    +
    + Your uploaded file includes changes to the sequence of existing @Model.FrameworkVocabularyPlural.ToLower(). Choose whether to store the changes to @Model.FrameworkVocabularySingular.ToLower() sequence during update. +
    +
    + Select an option +
    +
    +
    +
    + + +
    + @Model.FrameworkVocabularyPlural will be updated if they have changed but there sequence/order in the framework will not change. +
    +
    +
    + + +
    + The sequence of @Model.FrameworkVocabularyPlural.ToLower() in the framework will be changed to reflect the order in the sheet during processing. +
    +
    +
    +
    + +
    + Back + +
    + +
    +
    +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 4a967c11fb..961829e3d6 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -32,23 +32,30 @@

    @(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

      -
    • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") to process
    • -
    • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
    • -
    • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
    • -
    • In @Model.CompetencyGroupCount @Model.FrameworkVocabularySingular.ToLower() groups
    • -
    • With a total of @Model.FlagCount flags assigned to @Model.FrameworkVocabularyPlural.ToLower() (@Model.DistinctFlagsCount distinct flags)
    • +
    • @Model.ToProcessCount @(Model.ToProcessCount == 1 ? "row" : "rows") uploaded
    • @if (Model.ErrorCount > 0) {
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "row" : "rows") containing errors that cannot be processed
    • } else { +
    • @Model.CompetenciesToAddCount new @(Model.CompetenciesToAddCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) to add
    • +
    • @Model.ToUpdateOrSkipCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ToUpdateOrSkipCount == 1 ? "record" : "records") to update (or skip if unchanged)
    • +
    • In @Model.CompetencyGroupCount @Model.FrameworkVocabularySingular.ToLower() groups
    • +
    • With @Model.FlagCount flags assigned to @Model.FrameworkVocabularyPlural.ToLower() (@Model.DistinctFlagsCount distinct flags)
    • + @if (Model.CompetenciesToReorderCount > 0) + { + +
    • + @Model.CompetenciesToReorderCount existing @Model.FrameworkVocabularySingular.ToLower() @(Model.CompetenciesToReorderCount == 1 ? "record" : "records") have changed sequence in your uploaded sheet. You can choose whether to fix them in the new order next. +
    • + }
    • No errors
    • }
    @if (Model.ErrorCount == 0) { - Continue + Continue } else { @@ -85,7 +92,7 @@ } - +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index a11a391b24..78a5fb95bd 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -110,7 +110,7 @@ - +
    From 6fd7386cb9c22a4f69f94f02e962e3e5ed4eecf6 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 6 Jan 2025 08:47:24 +0000 Subject: [PATCH 161/271] TD-5220 passes ids of uploaded competencies to get order of stored competencies --- .../DataServices/FrameworkDataService.cs | 12 ++++++++++++ .../Services/FrameworkService.cs | 6 ++++++ .../Services/ImportCompetenciesFromFileService.cs | 3 +-- .../Developer/Import/ImportCompleted.cshtml | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index f43879edcf..63a8bc31a4 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -100,6 +100,7 @@ bool zeroBased Competency? GetFrameworkCompetencyForPreview(int frameworkCompetencyId); IEnumerable GetBulkCompetenciesForFramework(int frameworkId); + List GetFrameworkCompetencyOrder(int frameworkId, List frameworkCompetencyIds); // Comments: IEnumerable GetCommentsForFrameworkId(int frameworkId, int adminId); @@ -2429,5 +2430,16 @@ Competencies AS c INNER JOIN } } + public List GetFrameworkCompetencyOrder(int frameworkId, List frameworkCompetencyIds) + { + return connection.Query( + @"SELECT fc.ID + FROM FrameworkCompetencies AS fc INNER JOIN + FrameworkCompetencyGroups AS fcg ON fc.FrameworkCompetencyGroupID = fcg.ID + WHERE (fc.FrameworkID = @frameworkId) AND (fc.ID IN @frameworkCompetencyIds) + ORDER BY fcg.Ordering, fc.Ordering", + new { frameworkId, frameworkCompetencyIds } + ).ToList(); + } } } diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index 2a49a0a8b3..8c7de151d9 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -57,6 +57,7 @@ public interface IFrameworkService int GetMaxFrameworkCompetencyGroupID(); IEnumerable GetBulkCompetenciesForFramework(int frameworkId); + List GetFrameworkCompetencyOrder(int frameworkId, List frameworkCompetencyIds); // Assessment questions: IEnumerable GetAllCompetencyQuestions(int adminId); @@ -386,6 +387,11 @@ public IEnumerable GetBulkCompetenciesForFramework(int framework return frameworkDataService.GetBulkCompetenciesForFramework(frameworkId); } + public List GetFrameworkCompetencyOrder(int frameworkId, List frameworkCompetencyIds) + { + return frameworkDataService.GetFrameworkCompetencyOrder(frameworkId, frameworkCompetencyIds); + } + public CollaboratorNotification? GetCollaboratorNotification(int id, int invitedByAdminId) { return frameworkDataService.GetCollaboratorNotification(id, invitedByAdminId); diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 592d17c015..a26793b651 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -35,8 +35,7 @@ public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook var table = OpenCompetenciesTable(workbook, vocabulary); var competencyRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); var newCompetencyIds = competencyRows.Select(row => row.ID ?? 0).ToList(); - var existingCompetencies = frameworkService.GetBulkCompetenciesForFramework(frameworkId); - var existingIds = existingCompetencies.Select(bc => (int)bc.ID).ToList(); + var existingIds = frameworkService.GetFrameworkCompetencyOrder(frameworkId, newCompetencyIds); foreach (var competencyRow in competencyRows) { PreProcessCompetencyRow(competencyRow, newCompetencyIds, existingIds); diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 961829e3d6..b127e53979 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -59,7 +59,7 @@ } else { -

    Check the information below. You will need fix these errors before continuing or remove the rows with errors from your spreadsheet:

    +

    Check the information below. You will need to fix these errors before continuing or remove the rows with errors from your spreadsheet:

    Error: @Model.ErrorCount @Model.FrameworkVocabularySingular.ToLower() @(Model.ErrorCount == 1 ? "row" : "rows") contain errors and cannot be processed From 885067dda5cee299920e7b8efbf8a0b53a4236cb Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 6 Jan 2025 09:10:57 +0000 Subject: [PATCH 162/271] TD-5220 Implements CancelImport method to clear down uploaded file and temp data --- .../FrameworksController/ImportCompetencies.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index fa2d3a5214..133efd717f 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -217,6 +217,15 @@ public IActionResult AddQuestionsToWhichCompetencies(int AddAssessmentQuestionsO setBulkUploadData(data); return RedirectToAction("Summary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); } + [Route("CancelImport")] + public IActionResult CancelImport() + { + var data = GetBulkUploadData(); + var frameworkId = data.FrameworkId; + FileHelper.DeleteFile(webHostEnvironment, data.CompetenciesFileName); + TempData.Clear(); + return RedirectToAction("ViewFramework", new { frameworkId, tabname = "Structure" }); + } private void setupBulkUploadData(int frameworkId, int adminUserID, string competenciessFileName, string tabName, bool isNotBlank) { TempData.Clear(); From 5ab4073e5c631502e00497959d4b04a057af707f Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 6 Jan 2025 16:38:10 +0000 Subject: [PATCH 163/271] TD-5162 Implements import summary screen --- .../ImportCompetencies.cs | 11 +- .../Import/ImportSummaryViewModel.cs | 41 +++++++ .../AddQuestionsToWhichCompetencies.cshtml | 4 +- .../Developer/Import/ImportSummary.cshtml | 110 ++++++++++++++++++ 4 files changed, 162 insertions(+), 4 deletions(-) create mode 100644 DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportSummaryViewModel.cs create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 133efd717f..08ff1eb0ff 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -187,7 +187,7 @@ public IActionResult AddAssessmentQuestions(AddAssessmentQuestionsFormData model { data.AddAssessmentQuestionsOption = 1; setBulkUploadData(data); - return RedirectToAction("Summary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + return RedirectToAction("ImportSummary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); } } [Route("/Framework/{frameworkId}/{tabname}/Import/AssessmentQuestions/Competencies")] @@ -215,7 +215,14 @@ public IActionResult AddQuestionsToWhichCompetencies(int AddAssessmentQuestionsO var data = GetBulkUploadData(); data.AddAssessmentQuestionsOption = AddAssessmentQuestionsOption; setBulkUploadData(data); - return RedirectToAction("Summary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + return RedirectToAction("ImportSummary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } + [Route("/Framework/{frameworkId}/{tabname}/Import/Summary")] + public IActionResult ImportSummary() + { + var data = GetBulkUploadData(); + var model = new ImportSummaryViewModel(data); + return View("Developer/Import/ImportSummary", model); } [Route("CancelImport")] public IActionResult CancelImport() diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportSummaryViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportSummaryViewModel.cs new file mode 100644 index 0000000000..f59c14f72d --- /dev/null +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportSummaryViewModel.cs @@ -0,0 +1,41 @@ +using DigitalLearningSolutions.Web.Helpers; +using DigitalLearningSolutions.Web.Models; +using System.Collections.Generic; + +namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +{ + public class ImportSummaryViewModel + { + public ImportSummaryViewModel(BulkCompetenciesData data) + { + FrameworkName = data.FrameworkName; + PublishStatusID = data.PublishStatusID; + FrameworkVocabularySingular = FrameworkVocabularyHelper.VocabularySingular(data.FrameworkVocubulary); + FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(data.FrameworkVocubulary); + ToProcessCount = data.CompetenciesToProcessCount; + CompetenciesToAddCount = data.CompetenciesToAddCount; + CompetenciesToReorderCount = data.CompetenciesToReorderCount; + ToUpdateOrSkipCount = data.CompetenciesToUpdateCount; + AddAssessmentQuestionsOption = data.AddAssessmentQuestionsOption; + AddDefaultAssessmentQuestions = data.AddDefaultAssessmentQuestions; + AddCustomAssessmentQuestion = data.AddCustomAssessmentQuestion; + DefaultAssessmentQuestionIDs = data.DefaultQuestionIDs; + CustomAssessmentQuestionID = data.CustomAssessmentQuestionID; + ReorderCompetenciesOption = data.ReorderCompetenciesOption; + } + public string? FrameworkName { get; set; } + public int PublishStatusID { get; set; } + public string FrameworkVocabularySingular { get; set; } + public string FrameworkVocabularyPlural { get; set; } + public int ToProcessCount { get; set; } + public int CompetenciesToAddCount { get; set; } + public int CompetenciesToReorderCount { get; set; } + public int ToUpdateOrSkipCount { get; set; } + public int AddAssessmentQuestionsOption { get; set; } = 1; //1 = only added, 2 = added and updated, 3 = all uploaded + public bool AddDefaultAssessmentQuestions { get; set; } + public bool AddCustomAssessmentQuestion { get; set; } + public List DefaultAssessmentQuestionIDs { get; set; } + public int? CustomAssessmentQuestionID { get; set; } + public int ReorderCompetenciesOption { get; set; } = 1; //1 = ignore order, 2 = apply order + } +} diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml index 0dcf3bc1f2..eef8dbabe8 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/AddQuestionsToWhichCompetencies.cshtml @@ -59,10 +59,10 @@
    - @(Model.CompetenciesToAddCount > 0 ? Model.CompetenciesToAddCount + " new @Model.FrameworkVocabularyPlural.ToLower() and only those of the " : "Only those of the ") @Model.CompetenciesToUpdateCount existing @Model.FrameworkVocabularyPlural.ToLower() that have been modified in the sheet will have the assessment questions added + @(Model.CompetenciesToAddCount > 0 ? Model.CompetenciesToAddCount + $" new {@Model.FrameworkVocabularyPlural.ToLower()} and only those of the " : "Only those of the ") @Model.CompetenciesToUpdateCount existing @Model.FrameworkVocabularyPlural.ToLower() that have been modified in the sheet will have the assessment questions added
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml new file mode 100644 index 0000000000..7fd3ada28f --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -0,0 +1,110 @@ +@inject IConfiguration Configuration +@using DigitalLearningSolutions.Web.Extensions +@using DigitalLearningSolutions.Web.ViewModels.Frameworks.Import +@using Microsoft.Extensions.Configuration +@model ImportSummaryViewModel +@{ + ViewData["Title"] = "Framework - Import Competencies"; + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; + var errorHasOccurred = !ViewData.ModelState.IsValid; + var cancelLinkData = Html.GetRouteValues(); + var process = Model.CompetenciesToAddCount > 0 && Model.ToUpdateOrSkipCount > 0 ? "add and update" : Model.CompetenciesToAddCount > 0 ? "add" : "update"; + var addQsTo = Model.AddAssessmentQuestionsOption == 1 ? "new" : Model.AddAssessmentQuestionsOption == 2 ? "new and updated" : "all"; +} + +@section NavMenuItems { + +} +@section NavBreadcrumbs { + +} +
    +
    +

    @Model.FrameworkVocabularyPlural import summary

    +

    Your @Model.FrameworkVocabularySingular.ToLower() sheet is ready to be processed. Please check the details below are correct before proceeding to @process @Model.FrameworkVocabularyPlural.ToLower() in the framework @Model.FrameworkName.

    +

    Upload summary

    +
    + +
    +
    + @Model.FrameworkVocabularySingular rows uploaded +
    +
    + @Model.ToProcessCount +
    + +
    + +
    +
    + @Model.FrameworkVocabularyPlural to add +
    +
    + @Model.CompetenciesToAddCount +
    + +
    + +
    +
    + @Model.FrameworkVocabularyPlural to update +
    +
    + @Model.ToUpdateOrSkipCount +
    +
    +
    +

    Additional processing steps

    +
    + @if(Model.CompetenciesToReorderCount > 0) + { +
    +
    + Changes to @Model.FrameworkVocabularySingular.ToLower() order +
    +
    + @(Model.ReorderCompetenciesOption == 1 ? "Ignore" : "Apply") changes to @Model.FrameworkVocabularySingular.ToLower() order +
    +
    + + Change @Model.FrameworkVocabularySingular.ToLower() order options + +
    +
    + } +
    +
    + Add questions to @addQsTo @Model.FrameworkVocabularyPlural.ToLower() in sheet +
    +
    + @Model.DefaultAssessmentQuestionIDs.Count() framework default questions @(Model.AddCustomAssessmentQuestion && Model.CustomAssessmentQuestionID != null ? "AND a custom question" : "") +
    +
    + + Change assessment question options + +
    +
    +
    + +
    + Important: +

    Once @Model.FrameworkVocabularySingular.ToLower() records are processed, changes cannot be undone.

    +
    +
    + Back + +
    + +
    +
    From 9daa34d0ad735fadaa478d5ab79a5f6b7860875e Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 6 Jan 2025 16:41:13 +0000 Subject: [PATCH 164/271] formatter changes --- .../Views/Frameworks/Developer/Import/ImportSummary.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml index 7fd3ada28f..5a782d911f 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -66,7 +66,7 @@

    Additional processing steps

    - @if(Model.CompetenciesToReorderCount > 0) + @if (Model.CompetenciesToReorderCount > 0) {
    From 690e727b97b1b26c61906c0fd4512518508a0f25 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 7 Jan 2025 16:35:53 +0000 Subject: [PATCH 165/271] TD-5163 Process imported competencies --- .../DataServices/FrameworkDataService.cs | 26 +++-- .../Models/Frameworks/FrameworkCompetency.cs | 1 + .../ImportCompetencies.cs | 14 +++ .../Models/BulkCompetenciesData.cs | 2 + .../Services/FrameworkService.cs | 22 ++-- .../ImportCompetenciesFromFileService.cs | 106 +++++++++++++++--- 6 files changed, 132 insertions(+), 39 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 63a8bc31a4..128ee670b0 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -131,10 +131,10 @@ bool zeroBased int InsertCompetency(string name, string? description, int adminId); - int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId); + int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false); int AddCollaboratorToFramework(int frameworkId, string userEmail, bool canModify, int? centreID); - void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); + int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); void UpdateFrameworkCustomFlag(int frameworkId, int id, string flagName, string flagGroup, string flagTagClass); void AddFrameworkDefaultQuestion(int frameworkId, int assessmentQuestionId, int adminId, bool addToExisting); @@ -205,7 +205,7 @@ void UpdateFrameworkCompetencyGroup( int adminId ); - void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId); + void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription); void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -656,7 +656,8 @@ public int InsertFrameworkCompetency( int competencyId, int? frameworkCompetencyGroupID, int adminId, - int frameworkId + int frameworkId, + bool alwaysShowDescription = false ) { if ((competencyId < 1) | (adminId < 1) | (frameworkId < 1)) @@ -978,7 +979,7 @@ FROM FrameworkCompetencyGroups AS fcg public FrameworkCompetency? GetFrameworkCompetencyById(int Id) { return connection.QueryFirstOrDefault( - @"SELECT fc.ID, c.ID AS CompetencyID, c.Name, c.Description, fc.Ordering + @"SELECT fc.ID, c.ID AS CompetencyID, c.Name, c.Description, fc.Ordering, c.AlwaysShowDescription FROM FrameworkCompetencies AS fc INNER JOIN Competencies AS c ON fc.CompetencyID = c.ID WHERE fc.ID = @Id", @@ -1045,7 +1046,7 @@ int adminId } } - public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId) + public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription) { if ((frameworkCompetencyId < 1) | (adminId < 1) | (name.Length < 3)) { @@ -1057,10 +1058,10 @@ public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, st //DO WE NEED SOMETHING IN HERE TO CHECK WHETHER IT IS USED ELSEWHERE AND WARN THE USER? var numberOfAffectedRows = connection.Execute( - @"UPDATE Competencies SET Name = @name, Description = @description, UpdatedByAdminID = @adminId + @"UPDATE Competencies SET Name = @name, Description = @description, UpdatedByAdminID = @adminId, AlwaysShowDescription = CASE WHEN @alwaysShowDescription IS NULL THEN AlwaysShowDescription ELSE @alwaysShowDescription END FROM Competencies INNER JOIN FrameworkCompetencies AS fc ON Competencies.ID = fc.CompetencyID WHERE (fc.Id = @frameworkCompetencyId)", - new { name, description, adminId, frameworkCompetencyId } + new { name, description, adminId, frameworkCompetencyId, alwaysShowDescription} ); if (numberOfAffectedRows < 1) { @@ -1094,11 +1095,12 @@ SELECT FlagID FROM CompetencyFlags new { competencyId, frameworkId }); } - public void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) + public int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) { - connection.Execute( - @$"INSERT INTO Flags(FrameworkID, FlagName, FlagGroup, FlagTagClass) - VALUES(@frameworkId, @flagName, @flagGroup, @flagTagClass)", + return connection.QuerySingle( + @"INSERT INTO Flags(FrameworkID, FlagName, FlagGroup, FlagTagClass) + OUTPUT INSERTED.ID + VALUES(@frameworkId, @flagName, @flagGroup, @flagTagClass);", new { frameworkId, flagName, flagGroup, flagTagClass }); } diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs b/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs index 56bd78ddc1..a42d3d10fe 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetency.cs @@ -14,6 +14,7 @@ public class FrameworkCompetency : BaseSearchableItem public int AssessmentQuestions { get; set; } public int CompetencyLearningResourcesCount { get; set; } public string? FrameworkName { get; set; } + public bool? AlwaysShowDescription { get; set; } public override string SearchableName { diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 08ff1eb0ff..735db4a3e5 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -224,6 +224,20 @@ public IActionResult ImportSummary() var model = new ImportSummaryViewModel(data); return View("Developer/Import/ImportSummary", model); } + [HttpPost] + [Route("/Framework/{frameworkId}/{tabname}/Import/Summary")] + public IActionResult ImportSummarySubmit() + { + var data = GetBulkUploadData(); + var adminId = GetAdminId(); + var uploadDir = Path.Combine(webHostEnvironment.WebRootPath, "Uploads\\"); + var filePath = Path.Combine(uploadDir, data.CompetenciesFileName); + var workbook = new XLWorkbook(filePath); + var results = importCompetenciesFromFileService.ProcessCompetenciesFromFile(workbook, adminId, data.FrameworkId, data.FrameworkVocubulary, data.ReorderCompetenciesOption, data.AddAssessmentQuestionsOption, data.AddCustomAssessmentQuestion ? (int)data.CustomAssessmentQuestionID : 0, data.AddDefaultAssessmentQuestions ? data.DefaultQuestionIDs : []); + data.ImportCompetenciesResult = results; + setBulkUploadData(data); + return RedirectToAction("UploadResults", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } [Route("CancelImport")] public IActionResult CancelImport() { diff --git a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs index 2d3ce9e4ac..344c674a89 100644 --- a/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs +++ b/DigitalLearningSolutions.Web/Models/BulkCompetenciesData.cs @@ -1,4 +1,5 @@ using DigitalLearningSolutions.Data.Models.Frameworks; +using DigitalLearningSolutions.Data.Models.Frameworks.Import; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -42,5 +43,6 @@ public BulkCompetenciesData(DetailFramework framework, int adminUserId, string c public int SubtotalCompetenciesUpdated { get; set; } public int SubTotalSkipped { get; set; } public IEnumerable<(int RowNumber, string ErrorMessage)> Errors { get; set; } = Enumerable.Empty<(int, string)>(); + public ImportCompetenciesResult ImportCompetenciesResult { get;set;} } } diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index 8c7de151d9..bf4367b4fe 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -119,16 +119,16 @@ bool zeroBased int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId); - int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId); + int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false); IEnumerable GetAllCompetenciesForAdminId(string name, int adminId); int InsertCompetency(string name, string? description, int adminId); - int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId); + int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId); int AddCollaboratorToFramework(int frameworkId, string userEmail, bool canModify, int? centreID); - void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); + int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass); void UpdateFrameworkCustomFlag(int frameworkId, int id, string flagName, string flagGroup, string flagTagClass); void AddFrameworkDefaultQuestion(int frameworkId, int assessmentQuestionId, int adminId, bool addToExisting); @@ -199,7 +199,7 @@ void UpdateFrameworkCompetencyGroup( int adminId ); - void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId); + void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription = false); void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -277,9 +277,9 @@ public void AddCompetencyAssessmentQuestion(int frameworkCompetencyId, int asses frameworkDataService.AddCompetencyAssessmentQuestion(frameworkCompetencyId, assessmentQuestionId, adminId); } - public void AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) + public int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) { - frameworkDataService.AddCustomFlagToFramework(frameworkId, flagName, flagGroup, flagTagClass); + return frameworkDataService.AddCustomFlagToFramework(frameworkId, flagName, flagGroup, flagTagClass); } public void AddFrameworkDefaultQuestion(int frameworkId, int assessmentQuestionId, int adminId, bool addToExisting) @@ -602,9 +602,9 @@ public int InsertCompetencyGroup(string groupName, string? groupDescription, int return frameworkDataService.InsertCompetencyGroup(groupName, groupDescription, adminId); } - public int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId) + public int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false) { - return frameworkDataService.InsertFrameworkCompetency(competencyId, frameworkCompetencyGroupID, adminId, frameworkId); + return frameworkDataService.InsertFrameworkCompetency(competencyId, frameworkCompetencyGroupID, adminId, frameworkId, alwaysShowDescription); } public int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId) @@ -672,9 +672,9 @@ public void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selec return frameworkDataService.UpdateFrameworkBranding(frameworkId, brandId, categoryId, topicId, adminId); } - public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId) - { - frameworkDataService.UpdateFrameworkCompetency(frameworkCompetencyId, name, description, adminId); + public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription) + { + frameworkDataService.UpdateFrameworkCompetency(frameworkCompetencyId, name, description, adminId, alwaysShowDescription); } public void UpdateFrameworkCompetencyGroup(int frameworkCompetencyGroupId, int competencyGroupId, string name, string? description, int adminId) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index a26793b651..2367bcbefd 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -12,12 +12,13 @@ namespace DigitalLearningSolutions.Web.Services using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Data.Helpers; using DigitalLearningSolutions.Data.Models.Frameworks.Import; + using DocumentFormat.OpenXml.Office2010.Excel; public interface IImportCompetenciesFromFileService { byte[] GetCompetencyFileForFramework(int frameworkId, bool isBlank, string vocabulary); public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook, string vocabulary, int frameworkId); - public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary); + public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary, int reorderCompetenciesOption, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds); } public class ImportCompetenciesFromFileService : IImportCompetenciesFromFileService { @@ -71,12 +72,12 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List } competencyRow.Validate(); } - public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary) + public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook, int adminUserId, int frameworkId, string vocabulary, int reorderCompetenciesOption, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds) { int maxFrameworkCompetencyId = frameworkService.GetMaxFrameworkCompetencyID(); int maxFrameworkCompetencyGroupId = frameworkService.GetMaxFrameworkCompetencyGroupID(); var table = OpenCompetenciesTable(workbook, vocabulary); - return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId); + return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds); } internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) { @@ -93,7 +94,7 @@ internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) } return table; } - internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId) + internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds) { var competenciesRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); @@ -104,7 +105,7 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a .Count(); foreach (var competencyRow in competenciesRows) { - maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, competencyRow); + maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } return new ImportCompetenciesResult(competenciesRows); @@ -114,6 +115,9 @@ private int ProcessCompetencyRow( int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, + int addAssessmentQuestionsOption, + int customAssessmentQuestionID, + List defaultQuestionIds, CompetencyTableRow competencyRow ) { @@ -121,11 +125,13 @@ CompetencyTableRow competencyRow { return maxFrameworkCompetencyGroupId; } + int newCompetencyGroupId = 0; + int newCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID - int? frameworkCompetencyGroupId = null; + int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { - var newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, null, adminUserId); + newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); if (newCompetencyGroupId > 0) { frameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminUserId); @@ -136,21 +142,89 @@ CompetencyTableRow competencyRow } } } - - //Check if competency already exists in framework competency group and add if not - var newCompetencyId = frameworkService.InsertCompetency(competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId); - if (newCompetencyId > 0) + // If FrameworkCompetency ID is supplied, update the competency + if (competencyRow.ID != null) { - var newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId); - if (newFrameworkCompetencyId > maxFrameworkCompetencyId) + var frameworkCompetency = frameworkService.GetFrameworkCompetencyById((int)competencyRow.ID); + if (frameworkCompetency != null) { - competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyInserted : RowStatus.CompetencyInserted); + newCompetencyId = frameworkCompetency.CompetencyID; + if (frameworkCompetency.Name != competencyRow.Competency || frameworkCompetency.Description != competencyRow.CompetencyDescription || frameworkCompetency.AlwaysShowDescription != competencyRow.AlwaysShowDescription ) + { + frameworkService.UpdateFrameworkCompetency((int)competencyRow.ID, competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId, competencyRow.AlwaysShowDescription ?? false); + competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyUpdated: RowStatus.CompetencyUpdated); + } + else + { + competencyRow.RowStatus = RowStatus.Skipped; + } } - else + } + else + { + //Check if competency already exists in framework competency group and add if not + newCompetencyId = frameworkService.InsertCompetency(competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId); + if (newCompetencyId > 0) + { + var newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId, competencyRow.AlwaysShowDescription ?? false); //including always show desc flag + if (newFrameworkCompetencyId > maxFrameworkCompetencyId) + { + competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyInserted : RowStatus.CompetencyInserted); + } + else + { + competencyRow.RowStatus = RowStatus.Skipped; + } + } + } + + + // If flags are supplied, add them: + if (competencyRow.FlagsCsv != null) + { + var flags = competencyRow.FlagsCsv.Split(','); + int[] flagIds = []; + foreach (var flag in flags) { + int flagId = 0; + var frameworkFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, null); + if (frameworkFlags.Any()) + { + foreach (var frameworkFlag in frameworkFlags) + { + if (frameworkFlag.FlagName == flag) + { + flagId = frameworkFlag.FlagId; + } + } + } + if (flagId == 0) + { + flagId = frameworkService.AddCustomFlagToFramework(frameworkId, flag, "Flag", "nhsuk-tag--white"); + } + flagIds.Append(flagId); + } + if (flagIds.Any()) { + frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, flagIds); + } + } + + + // Add assessment questions if necessary: + if (defaultQuestionIds.Count > 0 | customAssessmentQuestionID > 0) + { + if (competencyRow.RowStatus == RowStatus.CompetencyInserted | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted || addAssessmentQuestionsOption == 2 && competencyRow.RowStatus == RowStatus.CompetencyUpdated | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated || addAssessmentQuestionsOption == 3) { - competencyRow.RowStatus = RowStatus.Skipped; + foreach(var id in defaultQuestionIds) + { + frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, id, adminUserId); + } + if(customAssessmentQuestionID > 0) + { + frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, customAssessmentQuestionID, adminUserId); + } } } + return maxFrameworkCompetencyGroupId; } From 52b6fdd237ad6872284d7da0158d4d410100cbe6 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 7 Jan 2025 17:27:55 +0000 Subject: [PATCH 166/271] TD-5163 Implements the upload results view --- .../DataServices/FrameworkDataService.cs | 8 +++++++- .../FrameworksController/ImportCompetencies.cs | 12 ++++++++++++ .../Services/ImportCompetenciesFromFileService.cs | 7 ++++--- .../Import/ImportCompetenciesResultsViewModel.cs | 15 ++++++++++++++- .../Developer/Import/ImportSummary.cshtml | 2 +- .../Developer/Import/UploadResults.cshtml | 7 ++++--- 6 files changed, 42 insertions(+), 9 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 128ee670b0..f6053e33bf 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -1516,7 +1516,13 @@ public void AddCompetencyAssessmentQuestion(int frameworkCompetencyId, int asses FROM [CompetencyAssessmentQuestions] WHERE ([CompetencyId] = fc.CompetencyID)), 0)+1 FROM FrameworkCompetencies AS fc - WHERE Id = @frameworkCompetencyId", + WHERE Id = @frameworkCompetencyId + AND NOT EXISTS ( + SELECT 1 + FROM CompetencyAssessmentQuestions AS caq + WHERE caq.CompetencyId = fc.CompetencyID + AND caq.AssessmentQuestionID = @assessmentQuestionId + );", new { frameworkCompetencyId, assessmentQuestionId } ); if (numberOfAffectedRows < 1) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 735db4a3e5..31c34b8e0a 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -235,9 +235,21 @@ public IActionResult ImportSummarySubmit() var workbook = new XLWorkbook(filePath); var results = importCompetenciesFromFileService.ProcessCompetenciesFromFile(workbook, adminId, data.FrameworkId, data.FrameworkVocubulary, data.ReorderCompetenciesOption, data.AddAssessmentQuestionsOption, data.AddCustomAssessmentQuestion ? (int)data.CustomAssessmentQuestionID : 0, data.AddDefaultAssessmentQuestions ? data.DefaultQuestionIDs : []); data.ImportCompetenciesResult = results; + //TO DO apply ordering changes if required: + if (data.ReorderCompetenciesOption == 2 && data.CompetenciesToReorderCount > 0) + { + + } setBulkUploadData(data); return RedirectToAction("UploadResults", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); } + [Route("/Framework/{frameworkId}/{tabname}/Import/Results")] + public IActionResult UploadResults() + { + var data = GetBulkUploadData(); + var model = new ImportCompetenciesResultsViewModel(data.ImportCompetenciesResult, data.FrameworkId, data.FrameworkName, data.FrameworkVocubulary); + return View("Developer/Import/UploadResults", model); + } [Route("CancelImport")] public IActionResult CancelImport() { diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 2367bcbefd..a235f0a991 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -127,6 +127,7 @@ CompetencyTableRow competencyRow } int newCompetencyGroupId = 0; int newCompetencyId = 0; + int newFrameworkCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) @@ -166,7 +167,7 @@ CompetencyTableRow competencyRow newCompetencyId = frameworkService.InsertCompetency(competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId); if (newCompetencyId > 0) { - var newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId, competencyRow.AlwaysShowDescription ?? false); //including always show desc flag + newFrameworkCompetencyId = frameworkService.InsertFrameworkCompetency(newCompetencyId, frameworkCompetencyGroupId, adminUserId, frameworkId, competencyRow.AlwaysShowDescription ?? false); //including always show desc flag if (newFrameworkCompetencyId > maxFrameworkCompetencyId) { competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyInserted : RowStatus.CompetencyInserted); @@ -216,11 +217,11 @@ CompetencyTableRow competencyRow { foreach(var id in defaultQuestionIds) { - frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, id, adminUserId); + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, id, adminUserId); } if(customAssessmentQuestionID > 0) { - frameworkService.AddCompetencyAssessmentQuestion((int)competencyRow.ID, customAssessmentQuestionID, adminUserId); + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, customAssessmentQuestionID, adminUserId); } } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs index b47108fe15..48204ae0d1 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs @@ -1,25 +1,38 @@ namespace DigitalLearningSolutions.Web.ViewModels.Frameworks.Import { using DigitalLearningSolutions.Data.Models.Frameworks.Import; + using DigitalLearningSolutions.Web.Helpers; using System.Collections.Generic; using System.Linq; public class ImportCompetenciesResultsViewModel { - public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompetenciesResult) + public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompetenciesResult, int frameworkId, string frameworkName, string frameworkVocabulary) { ProcessedCount = importCompetenciesResult.ProcessedCount; CompetenciesInsertedCount = importCompetenciesResult.CompetencyAddedCount; + CompetenciesUpdatedCount = importCompetenciesResult.CompetencyUpdatedCount; CompetencyGroupsInsertedCount = importCompetenciesResult.GroupAddedCount; + CompetencyGroupsUpdatedCount = importCompetenciesResult.GroupUpdatedCount; SkippedCount = importCompetenciesResult.SkippedCount; Errors = importCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason))); + FrameworkID = frameworkId; + FrameworkName = frameworkName; + FrameworkVocabularySingular = FrameworkVocabularyHelper.VocabularySingular(frameworkVocabulary); + FrameworkVocabularyPlural = FrameworkVocabularyHelper.VocabularyPlural(frameworkVocabulary); } public IEnumerable<(int RowNumber, string ErrorMessage)> Errors { get; set; } public int ErrorCount => Errors.Count(); public int ProcessedCount { get; set; } public int CompetenciesInsertedCount { get; set; } + public int CompetenciesUpdatedCount { get; set; } public int CompetencyGroupsInsertedCount { get; set; } + public int CompetencyGroupsUpdatedCount { get; set; } public int SkippedCount { get; set; } + public int FrameworkID { get; set; } + public string FrameworkName { get; set; } + public string FrameworkVocabularySingular { get; set; } + public string FrameworkVocabularyPlural { get; set; } private string MapReasonToErrorMessage(ImportCompetenciesResult.ErrorReason reason) { return reason switch diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml index 5a782d911f..fedee7029a 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -101,7 +101,7 @@ Important:

    Once @Model.FrameworkVocabularySingular.ToLower() records are processed, changes cannot be undone.

    -
    + Back
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index d83d3ca428..efb819495d 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -34,9 +34,10 @@

    Summary of results:

    • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
    • -
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? "competency group" : "competency groups") inserted
    • -
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? "competency" : "competencies") inserted
    • -
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "record" : "records") skipped (nothing inserted but no errors)
    • +
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
    • +
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
    • +
    • @Model.CompetenciesUpdatedCount new @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
    • +
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted but no errors)
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
    From d534e08485a2c5d9fbc7ff4dad48536c05d52b78 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 09:08:17 +0000 Subject: [PATCH 167/271] TD-5163 Fixes flag assignment during upload processing --- .../ImportCompetenciesFromFileService.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index a235f0a991..9841c5e429 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -11,6 +11,7 @@ namespace DigitalLearningSolutions.Web.Services using ClosedXML.Excel; using DigitalLearningSolutions.Data.Exceptions; using DigitalLearningSolutions.Data.Helpers; + using DigitalLearningSolutions.Data.Models.Frameworks; using DigitalLearningSolutions.Data.Models.Frameworks.Import; using DocumentFormat.OpenXml.Office2010.Excel; @@ -125,14 +126,13 @@ CompetencyTableRow competencyRow { return maxFrameworkCompetencyGroupId; } - int newCompetencyGroupId = 0; int newCompetencyId = 0; int newFrameworkCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { - newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); + int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); if (newCompetencyGroupId > 0) { frameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminUserId); @@ -181,10 +181,10 @@ CompetencyTableRow competencyRow // If flags are supplied, add them: - if (competencyRow.FlagsCsv != null) + if (!string.IsNullOrWhiteSpace(competencyRow.FlagsCsv.Trim())) { var flags = competencyRow.FlagsCsv.Split(','); - int[] flagIds = []; + var flagIds = new List(); foreach (var flag in flags) { int flagId = 0; var frameworkFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, null); @@ -195,6 +195,7 @@ CompetencyTableRow competencyRow if (frameworkFlag.FlagName == flag) { flagId = frameworkFlag.FlagId; + break; } } } @@ -202,10 +203,14 @@ CompetencyTableRow competencyRow { flagId = frameworkService.AddCustomFlagToFramework(frameworkId, flag, "Flag", "nhsuk-tag--white"); } - flagIds.Append(flagId); + flagIds.Add(flagId); } - if (flagIds.Any()) { - frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, flagIds); + if (flagIds.Count > 0) { + frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); + if (competencyRow.RowStatus == RowStatus.Skipped) + { + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + } } } From 9695907e907503fff72a5e5fe0767d21e1b68dea Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 09:08:51 +0000 Subject: [PATCH 168/271] TD-5163 General tweaks to improve wording of buttons and body text --- .../Views/Frameworks/Developer/Import/Index.cshtml | 2 +- .../Views/Frameworks/Developer/Import/UploadResults.cshtml | 2 +- .../Views/Frameworks/Developer/_Structure.cshtml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 78a5fb95bd..11fd4f4b48 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -79,7 +79,7 @@
    This Excel file will include all existing @Model.FrameworkVocabularyPlural.ToLower() whose details you can update.
    - New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row. + New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row, leaving the ID column blank.
    Download @Model.FrameworkVocabularyPlural.ToLower() diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index efb819495d..b65e4026f1 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -36,7 +36,7 @@
  • @Model.ProcessedCount @(Model.ProcessedCount == 1 ? "line" : "lines") processed
  • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
  • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
  • -
  • @Model.CompetenciesUpdatedCount new @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
  • +
  • @Model.CompetenciesUpdatedCount existing @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
  • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted but no errors)
  • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
  • diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml index a1097f6e18..849b5121ba 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml @@ -81,7 +81,7 @@ else
    } From 968cdac0479eea5f17a6cba49fa3701cc5b2e5a7 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 16:55:34 +0000 Subject: [PATCH 169/271] TD-5163 Corrects heading --- .../Views/Frameworks/Developer/Import/ImportCompleted.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index b127e53979..93abdd4983 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -28,7 +28,7 @@ }
    -

    Delegate file uploaded

    +

    @Model.FrameworkVocabularySingular.ToLower() file uploaded

    @(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

      From 9311b208bfaab571cf69a043e130c11ccab7285d Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 16:56:32 +0000 Subject: [PATCH 170/271] TD-5163 modifies the insert competency group method to take an optional framework id --- .../DataServices/FrameworkDataService.cs | 68 +++++++++++-------- .../Services/FrameworkService.cs | 6 +- .../ImportCompetenciesFromFileService.cs | 2 +- 3 files changed, 45 insertions(+), 31 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index f6053e33bf..0e702f204b 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -123,7 +123,7 @@ bool zeroBased //INSERT DATA BrandedFramework CreateFramework(DetailFramework detailFramework, int adminId); - int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId); + int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId); int InsertFrameworkCompetencyGroup(int groupId, int frameworkID, int adminId); @@ -475,7 +475,7 @@ public BrandedFramework CreateFramework(DetailFramework detailFramework, int adm return new BrandedFramework(); } - var existingFrameworks = (int)connection.ExecuteScalar( + var existingFrameworks = connection.QuerySingle( @"SELECT COUNT(*) FROM Frameworks WHERE FrameworkName = @frameworkName", new { frameworkName } ); @@ -548,7 +548,7 @@ int adminId return GetBrandedFrameworkByFrameworkId(frameworkId, adminId); } - public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId) + public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId) { if ((groupName.Length == 0) | (adminId < 1)) { @@ -558,9 +558,16 @@ public int InsertCompetencyGroup(string groupName, string? groupDescription, int return -2; } groupDescription = (groupDescription?.Trim() == "" ? null : groupDescription); - var existingId = (int)connection.ExecuteScalar( - @"SELECT COALESCE ((SELECT TOP(1)ID FROM CompetencyGroups WHERE [Name] = @groupName AND (@groupDescription IS NULL OR Description = @groupDescription)), 0) AS CompetencyGroupID", - new { groupName, groupDescription } + var existingId = connection.QuerySingle( + @"SELECT COALESCE + ((SELECT TOP (1) ID + FROM CompetencyGroups + WHERE (Name = @groupName) AND EXISTS + (SELECT 1 AS Expr1 + FROM FrameworkCompetencyGroups + WHERE (CompetencyGroupID = CompetencyGroups.ID) AND (FrameworkID = @frameworkId) OR + (CompetencyGroupID = CompetencyGroups.ID) AND (@frameworkId IS NULL))), 0) AS CompetencyGroupID", + new { groupName, groupDescription, frameworkId } ); if (existingId > 0) { @@ -581,8 +588,15 @@ public int InsertCompetencyGroup(string groupName, string? groupDescription, int return -1; } - existingId = (int)connection.ExecuteScalar( - @"SELECT COALESCE ((SELECT TOP(1)ID FROM CompetencyGroups WHERE [Name] = @groupName AND (@groupDescription IS NULL OR Description = @groupDescription)), 0) AS CompetencyGroupID", + existingId = connection.QuerySingle( + @"SELECT COALESCE + ((SELECT TOP (1) ID + FROM CompetencyGroups + WHERE (Name = @groupName) AND EXISTS + (SELECT 1 AS Expr1 + FROM FrameworkCompetencyGroups + WHERE (CompetencyGroupID = CompetencyGroups.ID) AND (FrameworkID = @frameworkId) OR + (CompetencyGroupID = CompetencyGroups.ID) AND (@frameworkId IS NULL))), 0) AS CompetencyGroupID", new { groupName, groupDescription } ); return existingId; @@ -598,7 +612,7 @@ public int InsertFrameworkCompetencyGroup(int groupId, int frameworkId, int admi return -2; } - var existingId = (int)connection.ExecuteScalar( + var existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencyGroups WHERE CompetencyGroupID = @groupID AND FrameworkID = @frameworkID), 0) AS FrameworkCompetencyGroupID", new { groupId, frameworkId } ); @@ -624,7 +638,7 @@ FROM [FrameworkCompetencyGroups] return -1; } - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencyGroups WHERE CompetencyGroupID = @groupID AND FrameworkID = @frameworkID), 0) AS FrameworkCompetencyGroupID", new { groupId, frameworkId } ); @@ -671,14 +685,14 @@ public int InsertFrameworkCompetency( var existingId = 0; if (frameworkCompetencyGroupID == null) { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID IS NULL), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); } else { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID = @frameworkCompetencyGroupID), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); @@ -707,14 +721,14 @@ FROM [FrameworkCompetencies] if (frameworkCompetencyGroupID == null) { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID IS NULL), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); } else { - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCompetencies WHERE [CompetencyID] = @competencyId AND FrameworkCompetencyGroupID = @frameworkCompetencyGroupID), 0) AS FrameworkCompetencyID", new { competencyId, frameworkCompetencyGroupID } ); @@ -765,7 +779,7 @@ public int AddCollaboratorToFramework(int frameworkId, string? userEmail, bool c return -3; } - var existingId = (int)connection.ExecuteScalar( + var existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCollaborators @@ -815,7 +829,7 @@ FROM FrameworkCollaborators ); } - existingId = (int)connection.ExecuteScalar( + existingId = connection.QuerySingle( @"SELECT COALESCE ((SELECT ID FROM FrameworkCollaborators @@ -907,7 +921,7 @@ public bool UpdateFrameworkName(int frameworkId, int adminId, string frameworkNa return false; } - var existingFrameworks = (int)connection.ExecuteScalar( + var existingFrameworks = connection.QuerySingle( @"SELECT COUNT(*) FROM Frameworks WHERE FrameworkName = @frameworkName AND ID <> @frameworkId", new { frameworkName, frameworkId } ); @@ -1003,7 +1017,7 @@ int adminId return; } - var usedElsewhere = (int)connection.ExecuteScalar( + var usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM FrameworkCompetencyGroups WHERE CompetencyGroupId = @competencyGroupId AND ID <> @frameworkCompetencyGroupId", @@ -1171,14 +1185,14 @@ public void DeleteFrameworkCompetencyGroup(int frameworkCompetencyGroupId, int c } //Check if used elsewhere and delete competency group if not: - var usedElsewhere = (int)connection.ExecuteScalar( + var usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM FrameworkCompetencyGroups WHERE CompetencyGroupId = @competencyGroupId", new { competencyGroupId } ); if (usedElsewhere == 0) { - usedElsewhere = (int)connection.ExecuteScalar( + usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM SelfAssessmentStructure WHERE CompetencyGroupId = @competencyGroupId", new { competencyGroupId } @@ -1209,7 +1223,7 @@ public void DeleteFrameworkCompetencyGroup(int frameworkCompetencyGroupId, int c public void DeleteFrameworkCompetency(int frameworkCompetencyId, int adminId) { - var competencyId = (int)connection.ExecuteScalar( + var competencyId = connection.QuerySingle( @"SELECT CompetencyID FROM FrameworkCompetencies WHERE ID = @frameworkCompetencyId", new { frameworkCompetencyId } ); @@ -1240,14 +1254,14 @@ public void DeleteFrameworkCompetency(int frameworkCompetencyId, int adminId) } //Check if used elsewhere and delete competency group if not: - var usedElsewhere = (int)connection.ExecuteScalar( + var usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM FrameworkCompetencies WHERE CompetencyID = @competencyId", new { competencyId } ); if (usedElsewhere == 0) { - usedElsewhere = (int)connection.ExecuteScalar( + usedElsewhere = connection.QuerySingle( @"SELECT COUNT(*) FROM SelfAssessmentStructure WHERE CompetencyID = @competencyId", new { competencyId } @@ -1835,10 +1849,10 @@ FROM Competencies AS C INNER JOIN public int GetAdminUserRoleForFrameworkId(int adminId, int frameworkId) { return connection.QuerySingle( - @"SELECT CASE WHEN FW.OwnerAdminID = @adminId THEN 3 WHEN COALESCE (fwc.CanModify, 0) = 1 THEN 2 WHEN COALESCE (fwc.CanModify, 0) = 0 THEN 1 ELSE 0 END AS UserRole - FROM Frameworks AS FW LEFT OUTER JOIN - FrameworkCollaborators AS fwc ON fwc.FrameworkID = FW.ID AND fwc.AdminID = @adminId AND fwc.IsDeleted = 0 - WHERE (FW.ID = @frameworkId)", + @"SELECT CASE WHEN FW.OwnerAdminID = @adminId THEN 3 WHEN fwc.CanModify = 1 THEN 2 WHEN fwc.CanModify = 0 THEN 1 ELSE 0 END AS UserRole + FROM Frameworks AS FW LEFT OUTER JOIN + FrameworkCollaborators AS fwc ON fwc.FrameworkID = FW.ID AND fwc.AdminID = @adminId + WHERE FW.ID = @frameworkId and FWC.IsDeleted=0", new { adminId, frameworkId } ); } diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index bf4367b4fe..7538d2c4a4 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -117,7 +117,7 @@ bool zeroBased //INSERT DATA BrandedFramework CreateFramework(DetailFramework detailFramework, int adminId); - int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId); + int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId = null); int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false); @@ -597,9 +597,9 @@ public int InsertCompetency(string name, string? description, int adminId) return frameworkDataService.InsertCompetency(name, description, adminId); } - public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId) + public int InsertCompetencyGroup(string groupName, string? groupDescription, int adminId, int? frameworkId) { - return frameworkDataService.InsertCompetencyGroup(groupName, groupDescription, adminId); + return frameworkDataService.InsertCompetencyGroup(groupName, groupDescription, adminId, frameworkId); } public int InsertFrameworkCompetency(int competencyId, int? frameworkCompetencyGroupID, int adminId, int frameworkId, bool alwaysShowDescription = false) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 9841c5e429..2471f61605 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -132,7 +132,7 @@ CompetencyTableRow competencyRow int ? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { - int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId); + int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId, frameworkId); if (newCompetencyGroupId > 0) { frameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminUserId); From b7cb3858bbff80ffad3cbb00da47f2ddc054c847 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Wed, 8 Jan 2025 16:57:06 +0000 Subject: [PATCH 171/271] TD-5163 Clears down the uploaded sheet after processing --- .../Controllers/FrameworksController/ImportCompetencies.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 31c34b8e0a..43c91e9347 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -247,6 +247,8 @@ public IActionResult ImportSummarySubmit() public IActionResult UploadResults() { var data = GetBulkUploadData(); + FileHelper.DeleteFile(webHostEnvironment, data.CompetenciesFileName); + TempData.Clear(); var model = new ImportCompetenciesResultsViewModel(data.ImportCompetenciesResult, data.FrameworkId, data.FrameworkName, data.FrameworkVocubulary); return View("Developer/Import/UploadResults", model); } From c33b7af1f7b75d277e59fa3180d2c19819080ee5 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Thu, 9 Jan 2025 16:59:26 +0000 Subject: [PATCH 172/271] TD-5163 Commits competency order changes if required --- .../DataServices/FrameworkDataService.cs | 18 ++++--- .../Frameworks/Import/CompetencyTableRow.cs | 1 + .../Services/FrameworkService.cs | 6 +-- .../ImportCompetenciesFromFileService.cs | 54 ++++++++++++++++--- .../Import/ApplyCompetencyOrdering.cshtml | 4 ++ .../Developer/Import/ImportCompleted.cshtml | 2 +- .../Developer/Import/UploadResults.cshtml | 2 +- 7 files changed, 68 insertions(+), 19 deletions(-) diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 0e702f204b..acc79af37c 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -206,7 +206,7 @@ int adminId ); void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription); - void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); + int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -1025,7 +1025,7 @@ int adminId ); if (usedElsewhere > 0) { - var newCompetencyGroupId = InsertCompetencyGroup(name, description, adminId); + var newCompetencyGroupId = InsertCompetencyGroup(name, description, adminId, null); if (newCompetencyGroupId > 0) { var numberOfAffectedRows = connection.Execute( @@ -1086,13 +1086,14 @@ public void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, st } } - public void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) + public int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) { + int totalRowsAffected = 0; string? commaSeparatedSelectedFlagIds = null; if (selectedFlagIds?.Length > 0) { commaSeparatedSelectedFlagIds = String.Join(',', selectedFlagIds); - connection.Execute( + totalRowsAffected += connection.Execute( @$"INSERT INTO CompetencyFlags(CompetencyID, FlagID, Selected) SELECT @competencyId, f.ID, 1 FROM Flags f @@ -1102,11 +1103,12 @@ SELECT FlagID FROM CompetencyFlags )", new { competencyId, selectedFlagIds }); } - connection.Execute( + totalRowsAffected += connection.Execute( @$"UPDATE CompetencyFlags SET Selected = (CASE WHEN FlagID IN ({commaSeparatedSelectedFlagIds ?? "null"}) THEN 1 ELSE 0 END) - WHERE CompetencyID = @competencyId", + WHERE CompetencyID = @competencyId AND Selected <> (CASE WHEN FlagID IN ({commaSeparatedSelectedFlagIds ?? "null"}) THEN 1 ELSE 0 END)", new { competencyId, frameworkId }); + return totalRowsAffected; } public int AddCustomFlagToFramework(int frameworkId, string flagName, string flagGroup, string flagTagClass) @@ -1127,7 +1129,7 @@ public void UpdateFrameworkCustomFlag(int frameworkId, int id, string flagName, new { frameworkId, id, flagName, flagGroup, flagTagClass }); } - public void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction) + public void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction) // Valid directions are 'UP' and 'DOWN' { connection.Execute( "ReorderFrameworkCompetencyGroup", @@ -1136,7 +1138,7 @@ public void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool si ); } - public void MoveFrameworkCompetency(int frameworkCompetencyId, bool singleStep, string direction) + public void MoveFrameworkCompetency(int frameworkCompetencyId, bool singleStep, string direction) // Valid directions are 'UP' and 'DOWN' { connection.Execute( "ReorderFrameworkCompetency", diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index 16ea0b9e52..740ec961ca 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -38,6 +38,7 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) RowStatus = RowStatus.NotYetProcessed; } public int RowNumber { get; set; } + public int CompetencyOrderNumber { get; set; } public string? AlwaysShowDescriptionRaw { get; set; } public ImportCompetenciesResult.ErrorReason? Error { get; set; } public RowStatus RowStatus { get; set; } diff --git a/DigitalLearningSolutions.Web/Services/FrameworkService.cs b/DigitalLearningSolutions.Web/Services/FrameworkService.cs index 7538d2c4a4..9f4018e671 100644 --- a/DigitalLearningSolutions.Web/Services/FrameworkService.cs +++ b/DigitalLearningSolutions.Web/Services/FrameworkService.cs @@ -200,7 +200,7 @@ int adminId ); void UpdateFrameworkCompetency(int frameworkCompetencyId, string name, string? description, int adminId, bool? alwaysShowDescription = false); - void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); + int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds); void MoveFrameworkCompetencyGroup(int frameworkCompetencyGroupId, bool singleStep, string direction); @@ -662,9 +662,9 @@ public void UpdateAssessmentQuestion(int id, string question, int assessmentQues frameworkDataService.UpdateAssessmentQuestion(id, question, assessmentQuestionInputTypeId, maxValueDescription, minValueDescription, scoringInstructions, minValue, maxValue, includeComments, adminId, commentsPrompt, commentsHint); } - public void UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) + public int UpdateCompetencyFlags(int frameworkId, int competencyId, int[] selectedFlagIds) { - frameworkDataService.UpdateCompetencyFlags(frameworkId, competencyId, selectedFlagIds); + return frameworkDataService.UpdateCompetencyFlags(frameworkId, competencyId, selectedFlagIds); } public BrandedFramework? UpdateFrameworkBranding(int frameworkId, int brandId, int categoryId, int topicId, int adminId) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 2471f61605..7cec219ef9 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -78,7 +78,7 @@ public ImportCompetenciesResult ProcessCompetenciesFromFile(IXLWorkbook workbook int maxFrameworkCompetencyId = frameworkService.GetMaxFrameworkCompetencyID(); int maxFrameworkCompetencyGroupId = frameworkService.GetMaxFrameworkCompetencyGroupID(); var table = OpenCompetenciesTable(workbook, vocabulary); - return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds); + return ProcessCompetenciesTable(table, adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds); } internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) { @@ -95,10 +95,28 @@ internal IXLTable OpenCompetenciesTable(IXLWorkbook workbook, string vocabulary) } return table; } - internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, int customAssessmentQuestionID, List defaultQuestionIds) + internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int adminUserId, int frameworkId, int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, int reorderCompetenciesOption, int customAssessmentQuestionID, List defaultQuestionIds) { var competenciesRows = table.Rows().Skip(1).Select(row => new CompetencyTableRow(table, row)).ToList(); - + int rowCount = 0; + string currentGroup = null; + competenciesRows = competenciesRows + .OrderBy(row => row.CompetencyGroup) + .Select(row => + { + if (row.CompetencyGroup != currentGroup) + { + currentGroup = row.CompetencyGroup; + rowCount = 1; + } + else + { + rowCount++; + } + row.CompetencyOrderNumber = rowCount; + return row; + }) + .ToList(); var competencyGroupCount = competenciesRows .Where(row => !string.IsNullOrWhiteSpace(row.CompetencyGroup)) .Select(row => row.CompetencyGroup) @@ -106,7 +124,7 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a .Count(); foreach (var competencyRow in competenciesRows) { - maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); + maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } return new ImportCompetenciesResult(competenciesRows); @@ -117,6 +135,7 @@ private int ProcessCompetencyRow( int maxFrameworkCompetencyId, int maxFrameworkCompetencyGroupId, int addAssessmentQuestionsOption, + int reorderCompetenciesOption, int customAssessmentQuestionID, List defaultQuestionIds, CompetencyTableRow competencyRow @@ -206,8 +225,8 @@ CompetencyTableRow competencyRow flagIds.Add(flagId); } if (flagIds.Count > 0) { - frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); - if (competencyRow.RowStatus == RowStatus.Skipped) + var updated = frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); + if (updated > 0 && competencyRow.RowStatus == RowStatus.Skipped) { competencyRow.RowStatus = RowStatus.CompetencyUpdated; } @@ -231,6 +250,29 @@ CompetencyTableRow competencyRow } } + // Reorder competencies if required: + if (reorderCompetenciesOption == 2) + { + var frameworkCompetencyId = (int)competencyRow.ID; + var frameworkCompetency = frameworkService.GetFrameworkCompetencyById(frameworkCompetencyId); + var placesToMove = Math.Abs(frameworkCompetency.Ordering - competencyRow.CompetencyOrderNumber); + + if (placesToMove > 0) + { + var direction = frameworkCompetency.Ordering > competencyRow.CompetencyOrderNumber ? "UP" : "DOWN"; + + for (int i = 0; i < placesToMove; i++) + { + frameworkService.MoveFrameworkCompetency(frameworkCompetencyId, true, direction); + } + + if (competencyRow.RowStatus == RowStatus.Skipped) + { + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + } + } + } + return maxFrameworkCompetencyGroupId; } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml index 398343f461..6b21e8b765 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml @@ -36,6 +36,10 @@ Apply @Model.FrameworkVocabularySingular.ToLower() sequence changes? +
      + Information: +

      We strongly recommend including all framework competencies in your uploaded sheet if reordering competencies to ensure that the correct sequence is applied.

      +
      Your uploaded file includes changes to the sequence of existing @Model.FrameworkVocabularyPlural.ToLower(). Choose whether to store the changes to @Model.FrameworkVocabularySingular.ToLower() sequence during update.
      diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 93abdd4983..059712b059 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -47,7 +47,7 @@ {
    • - @Model.CompetenciesToReorderCount existing @Model.FrameworkVocabularySingular.ToLower() @(Model.CompetenciesToReorderCount == 1 ? "record" : "records") have changed sequence in your uploaded sheet. You can choose whether to fix them in the new order next. + Some existing @Model.FrameworkVocabularySingular.ToLower() @(Model.CompetenciesToReorderCount == 1 ? "record" : "records") have changed sequence in your uploaded sheet. You can choose whether to fix them in the new order next.
    • }
    • No errors
    • diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index b65e4026f1..3fa9b57408 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -37,7 +37,7 @@
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
    • @Model.CompetenciesUpdatedCount existing @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
    • -
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted but no errors)
    • +
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted or updated but no errors)
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
    From 39a8d8e6abc08df39ac86b4063b0f890ff11837c Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 08:19:01 +0000 Subject: [PATCH 173/271] TD-5163 Reorders competency groups if needed --- .../ImportCompetenciesFromFileService.cs | 75 +++++++++++++------ 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 7cec219ef9..b8b7883f23 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -61,7 +61,7 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List { int originalIndex = existingIds.IndexOf(id); int newIndex = newIds.IndexOf(id); - if(originalIndex == newIndex) + if (originalIndex == newIndex) { competencyRow.RowStatus = RowStatus.CompetencyUpdated; } @@ -101,7 +101,6 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a int rowCount = 0; string currentGroup = null; competenciesRows = competenciesRows - .OrderBy(row => row.CompetencyGroup) .Select(row => { if (row.CompetencyGroup != currentGroup) @@ -126,7 +125,32 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a { maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } + // TO DO: Check for changes to competency group order and apply them if appropriate: + if (reorderCompetenciesOption == 2) + { + var distinctCompetencyGroups = competenciesRows + .Where(row => !string.IsNullOrWhiteSpace(row.CompetencyGroup)) + .Select(row => row.CompetencyGroup) + .Distinct() + .ToList(); + var existingGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).Select(row => new { row.ID, row.Name }) + .Distinct() + .ToList(); + for (int i = 0; i < competencyGroupCount; i++) + { + var placesToMove = Math.Abs(existingGroups.FindIndex(group => group.Name == distinctCompetencyGroups[i])-i); + if (placesToMove > 0) + { + var thisGroup = existingGroups.FirstOrDefault(group => group.Name == distinctCompetencyGroups[i]); + var direction = existingGroups.FindIndex(group => group.Name == distinctCompetencyGroups[i]) > i ? "UP" : "DOWN"; + for (int p = 0; p < placesToMove; p++) + { + frameworkService.MoveFrameworkCompetencyGroup(thisGroup.ID, true, direction); + } + } + } + } return new ImportCompetenciesResult(competenciesRows); } private int ProcessCompetencyRow( @@ -148,7 +172,7 @@ CompetencyTableRow competencyRow int newCompetencyId = 0; int newFrameworkCompetencyId = 0; //If competency group is set, check if competency group exists within framework and add if not and get the Framework Competency Group ID - int ? frameworkCompetencyGroupId = null; + int? frameworkCompetencyGroupId = null; if (competencyRow.CompetencyGroup != null) { int newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyRow.CompetencyGroup, competencyRow.GroupDescription, adminUserId, frameworkId); @@ -169,10 +193,10 @@ CompetencyTableRow competencyRow if (frameworkCompetency != null) { newCompetencyId = frameworkCompetency.CompetencyID; - if (frameworkCompetency.Name != competencyRow.Competency || frameworkCompetency.Description != competencyRow.CompetencyDescription || frameworkCompetency.AlwaysShowDescription != competencyRow.AlwaysShowDescription ) + if (frameworkCompetency.Name != competencyRow.Competency || frameworkCompetency.Description != competencyRow.CompetencyDescription || frameworkCompetency.AlwaysShowDescription != competencyRow.AlwaysShowDescription) { frameworkService.UpdateFrameworkCompetency((int)competencyRow.ID, competencyRow.Competency, competencyRow.CompetencyDescription, adminUserId, competencyRow.AlwaysShowDescription ?? false); - competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyUpdated: RowStatus.CompetencyUpdated); + competencyRow.RowStatus = (competencyRow.RowStatus == RowStatus.CompetencyGroupInserted ? RowStatus.CompetencyGroupAndCompetencyUpdated : RowStatus.CompetencyUpdated); } else { @@ -204,7 +228,8 @@ CompetencyTableRow competencyRow { var flags = competencyRow.FlagsCsv.Split(','); var flagIds = new List(); - foreach (var flag in flags) { + foreach (var flag in flags) + { int flagId = 0; var frameworkFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, null); if (frameworkFlags.Any()) @@ -224,7 +249,8 @@ CompetencyTableRow competencyRow } flagIds.Add(flagId); } - if (flagIds.Count > 0) { + if (flagIds.Count > 0) + { var updated = frameworkService.UpdateCompetencyFlags(frameworkId, newCompetencyId, [.. flagIds]); if (updated > 0 && competencyRow.RowStatus == RowStatus.Skipped) { @@ -233,23 +259,6 @@ CompetencyTableRow competencyRow } } - - // Add assessment questions if necessary: - if (defaultQuestionIds.Count > 0 | customAssessmentQuestionID > 0) - { - if (competencyRow.RowStatus == RowStatus.CompetencyInserted | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted || addAssessmentQuestionsOption == 2 && competencyRow.RowStatus == RowStatus.CompetencyUpdated | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated || addAssessmentQuestionsOption == 3) - { - foreach(var id in defaultQuestionIds) - { - frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, id, adminUserId); - } - if(customAssessmentQuestionID > 0) - { - frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, customAssessmentQuestionID, adminUserId); - } - } - } - // Reorder competencies if required: if (reorderCompetenciesOption == 2) { @@ -273,6 +282,24 @@ CompetencyTableRow competencyRow } } + // Add assessment questions if necessary: + if (defaultQuestionIds.Count > 0 | customAssessmentQuestionID > 0) + { + if (competencyRow.RowStatus == RowStatus.CompetencyInserted | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted || addAssessmentQuestionsOption == 2 && competencyRow.RowStatus == RowStatus.CompetencyUpdated | competencyRow.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated || addAssessmentQuestionsOption == 3) + { + foreach (var id in defaultQuestionIds) + { + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, id, adminUserId); + } + if (customAssessmentQuestionID > 0) + { + frameworkService.AddCompetencyAssessmentQuestion(competencyRow.ID ?? newFrameworkCompetencyId, customAssessmentQuestionID, adminUserId); + } + } + } + + + return maxFrameworkCompetencyGroupId; } From f1ff6c047b3855609ba08c6d02945ba257012fea Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 08:46:33 +0000 Subject: [PATCH 174/271] TD-5163 Fixes navigation and titles --- .../Controllers/FrameworksController/ImportCompetencies.cs | 4 ++++ .../Views/Frameworks/Developer/Import/ImportCompleted.cshtml | 2 +- .../Views/Frameworks/Developer/Import/ImportSummary.cshtml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs index 43c91e9347..846eeca19a 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/ImportCompetencies.cs @@ -194,6 +194,10 @@ public IActionResult AddAssessmentQuestions(AddAssessmentQuestionsFormData model public IActionResult AddQuestionsToWhichCompetencies() { var data = GetBulkUploadData(); + if (data.DefaultQuestionIDs.Count ==0 && data.CustomAssessmentQuestionID == null) + { + return RedirectToAction("ImportSummary", "Frameworks", new { frameworkId = data.FrameworkId, tabname = data.TabName }); + } var model = new AddQuestionsToWhichCompetenciesViewModel ( data.FrameworkId, diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml index 059712b059..3a5cd7aa8d 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportCompleted.cshtml @@ -28,7 +28,7 @@ }
    -

    @Model.FrameworkVocabularySingular.ToLower() file uploaded

    +

    @Model.FrameworkVocabularySingular file uploaded

    @(Model.ErrorCount == 0 ? "Your file is error free and ready to be processed. Check the information below looks, correct before processing" : "Your file contains the following, including some errors:")

      diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml index fedee7029a..b14052b460 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -102,7 +102,7 @@

      Once @Model.FrameworkVocabularySingular.ToLower() records are processed, changes cannot be undone.

    - Back + 0 ? "AddQuestionsToWhichCompetencies" : "AddAssessmentQuestions") role="button" class="nhsuk-button nhsuk-button--secondary">Back
    From 657bc2645c4e9fdd0978e23a35788925f635d1a9 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 08:47:35 +0000 Subject: [PATCH 175/271] TD-5163 Fixes competency group reordering by reloading the committed order within the iterator --- .../Services/ImportCompetenciesFromFileService.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index b8b7883f23..c29bb1b177 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -133,12 +133,11 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a .Select(row => row.CompetencyGroup) .Distinct() .ToList(); - - var existingGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).Select(row => new { row.ID, row.Name }) - .Distinct() - .ToList(); for (int i = 0; i < competencyGroupCount; i++) { + var existingGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).Select(row => new { row.ID, row.Name }) + .Distinct() + .ToList(); var placesToMove = Math.Abs(existingGroups.FindIndex(group => group.Name == distinctCompetencyGroups[i])-i); if (placesToMove > 0) { From c0e1e1067abc79ea636689a656207cc7a9a710e8 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 09:14:59 +0000 Subject: [PATCH 176/271] Applies BR DLSFW1 to standard insert competency group functionality --- .../Controllers/FrameworksController/Competencies.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs index 328082ec28..0d26aee6a3 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Competencies.cs @@ -71,7 +71,7 @@ public IActionResult AddEditFrameworkCompetencyGroup(int frameworkId, Competency (competencyGroupBase.Description), adminId); return new RedirectResult(Url.Action("ViewFramework", new { tabname = "Structure", frameworkId }) + "#fcgroup-" + frameworkCompetencyGroupId.ToString()); } - var newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyGroupBase.Name, SanitizerHelper.SanitizeHtmlData(competencyGroupBase.Description), adminId); + var newCompetencyGroupId = frameworkService.InsertCompetencyGroup(competencyGroupBase.Name, SanitizerHelper.SanitizeHtmlData(competencyGroupBase.Description), adminId, frameworkId); if (newCompetencyGroupId > 0) { var newFrameworkCompetencyGroupId = frameworkService.InsertFrameworkCompetencyGroup(newCompetencyGroupId, frameworkId, adminId); From ef60077b2c5895d5c1ea486ac77cc96f4c62d113 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 10 Jan 2025 14:28:00 +0000 Subject: [PATCH 177/271] Adds published framework warning to summary page --- .../Views/Frameworks/Developer/Import/ImportSummary.cshtml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml index b14052b460..ed715f4068 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ImportSummary.cshtml @@ -31,6 +31,10 @@

    @Model.FrameworkVocabularyPlural import summary

    + @if (Model.PublishStatusID == 3) + { + + }

    Your @Model.FrameworkVocabularySingular.ToLower() sheet is ready to be processed. Please check the details below are correct before proceeding to @process @Model.FrameworkVocabularyPlural.ToLower() in the framework @Model.FrameworkName.

    Upload summary

    From bab3ea786d9decc0c011130c2dae61510405254e Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 08:48:29 +0000 Subject: [PATCH 178/271] TD-5233 Add a limitations paragraph to the start page --- .../Frameworks/Developer/Import/Index.cshtml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 11fd4f4b48..c22a96d60e 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -40,7 +40,18 @@
    @if (Model.IsNotBlank) { - +
    + Note: +

    + Bulk upload cannot be used to: +

    +
      +
    • Delete competencies or competency groups
    • +
    • Remove assessment questions from existing competencies
    • +
    • Add more than one custom assessment question to uploaded competencies
    • +
    + +

    To bulk add and/or update @Model.FrameworkVocabularyPlural.ToLower() in the framework, @Model.FrameworkName, download an Excel workbook using one of the options below.

    @@ -91,6 +102,12 @@ } else { +
    + Note: +

    + Bulk upload cannot be used to add more than one custom assessment question to uploaded competencies. +

    +

    Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row.

    From e7198201a3c11b7396d1f41983a903ef4080abef Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 09:12:10 +0000 Subject: [PATCH 179/271] Emphasises cannot --- .../Views/Frameworks/Developer/Import/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index c22a96d60e..1221cb9f4a 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -43,7 +43,7 @@
    Note:

    - Bulk upload cannot be used to: + Bulk upload cannot be used to:

    • Delete competencies or competency groups
    • From 1c5fb7daf3d9aa1b84ffa25e946032f636a44da3 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 09:15:42 +0000 Subject: [PATCH 180/271] Moves single line inset text to view component --- .../Views/Frameworks/Developer/Import/Index.cshtml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index 1221cb9f4a..f94adaf54a 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -36,7 +36,7 @@ { } - @* *@ +
      @if (Model.IsNotBlank) { @@ -102,12 +102,7 @@ } else { -
      - Note: -

      - Bulk upload cannot be used to add more than one custom assessment question to uploaded competencies. -

      -
      +

      Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row.

      From 93afda19f042a3adc6398b15c039d23bbf61c642 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 14:56:56 +0000 Subject: [PATCH 181/271] TD-5233 Indicates the number of competencies reordered in the upload results page --- .../Frameworks/Import/CompetencyTableRow.cs | 2 +- .../Import/ImportCompetenciesResult.cs | 6 +++--- .../ImportCompetenciesFromFileService.cs | 20 +++++++++---------- .../ImportCompetenciesResultsViewModel.cs | 2 ++ .../Import/ApplyCompetencyOrdering.cshtml | 6 +++--- .../Developer/Import/UploadResults.cshtml | 1 + 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs index 740ec961ca..1dd67ed007 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/CompetencyTableRow.cs @@ -9,7 +9,6 @@ public enum RowStatus CompetencyGroupAndCompetencyInserted, CompetencyInserted, CompetencyUpdated, - CompetencyUpdatedAndReordered, CompetencyGroupInserted, CompetencyGroupUpdated, CompetencyGroupAndCompetencyUpdated, @@ -42,6 +41,7 @@ public CompetencyTableRow(IXLTable table, IXLRangeRow row) public string? AlwaysShowDescriptionRaw { get; set; } public ImportCompetenciesResult.ErrorReason? Error { get; set; } public RowStatus RowStatus { get; set; } + public bool Reordered { get; set; } = false; public bool Validate() { if (string.IsNullOrEmpty(Competency)) diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs index 15f5136274..5ca4536119 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/Import/ImportCompetenciesResult.cs @@ -22,10 +22,10 @@ IReadOnlyCollection competencyTableRows { ProcessedCount = competencyTableRows.Count; CompetencyAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); - CompetencyUpdatedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdated | dr.RowStatus == RowStatus.CompetencyUpdatedAndReordered); - CompetencyReorderedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdatedAndReordered); + CompetencyUpdatedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyUpdated | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyUpdated); GroupAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyGroupInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted); - SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped); + SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped && dr.Reordered == false); + CompetencyReorderedCount = competencyTableRows.Count(dr => dr.Reordered == true); Errors = competencyTableRows.Where(dr => dr.Error.HasValue).Select(dr => (dr.RowNumber, dr.Error!.Value)); FlagCount = competencyTableRows .Where(row => !string.IsNullOrWhiteSpace(row.FlagsCsv)) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index c29bb1b177..9b2f32c1c9 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -61,13 +61,10 @@ private void PreProcessCompetencyRow(CompetencyTableRow competencyRow, List { int originalIndex = existingIds.IndexOf(id); int newIndex = newIds.IndexOf(id); - if (originalIndex == newIndex) + competencyRow.RowStatus = RowStatus.CompetencyUpdated; + if (originalIndex != newIndex) { - competencyRow.RowStatus = RowStatus.CompetencyUpdated; - } - else - { - competencyRow.RowStatus = RowStatus.CompetencyUpdatedAndReordered; + competencyRow.Reordered = true; } } } @@ -125,7 +122,7 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a { maxFrameworkCompetencyGroupId = ProcessCompetencyRow(adminUserId, frameworkId, maxFrameworkCompetencyId, maxFrameworkCompetencyGroupId, addAssessmentQuestionsOption, reorderCompetenciesOption, customAssessmentQuestionID, defaultQuestionIds, competencyRow); } - // TO DO: Check for changes to competency group order and apply them if appropriate: + // Check for changes to competency group order and apply them if appropriate: if (reorderCompetenciesOption == 2) { var distinctCompetencyGroups = competenciesRows @@ -146,6 +143,10 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a for (int p = 0; p < placesToMove; p++) { frameworkService.MoveFrameworkCompetencyGroup(thisGroup.ID, true, direction); + competenciesRows + .Where(row => row.CompetencyGroup == thisGroup.Name) + .ToList() + .ForEach(row => row.Reordered = true); } } } @@ -274,10 +275,7 @@ CompetencyTableRow competencyRow frameworkService.MoveFrameworkCompetency(frameworkCompetencyId, true, direction); } - if (competencyRow.RowStatus == RowStatus.Skipped) - { - competencyRow.RowStatus = RowStatus.CompetencyUpdated; - } + competencyRow.Reordered = true; } } diff --git a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs index 48204ae0d1..6bc814b2a2 100644 --- a/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs +++ b/DigitalLearningSolutions.Web/ViewModels/Frameworks/Import/ImportCompetenciesResultsViewModel.cs @@ -14,6 +14,7 @@ public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompete CompetenciesUpdatedCount = importCompetenciesResult.CompetencyUpdatedCount; CompetencyGroupsInsertedCount = importCompetenciesResult.GroupAddedCount; CompetencyGroupsUpdatedCount = importCompetenciesResult.GroupUpdatedCount; + CompetenciesReorderedCount = importCompetenciesResult.CompetencyReorderedCount; SkippedCount = importCompetenciesResult.SkippedCount; Errors = importCompetenciesResult.Errors.Select(x => (x.RowNumber, MapReasonToErrorMessage(x.Reason))); FrameworkID = frameworkId; @@ -26,6 +27,7 @@ public ImportCompetenciesResultsViewModel(ImportCompetenciesResult importCompete public int ProcessedCount { get; set; } public int CompetenciesInsertedCount { get; set; } public int CompetenciesUpdatedCount { get; set; } + public int CompetenciesReorderedCount { get; set; } public int CompetencyGroupsInsertedCount { get; set; } public int CompetencyGroupsUpdatedCount { get; set; } public int SkippedCount { get; set; } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml index 6b21e8b765..b0f7fe5845 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml @@ -41,7 +41,7 @@

      We strongly recommend including all framework competencies in your uploaded sheet if reordering competencies to ensure that the correct sequence is applied.

      - Your uploaded file includes changes to the sequence of existing @Model.FrameworkVocabularyPlural.ToLower(). Choose whether to store the changes to @Model.FrameworkVocabularySingular.ToLower() sequence during update. + Your uploaded file includes changes to the order of existing @Model.FrameworkVocabularyPlural.ToLower(). Choose whether to store the changes to @Model.FrameworkVocabularySingular.ToLower() order during update.
      Select an option @@ -51,7 +51,7 @@
      @Model.FrameworkVocabularyPlural will be updated if they have changed but there sequence/order in the framework will not change. @@ -60,7 +60,7 @@
      The sequence of @Model.FrameworkVocabularyPlural.ToLower() in the framework will be changed to reflect the order in the sheet during processing. diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml index 3fa9b57408..87278f516d 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/UploadResults.cshtml @@ -37,6 +37,7 @@
    • @Model.CompetencyGroupsInsertedCount new @(Model.CompetencyGroupsInsertedCount == 1 ? $"{Model.FrameworkVocabularySingular.ToLower()} group" : $"{Model.FrameworkVocabularySingular.ToLower()} groups") inserted
    • @Model.CompetenciesInsertedCount new @(Model.CompetenciesInsertedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) inserted
    • @Model.CompetenciesUpdatedCount existing @(Model.CompetenciesUpdatedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) updated
    • +
    • @Model.CompetenciesReorderedCount existing @(Model.CompetenciesReorderedCount == 1 ? Model.FrameworkVocabularySingular.ToLower() : Model.FrameworkVocabularyPlural.ToLower()) reordered
    • @Model.SkippedCount rows @(Model.SkippedCount == 1 ? "line" : "lines") skipped (nothing inserted or updated but no errors)
    • @Model.ErrorCount @(Model.ErrorCount == 1 ? "line" : "lines") skipped due to errors
    From b7e76bcaa80de06c0f547458e1b2231aa1803cec Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 14:58:48 +0000 Subject: [PATCH 182/271] Update ApplyCompetencyOrdering.cshtml --- .../Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml index b0f7fe5845..456961288e 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/ApplyCompetencyOrdering.cshtml @@ -63,7 +63,7 @@ Apply changes to @Model.FrameworkVocabularySingular.ToLower() order
    - The sequence of @Model.FrameworkVocabularyPlural.ToLower() in the framework will be changed to reflect the order in the sheet during processing. + The oder of @Model.FrameworkVocabularyPlural.ToLower() in the framework will be changed to reflect the order in the sheet during processing.
    From 684156d265a6fe1a9f28144206ff3cdf8aab4200 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 15:13:11 +0000 Subject: [PATCH 183/271] TD-5233 added flags to the list of things that can't be removed and used framework vocab in list --- .../Views/Frameworks/Developer/Import/Index.cshtml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml index f94adaf54a..7a31d64dca 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/Import/Index.cshtml @@ -46,9 +46,10 @@ Bulk upload cannot be used to:

      -
    • Delete competencies or competency groups
    • -
    • Remove assessment questions from existing competencies
    • -
    • Add more than one custom assessment question to uploaded competencies
    • +
    • Delete @Model.FrameworkVocabularyPlural.ToLower() or @Model.FrameworkVocabularySingular.ToLower() groups
    • +
    • Remove assessment questions from existing @Model.FrameworkVocabularyPlural.ToLower()
    • +
    • Add more than one custom assessment question to uploaded @Model.FrameworkVocabularyPlural.ToLower()
    • +
    • Remove flags from @Model.FrameworkVocabularyPlural.ToLower()
    @@ -102,7 +103,7 @@ } else { - +

    Download a blank template for bulk adding @Model.FrameworkVocabularyPlural.ToLower() to your framework, @Model.FrameworkName. This Excel file will be empty. New @Model.FrameworkVocabularyPlural.ToLower() can be added by including their details on a blank row.

    From df0d06056e67d87a44b0b248dd6c496e3f7f40d0 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 17 Jan 2025 17:06:22 +0000 Subject: [PATCH 184/271] Formatting changes --- .../Services/ImportCompetenciesFromFileService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs index 9b2f32c1c9..02b8affac1 100644 --- a/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs +++ b/DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs @@ -143,11 +143,11 @@ internal ImportCompetenciesResult ProcessCompetenciesTable(IXLTable table, int a for (int p = 0; p < placesToMove; p++) { frameworkService.MoveFrameworkCompetencyGroup(thisGroup.ID, true, direction); - competenciesRows + } + competenciesRows .Where(row => row.CompetencyGroup == thisGroup.Name) .ToList() .ForEach(row => row.Reordered = true); - } } } } From d1b60fb384df6bc53100e7792bb3f15c0f32188f Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Mon, 20 Jan 2025 17:19:38 +0000 Subject: [PATCH 185/271] Sets up controller, view and navigation for print layout --- .../FrameworksController/Frameworks.cs | 11 +++++++ .../Developer/FrameworkPrintLayout.cshtml | 31 +++++++++++++++++++ .../Frameworks/Developer/_Structure.cshtml | 1 + 3 files changed, 43 insertions(+) create mode 100644 DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs index 7133838e07..e4599a94de 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs @@ -717,6 +717,17 @@ public IActionResult ViewFramework(string tabname, int frameworkId, int? framewo return View("Developer/Framework", model); } + [Route("/Framework/{frameworkId}/Structure/PrintLayout")] + public IActionResult PrintLayout(int frameworkId) { + var adminId = GetAdminId(); + var detailFramework = frameworkService.GetFrameworkDetailByFrameworkId(frameworkId, adminId); + var routeData = new Dictionary { { "frameworkId", detailFramework?.ID.ToString() } }; + var model = new FrameworkViewModel() + { + DetailFramework = detailFramework, + }; + return View("Developer/FrameworkPrintLayout", model); + } [ResponseCache(CacheProfileName = "Never")] public IActionResult InsertFramework() { diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml new file mode 100644 index 0000000000..5d94c62025 --- /dev/null +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml @@ -0,0 +1,31 @@ +@using DigitalLearningSolutions.Web.ViewModels.Frameworks; +@model FrameworkViewModel; +@{ + ViewData["Title"] = Model.DetailFramework.FrameworkName; + ViewData["Application"] = "Framework Service"; + ViewData["HeaderPathName"] = "Framework Service"; +} + +@section NavMenuItems { + +} +@section NavBreadcrumbs { + +} +
    + +
    +

    + @Model.DetailFramework.FrameworkName +

    +
    +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml index 849b5121ba..f6d566ad64 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml @@ -82,6 +82,7 @@ else Add @Model.VocabSingular().ToLower() group Add ungrouped @Model.VocabSingular().ToLower() Bulk upload/update @Model.VocabPlural().ToLower() + View for print
    } From af13d29f96a4f332bb4f4e89877d475f3ee5ad5f Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Tue, 21 Jan 2025 16:48:11 +0000 Subject: [PATCH 186/271] TD-5263 Implements "view for print" option for frameworks --- .../FrameworksController/Frameworks.cs | 3 + .../Styles/frameworks/frameworksShared.scss | 34 ++++++ .../Styles/layout.scss | 6 ++ .../Developer/FrameworkPrintLayout.cshtml | 100 +++++++++++++++++- .../Frameworks/Developer/_Structure.cshtml | 2 +- .../Views/Shared/_CookieConsentPartial.cshtml | 4 +- .../Views/Shared/_Layout.cshtml | 2 +- .../Shared/_UserFeedbackBarPartial.cshtml | 4 +- 8 files changed, 147 insertions(+), 8 deletions(-) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs index e4599a94de..de09607df3 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Frameworks.cs @@ -726,6 +726,9 @@ public IActionResult PrintLayout(int frameworkId) { { DetailFramework = detailFramework, }; + model.FrameworkCompetencyGroups = frameworkService.GetFrameworkCompetencyGroups(frameworkId).ToList(); + model.CompetencyFlags = frameworkService.GetCompetencyFlagsByFrameworkId(frameworkId, null, selected: true); + model.FrameworkCompetencies = frameworkService.GetFrameworkCompetenciesUngrouped(frameworkId); return View("Developer/FrameworkPrintLayout", model); } [ResponseCache(CacheProfileName = "Never")] diff --git a/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss b/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss index a6cd8f8277..b452ab9178 100644 --- a/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss +++ b/DigitalLearningSolutions.Web/Styles/frameworks/frameworksShared.scss @@ -251,3 +251,37 @@ h1.truncate-overflow::after { .float-right{ float:right; } +@media print { + + address, p, .nhsuk-body-m, ol, ul, td, .nhsuk-tag { + font-size: 12px !important; + } + + h1 { + font-size: 20px !important; + break-after: avoid; + } + + h2 { + font-size: 18px !important; + break-after: avoid; + } + + h3, table { + break-after: avoid; + break-before: auto; + } + + h3 { + font-size: 16px !important; + } + + h4, th { + font-size: 14px !important; + } + + tr { + break-inside: avoid; + page-break-inside: avoid; + } +} diff --git a/DigitalLearningSolutions.Web/Styles/layout.scss b/DigitalLearningSolutions.Web/Styles/layout.scss index 7e252f49ed..c0ef2ada6a 100644 --- a/DigitalLearningSolutions.Web/Styles/layout.scss +++ b/DigitalLearningSolutions.Web/Styles/layout.scss @@ -398,3 +398,9 @@ nav, .nhsuk-header__navigation, #header-navigation { .field-validation-valid { display: none !important; } + +@media print { + .no-print { + display: none; + } +} diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml index 5d94c62025..69ec377b44 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/FrameworkPrintLayout.cshtml @@ -4,6 +4,7 @@ ViewData["Title"] = Model.DetailFramework.FrameworkName; ViewData["Application"] = "Framework Service"; ViewData["HeaderPathName"] = "Framework Service"; + int groupNum = 0; } @section NavMenuItems { @@ -14,7 +15,7 @@
    1. Frameworks
    2. -
    3. Framework @ViewContext.RouteData.Values["tabname"]
    4. +
    5. Framework structure
    6. Print layout

    Back to Framework

    @@ -27,5 +28,100 @@

    @Model.DetailFramework.FrameworkName

    -
    + @if (!String.IsNullOrEmpty(Model.DetailFramework.Description)) + { +
    +
    +

    + Framework description + +

    +

    + @(Html.Raw(Model.DetailFramework.Description)) +

    +
    +
    + } +

    Framework @Model.VocabPlural().ToLower()

    + + @if (Model.FrameworkCompetencyGroups != null) + { + if (Model.FrameworkCompetencyGroups.Any()) + { + @foreach (var frameworkCompetencyGroup in Model.FrameworkCompetencyGroups) + { + groupNum++; +

    @frameworkCompetencyGroup.Name

    + if (frameworkCompetencyGroup.Description != null) + { +

    + @frameworkCompetencyGroup.Description +

    + } + + int compNum = 0; + if (frameworkCompetencyGroup.FrameworkCompetencies[0] != null) + { + + + + + + + + + @foreach (var frameworkCompetency in frameworkCompetencyGroup.FrameworkCompetencies) + { + compNum++; + + + + + } + +
    + @Model.VocabSingular() + + Date and Signature +
    + @frameworkCompetency.Name + + + @if (frameworkCompetency.Description != null) + { +

    + @Html.Raw(frameworkCompetency.Description) +

    + } +
    + +
    + } + } + } + } + @if (Model.FrameworkCompetencies != null) + { + if (Model.FrameworkCompetencies.Any()) + { + groupNum++; + int compNum = 0; +

    Ungrouped competencies

    + foreach (var frameworkCompetency in Model.FrameworkCompetencies) + { + compNum++; +
    +

    @frameworkCompetency.Name

    + + @if (frameworkCompetency.Description != null) + { +

    + @frameworkCompetency.Description +

    + } +
    + } + } + } +
    diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml index f6d566ad64..ca13087c27 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml @@ -82,7 +82,7 @@ else Add @Model.VocabSingular().ToLower() group Add ungrouped @Model.VocabSingular().ToLower() Bulk upload/update @Model.VocabPlural().ToLower() - View for print + View for print
    } diff --git a/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml b/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml index 9500f932e9..bffbbc36f8 100644 --- a/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml +++ b/DigitalLearningSolutions.Web/Views/Shared/_CookieConsentPartial.cshtml @@ -9,7 +9,7 @@ @if (showCookieBanner == null && validateCookieBannerViaTempData == null) // [BY] Show cookie banner when the value is null. if the user consent yes or no then we dont display the banner { -