Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -874,15 +874,15 @@ FROM SelfAssessmentStructure
WHERE (SelfAssessmentID = {assessmentId}))"
: string.Empty;
var result = connection.Query<FrameworkCompetencyGroup, FrameworkCompetency, FrameworkCompetencyGroup>(
@$"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
CompetencyGroups AS cg ON fcg.CompetencyGroupID = cg.ID LEFT OUTER 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) =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Generic;
public class FrameworkCompetencyGroup : CompetencyGroupBase
{
public string? CompetencyGroupDescription { get; set; }
public int Ordering { get; set; }
public List<FrameworkCompetency> FrameworkCompetencies { get; set; } = new List<FrameworkCompetency>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<br />
<br />
<span class="nhsuk-u-secondary-text-color nhsuk-body">
@Html.Raw(@Model.FrameworkCompetencyGroup.Description)
@Html.Raw(@Model.FrameworkCompetencyGroup.CompetencyGroupDescription)
</span>
@if (Model.CanModify)
{
Expand Down
Loading