diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index 42d7cdc60d..24733caa5e 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -874,7 +874,7 @@ FROM SelfAssessmentStructure WHERE (SelfAssessmentID = {assessmentId}))" : string.Empty; var result = connection.Query( - @$"SELECT fcg.ID, fcg.CompetencyGroupID, cg.Name, fcg.Ordering, fc.ID, c.ID AS CompetencyID, c.Name, c.Description, fc.Ordering, + @$"SELECT fcg.ID, fcg.CompetencyGroupID, cg.Name, cg.Description as CompetencyGroupDescription, fcg.Ordering, fc.ID, c.ID AS CompetencyID, c.Name, c.Description, fc.Ordering, (SELECT COUNT(*) FROM CompetencyAssessmentQuestions caq WHERE caq.CompetencyID = c.ID) AS AssessmentQuestions ,(SELECT COUNT(*) FROM CompetencyLearningResources clr WHERE clr.CompetencyID = c.ID AND clr.RemovedDate IS NULL) AS CompetencyLearningResourcesCount FROM FrameworkCompetencyGroups AS fcg INNER JOIN @@ -882,7 +882,7 @@ FROM FrameworkCompetencyGroups AS fcg INNER JOIN FrameworkCompetencies AS fc ON fcg.ID = fc.FrameworkCompetencyGroupID LEFT OUTER JOIN Competencies AS c ON fc.CompetencyID = c.ID WHERE (fcg.FrameworkID = @frameworkId) {assessmentFilter} - GROUP BY fcg.ID, fcg.CompetencyGroupID, cg.Name, fcg.Ordering, fc.ID, c.ID, c.Name, c.Description, fc.Ordering + GROUP BY fcg.ID, fcg.CompetencyGroupID, cg.Name, cg.Description, fcg.Ordering, fc.ID, c.ID, c.Name, c.Description, fc.Ordering ORDER BY fcg.Ordering, fc.Ordering", (frameworkCompetencyGroup, frameworkCompetency) => { diff --git a/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetencyGroup.cs b/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetencyGroup.cs index fde0038b96..530cdd5f78 100644 --- a/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetencyGroup.cs +++ b/DigitalLearningSolutions.Data/Models/Frameworks/FrameworkCompetencyGroup.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; public class FrameworkCompetencyGroup : CompetencyGroupBase { + public string? CompetencyGroupDescription { get; set; } public int Ordering { get; set; } public List FrameworkCompetencies { get; set; } = new List(); } diff --git a/DigitalLearningSolutions.Web/Views/Frameworks/Shared/_CompetencyGroupCard.cshtml b/DigitalLearningSolutions.Web/Views/Frameworks/Shared/_CompetencyGroupCard.cshtml index a94b6562ff..deb6fabf7f 100644 --- a/DigitalLearningSolutions.Web/Views/Frameworks/Shared/_CompetencyGroupCard.cshtml +++ b/DigitalLearningSolutions.Web/Views/Frameworks/Shared/_CompetencyGroupCard.cshtml @@ -8,7 +8,7 @@

- @Html.Raw(@Model.FrameworkCompetencyGroup.Description) + @Html.Raw(@Model.FrameworkCompetencyGroup.CompetencyGroupDescription) @if (Model.CanModify) {