Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
2e192df
TD-5180-Added verification if sign-off rejected.
auldrinpossa Dec 24, 2024
3f0ec0d
TD-5096 Hide the link to the DSAT report if the admin user is in a ca…
sherif-olaboye Jan 9, 2025
5f899dd
TD-4340 Issue with the 'Course content' change link when creating a c…
sherif-olaboye Jan 13, 2025
99482e1
TD-4340 Issue with the 'Course content' change link when creating a c…
sherif-olaboye Jan 13, 2025
276b11c
TD-5131 ‘Request Educator/Manager sign off' screen and can be able to…
sherif-olaboye Jan 15, 2025
752b4dd
TD-5028 Supervise - Remove staff member doesn't remove the supervisor…
sherif-olaboye Jan 16, 2025
441d4ae
Merge pull request #3038 from TechnologyEnhancedLearning/Develop/Fix/…
rshrirohit Jan 20, 2025
79a5e4a
Merge pull request #3062 from TechnologyEnhancedLearning/Develop/Fixe…
rshrirohit Jan 21, 2025
215bd20
Merge pull request #3063 from TechnologyEnhancedLearning/Develop/Fixe…
rshrirohit Jan 21, 2025
ec55a05
TD-4435 Mismatch of 'Enrolment method' showing on 'Tracking system' &…
sherif-olaboye Jan 21, 2025
b2acd3e
Update dependabot.yml
binon Jan 22, 2025
0a22e4a
Update auto-merge.yml
binon Jan 22, 2025
b116823
Merge pull request #3060 from TechnologyEnhancedLearning/Develop/Fixe…
rshrirohit Jan 23, 2025
d363e89
Merge pull request #3069 from TechnologyEnhancedLearning/Develop/Fixe…
rshrirohit Jan 23, 2025
c64dfb3
TD-5138_ Staff count was incorrect on the dashboard and doesn't match…
ABSinhaa Jan 23, 2025
316357f
TD-4405-Displays the CommentsPrompt label if it exists
Auldrin-Possa Jan 23, 2025
17ad383
Merge pull request #3074 from TechnologyEnhancedLearning/dependabot_f…
binon Jan 24, 2025
fc35590
Merge pull request #3056 from TechnologyEnhancedLearning/Develop/Feat…
rshrirohit Jan 27, 2025
7a6cbfd
Merge pull request #3075 from TechnologyEnhancedLearning/Develop/fixe…
rshrirohit Jan 27, 2025
40cfeb7
Merge pull request #3076 from TechnologyEnhancedLearning/Develop/Fix/…
rshrirohit Jan 27, 2025
1bd0203
TD-5242-Added 'Inactive' label when admin is inactive.
Auldrin-Possa Jan 27, 2025
a51a950
Merge pull request #3088 from TechnologyEnhancedLearning/Develop/Fix/…
rshrirohit Jan 28, 2025
58b567b
TD-4169 Framework Contributor Permission Not Working
rshrirohit Jan 28, 2025
d6a5f00
TD-5242-verified if delegate account is active
Auldrin-Possa Jan 29, 2025
a20cd7a
TD-4169 Correcting the condition for Getting Roles
rshrirohit Jan 30, 2025
034e137
Merge pull request #3093 from TechnologyEnhancedLearning/Develop/Fixe…
rshrirohit Jan 30, 2025
b1438be
Merge pull request #3094 from TechnologyEnhancedLearning/Develop/Fix/…
rshrirohit Jan 30, 2025
445e9d9
TD-5153 Implements page changes and starts to implement download actions
kevwhitt-hee Dec 19, 2024
a10bc65
Update FrameworkDataService.cs
kevwhitt-hee Dec 19, 2024
0b9f6b0
TD-5153 Implements download competencies and templates functions and …
kevwhitt-hee Dec 20, 2024
608d065
Update ImportCompleted.cshtml
kevwhitt-hee Dec 20, 2024
db211c7
Implements models for handling upload
kevwhitt-hee Dec 20, 2024
e6c3188
Formatter changes
kevwhitt-hee Dec 20, 2024
c036d2e
Fixes form input id
kevwhitt-hee Dec 20, 2024
28095c6
TD-5154 Implements basic pre-process logic and view and adds validati…
kevwhitt-hee Dec 23, 2024
3685f81
TD-5154 Implements upload results page with validation errors
kevwhitt-hee Dec 23, 2024
5745355
TD-5154 Adds always show description validation
kevwhitt-hee Dec 23, 2024
1e4307c
Formatter changes
kevwhitt-hee Dec 23, 2024
162b84c
Fixes query to avoid reliance on new SQL 2017 STRING_AGG function
kevwhitt-hee Dec 23, 2024
ddc2ecd
TD-5216 Moves to import namespace and separates form data in viewmodel
kevwhitt-hee Dec 30, 2024
a1285db
TD-5216 Load FALSE into AlwaysShowDescription field for downloaded te…
kevwhitt-hee Dec 30, 2024
64496c5
TD-5216 Adds competency vocabulary to views
kevwhitt-hee Dec 30, 2024
e7fe755
TD-5216 Uses custom competency vocabulary in Excel file processing
kevwhitt-hee Dec 30, 2024
17632e1
IDE formatter changes
kevwhitt-hee Dec 30, 2024
3549c81
TD-5155 Begins to implement add questions view model
kevwhitt-hee Dec 30, 2024
2560772
TD-5155 Adds view model and constructor
kevwhitt-hee Dec 31, 2024
2a49f50
TD-5155 Implements conditional preselected checkboxes for default que…
kevwhitt-hee Dec 31, 2024
42794e2
TD-5155 Implements add assessment questions form view
kevwhitt-hee Jan 2, 2025
c1364ef
Tweaks post data processing to handle storing false values
kevwhitt-hee Jan 2, 2025
e2e1912
TD-5158 Implements add questions to which competencies form
kevwhitt-hee Jan 2, 2025
63d858f
Removes spurious usings
kevwhitt-hee Jan 2, 2025
bf16b9b
TD-5219 Improvements to pre-processing summary and errors
kevwhitt-hee Jan 3, 2025
e08a14d
Adds missing @ to indicate inline code
kevwhitt-hee Jan 3, 2025
b43564d
TD-5220 Implements store competency ordering option form
kevwhitt-hee Jan 3, 2025
6e17eca
TD-5220 passes ids of uploaded competencies to get order of stored co…
kevwhitt-hee Jan 6, 2025
f6c725a
TD-5220 Implements CancelImport method to clear down uploaded file an…
kevwhitt-hee Jan 6, 2025
a8edb77
TD-5162 Implements import summary screen
kevwhitt-hee Jan 6, 2025
124216a
formatter changes
kevwhitt-hee Jan 6, 2025
a7c338f
TD-5163 Process imported competencies
kevwhitt-hee Jan 7, 2025
810fd8e
TD-5163 Implements the upload results view
kevwhitt-hee Jan 7, 2025
4feeabe
TD-5163 Fixes flag assignment during upload processing
kevwhitt-hee Jan 8, 2025
94d68b5
TD-5163 General tweaks to improve wording of buttons and body text
kevwhitt-hee Jan 8, 2025
2695984
TD-5163 Corrects heading
kevwhitt-hee Jan 8, 2025
b5dd0ff
TD-5163 modifies the insert competency group method to take an option…
kevwhitt-hee Jan 8, 2025
8a9c022
TD-5163 Clears down the uploaded sheet after processing
kevwhitt-hee Jan 8, 2025
6e7653b
TD-5163 Commits competency order changes if required
kevwhitt-hee Jan 9, 2025
5a1ce68
TD-5163 Reorders competency groups if needed
kevwhitt-hee Jan 10, 2025
b516c56
TD-5163 Fixes navigation and titles
kevwhitt-hee Jan 10, 2025
b002c2b
TD-5163 Fixes competency group reordering by reloading the committed …
kevwhitt-hee Jan 10, 2025
3ec6b0c
Applies BR DLSFW1 to standard insert competency group functionality
kevwhitt-hee Jan 10, 2025
9305903
Adds published framework warning to summary page
kevwhitt-hee Jan 10, 2025
f7e0516
TD-5233 Add a limitations paragraph to the start page
kevwhitt-hee Jan 17, 2025
d1a8687
Emphasises cannot
kevwhitt-hee Jan 17, 2025
a25e7b5
Moves single line inset text to view component
kevwhitt-hee Jan 17, 2025
732ab42
TD-5233 Indicates the number of competencies reordered in the upload …
kevwhitt-hee Jan 17, 2025
b55778a
Update ApplyCompetencyOrdering.cshtml
kevwhitt-hee Jan 17, 2025
51d55de
TD-5233 added flags to the list of things that can't be removed and u…
kevwhitt-hee Jan 17, 2025
e540967
Formatting changes
kevwhitt-hee Jan 17, 2025
fb78c0e
Sets up controller, view and navigation for print layout
kevwhitt-hee Jan 20, 2025
95833cd
TD-5263 Implements "view for print" option for frameworks
kevwhitt-hee Jan 21, 2025
cb9133d
Merge branch 'master' into DLS-Release-v1.2.0
kevwhitt-hee Jan 31, 2025
5d9c016
Header changes for NHS Design System v 9
kevwhitt-hee Jan 31, 2025
226edb1
TD-5327 Updates to latest version and finishes fixing styling issues
kevwhitt-hee Jan 31, 2025
3ae33b6
Sets nav width to same as width container override and loads nhsuk js
kevwhitt-hee Jan 31, 2025
3b5ee9b
Merge pull request #3100 from TechnologyEnhancedLearning/Develop/Fixe…
kevwhitt-hee Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,35 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
registries:
tel-azure-package-source:
type: nuget-feed
url: "https://pkgs.dev.azure.com/e-LfH/_packaging/LearningHubFeed/nuget/v3/index.json"
username: "kevin.whittaker"
password: ${{ secrets.AZURE_DEVOPS_PAT }}
nuget-package-source:
type: nuget-feed
url: "https://api.nuget.org/v3/index.json"
updates:
- package-ecosystem: "nuget"
directory: "/" # Location of package manifests
schedule:
interval: "daily"
open-pull-requests-limit: 10
registries:
- tel-azure-package-source
- nuget-package-source
target-branch: "Automatic_version_update_dependabot"
ignore:
# Ignore updates to packages that start with 'Wildcards'
- dependency-name: "Microsoft.FeatureManagement.AspNetCore*"
# Ignore some updates to the package
- dependency-name: "Microsoft.VisualStudio.Web.CodeGeneration.Design"
versions: [">7.0.0"]
versions: [">9.0.0"]
- dependency-name: "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation"
versions: [">7.0.0"]
versions: [">9.0.0"]
- dependency-name: "Microsoft.AspNetCore.Mvc.Testing"
versions: [">7.0.0"]
versions: [">9.0.0"]
- dependency-name: "Selenium.WebDriver.ChromeDriver"
versions: ">=113.0.5672.1278" # Recommended version
# For all packages, ignore all patch updates
Expand All @@ -34,7 +46,7 @@ updates:
interval: "daily"
target-branch: "Automatic_version_update_dependabot"
# - "dependencies"
open-pull-requests-limit: 7
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
7 changes: 6 additions & 1 deletion .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ jobs:
echo "Skipping 'auto-merge' workflow check to prevent self-referencing."
continue
fi


# If any check is still queued, set ALL_COMPLETED to false
if [[ "$status" == "QUEUED" ]]; then
ALL_COMPLETED=false
fi

# If any check is still in progress, set ALL_COMPLETED to false
if [[ "$status" == "IN_PROGRESS" ]]; then
ALL_COMPLETED=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,16 +537,16 @@ LEFT OUTER JOIN UserCentreDetails AS UCD ON
if (candidateAssessmentId > 1 && supervisorDelegateId == 0)
{
connection.Execute(
@"UPDATE CandidateAssessments SET RemovedDate = NULL, EnrolmentMethodId = @enrolmentMethodId, CompleteByDate = @completeByDateDynamic
@"UPDATE CandidateAssessments SET RemovedDate = NULL, EnrolmentMethodId = @enrolmentMethodId, CompleteByDate = @completeByDateDynamic, EnrolledByAdminId = @enrolledByAdminId
WHERE ID = @candidateAssessmentId",
new { candidateAssessmentId, enrolmentMethodId, completeByDateDynamic }
new { candidateAssessmentId, enrolmentMethodId, completeByDateDynamic, enrolledByAdminId }
);
}
if (candidateAssessmentId > 1 && supervisorDelegateId != 0)
{
string sqlQuery = $@"
BEGIN TRANSACTION
UPDATE CandidateAssessments SET RemovedDate = NULL, EnrolmentMethodId = @enrolmentMethodId, CompleteByDate = @completeByDateDynamic
UPDATE CandidateAssessments SET RemovedDate = NULL, EnrolmentMethodId = @enrolmentMethodId, CompleteByDate = @completeByDateDynamic, EnrolledByAdminId = @enrolledByAdminId
WHERE ID = @candidateAssessmentId

UPDATE CandidateAssessmentSupervisors SET Removed = NULL
Expand All @@ -556,7 +556,7 @@ BEGIN TRANSACTION
COMMIT TRANSACTION";

connection.Execute(sqlQuery
, new { candidateAssessmentId, selfAssessmentSupervisorRoleId, enrolmentMethodId, completeByDateDynamic, supervisorDelegateId });
, new { candidateAssessmentId, selfAssessmentSupervisorRoleId, enrolmentMethodId, completeByDateDynamic, supervisorDelegateId, enrolledByAdminId });
}

if (supervisorId > 0)
Expand Down
161 changes: 115 additions & 46 deletions DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ 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.SelfAssessmentReview, 1) = 1)
AND (cas.ID NOT IN (SELECT CandidateAssessmentSupervisorID FROM CandidateAssessmentSupervisorVerifications WHERE Verified IS NULL))
AND au.Active = 1
AND au.Active = 1 AND (au.Supervisor = 1 or au.NominatedSupervisor = 1)
AND (au.CategoryID = 0 OR au.CategoryID IN (select CategoryID from SelfAssessments where ID = @selfAssessmentId))
ORDER BY SupervisorName",
new { selfAssessmentId, delegateUserId }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,35 @@ public SupervisorDataService(IDbConnection connection, ILogger<SupervisorDataSer
public DashboardData? GetDashboardDataForAdminId(int adminId)
{
return connection.Query<DashboardData>(
@" SELECT (SELECT COUNT(sd.ID) AS StaffCount
FROM SupervisorDelegates sd
LEFT OUTER JOIN users u
ON u.id = sd.DelegateUserID
AND u.Active = 1
WHERE (sd.SupervisorAdminID = @adminId)
AND (sd.Removed IS NULL)) AS StaffCount,
@"SELECT (SELECT COUNT(sd.ID) AS StaffCount
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 (sd.Removed IS NULL) AND
(u.ID = da.UserID OR sd.DelegateUserID IS NULL)) AS StaffCount,
(SELECT COUNT(ID) AS StaffCount
FROM SupervisorDelegates AS SupervisorDelegates_1
WHERE (SupervisorAdminID = @adminId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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; }
}
}
Original file line number Diff line number Diff line change
@@ -1,53 +1,69 @@
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,
InvalidAlwaysShowDescription,
InvalidId
}
public class CompetencyTableRow
public class CompetencyTableRow : BulkCompetency
{
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<string?>();
}

RowNumber = row.RowNumber();
CompetencyGroupName = FindFieldValue("competency group");
CompetencyName = FindFieldValue("competency name");
CompetencyDescription = FindFieldValue("competency description");
ID = row.Cell(1).GetValue<int?>();
CompetencyGroup = row.Cell(2).GetValue<string?>();
GroupDescription = row.Cell(3).GetValue<string?>();
Competency = row.Cell(4).GetValue<string?>();
CompetencyDescription = row.Cell(5).GetValue<string?>();
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? CompetencyGroupName { get; set; }
public string? CompetencyName { get; set; }
public string? CompetencyDescription { get; set; }
public int CompetencyOrderNumber { get; set; }
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(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;
}
else if (!string.IsNullOrWhiteSpace(AlwaysShowDescriptionRaw) && !bool.TryParse(AlwaysShowDescriptionRaw, out _))
{
Error = ImportCompetenciesResult.ErrorReason.InvalidAlwaysShowDescription;
}
else if (RowStatus == RowStatus.InvalidId)
{
Error = ImportCompetenciesResult.ErrorReason.InvalidId;
}

return !Error.HasValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ public class ImportCompetenciesResult
{
public enum ErrorReason
{
InvalidId,
MissingCompetencyName,
TooLongCompetencyGroupName,
TooLongCompetencyName,
AlreadyExists
TooLongCompetencyGroupName,
InvalidAlwaysShowDescription
}
public ImportCompetenciesResult() { }

Expand All @@ -20,16 +21,39 @@ IReadOnlyCollection<CompetencyTableRow> 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);
SkippedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.Skipped);
CompetencyAddedCount = competencyTableRows.Count(dr => dr.RowStatus == RowStatus.CompetencyInserted | dr.RowStatus == RowStatus.CompetencyGroupAndCompetencyInserted);
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 && 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))
.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; }
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 CompetencyReorderedCount { get; set; }
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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public AddNewCentreCourseTempData()
public CourseOptionsTempData? CourseOptionsData { get; set; }
public CourseContentTempData? CourseContentData { get; set; }
public List<SectionContentTempData>? SectionContentData { get; set; }

public bool EditCourseContent { get; set; }
public void SetApplicationAndResetModels(ApplicationDetails application)
{
if (Application == application)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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()
Expand All @@ -42,7 +46,8 @@ public void SetUp()
learningHubApiClient = A.Fake<ILearningHubApiClient>();
searchSortFilterPaginateService = A.Fake<ISearchSortFilterPaginateService>();
multiPageFormService = A.Fake<IMultiPageFormService>();

clockUtility = A.Fake<ClockUtility>();
webHostEnvironment = A.Fake<IWebHostEnvironment>();
A.CallTo(() => config["CurrentSystemBaseUrl"]).Returns(BaseUrl);

var user = new ClaimsPrincipal(
Expand All @@ -65,7 +70,9 @@ public void SetUp()
competencyLearningResourcesService,
learningHubApiClient,
searchSortFilterPaginateService,
multiPageFormService
multiPageFormService,
clockUtility,
webHostEnvironment
)
{
ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { User = user } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public void SetCourseContent_get_redirects_to_summary_if_application_has_no_sect
).Returns(new List<Section>());

// When
var result = controller.SetCourseContent();
var result = controller.SetCourseContent(false);

// Then
result.Should().BeRedirectToActionResult().WithActionName("Summary");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -41,7 +43,9 @@ public void Setup()
A.Fake<ICompetencyLearningResourcesService>(),
A.Fake<ILearningHubApiClient>(),
A.Fake<ISearchSortFilterPaginateService>(),
A.Fake<IMultiPageFormService>()
A.Fake<IMultiPageFormService>(),
A.Fake<IClockUtility>(),
A.Fake<IWebHostEnvironment>()
)
.WithDefaultContext().WithMockTempData();

Expand Down
Loading
Loading