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 @@ -863,15 +863,15 @@ public void RemoveCustomFlag(int flagId)
public IEnumerable<FrameworkCompetencyGroup> GetFrameworkCompetencyGroups(int frameworkId)
{
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, COUNT(caq.AssessmentQuestionID) AS AssessmentQuestions
@"SELECT fcg.ID, fcg.CompetencyGroupID, cg.Name, cg.Description, fcg.Ordering, fc.ID, c.ID AS CompetencyID, c.Name, c.Description, fc.Ordering, COUNT(caq.AssessmentQuestionID) 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 LEFT OUTER JOIN
CompetencyAssessmentQuestions AS caq ON c.ID = caq.CompetencyID
WHERE (fcg.FrameworkID = @frameworkId)
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,8 +3,12 @@
<details id="[email protected]" class="nhsuk-details nhsuk-expander nhsuk-u-margin-bottom-3" @((int)ViewData["GroupCount"] == 1 ? "open" : (ViewContext.RouteData.Values.ContainsKey("frameworkCompetencyGroupId") ? (ViewContext.RouteData.Values["frameworkCompetencyGroupId"].Equals(Model.FrameworkCompetencyGroup.ID.ToString()) ? "open" : "") : ""))>
<summary class="nhsuk-details__summary">
<span class="nhsuk-details__summary-text">

@Model.FrameworkCompetencyGroup.Name (@Model.FrameworkCompetencyGroup.FrameworkCompetencies.Count() @ViewData["VocabPlural"].ToString().ToLower())
@Model.FrameworkCompetencyGroup.Name (@Model.FrameworkCompetencyGroup.FrameworkCompetencies.Count() @ViewData["VocabPlural"].ToString().ToLower())
</span>
<br />
<br />
<span class="nhsuk-u-secondary-text-color nhsuk-body">
@Html.Raw(@Model.FrameworkCompetencyGroup.Description)
</span>
@if (Model.CanModify)
{
Expand Down
Loading