diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml index 1cd95ece04..6ce653644c 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml @@ -40,7 +40,7 @@

@Model.SelfAssessment.Name - @Model.VocabPlural()

- +

@Model.CompetencyGroups.Sum(g => g.Count()) matching @Model.VocabPlural().ToLower()

@if (Model.CompetencyGroups.Any()) @@ -51,7 +51,7 @@ var selfAssessedCount = questions.Count(q => q.ResultId.HasValue); var verifiedCount = questions.Count(q => q.Verified.HasValue); var competencySummaryViewData = new ViewDataDictionary(ViewData) - { +{ { "isSupervisorResultsReviewed", Model.SelfAssessment.IsSupervisorResultsReviewed }, { "questionsCount", questions.Count() }, { "selfAssessedCount", selfAssessedCount }, @@ -62,11 +62,11 @@ questionsTotal += questions.Count();
@{ - var expanderOpen = Model.CompetencyGroups.Count() == 1 - ? "open" - : ViewContext.RouteData.Values.ContainsKey("competencyGroupId") - ? ViewContext.RouteData.Values["competencyGroupId"].Equals(competencyGroup.First().CompetencyGroupID.ToString()) ? "open" : "" - : ""; + var expanderOpen = Model.CompetencyGroups.Count() == 1 + ? "open" + : ViewContext.RouteData.Values.ContainsKey("competencyGroupId") + ? ViewContext.RouteData.Values["competencyGroupId"].Equals(competencyGroup.First().CompetencyGroupID.ToString()) ? "open" : "" + : ""; }
@@ -83,6 +83,34 @@ view-data="@(new ViewDataDictionary(ViewData) { { "competencyGroup", competencyGroup } })" /> } + diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml index ed9076304a..fd6ee6a42e 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml @@ -1,5 +1,5 @@ @using DigitalLearningSolutions.Data.Models.SelfAssessments; -@model IGrouping; +@model IGrouping; @@ -28,31 +28,52 @@ @foreach (var competency in Model) { - - - - - - - @foreach (var question in competency.AssessmentQuestions.Skip(1)) - { - - + + + + + + + @foreach (var question in competency.AssessmentQuestions.Skip(1)) + { + + - + - } - } - -
- @competency.Vocabulary @competency.Name - @if (competency.AlwaysShowDescription) { -

@Html.Raw(competency.Description)

- } -
- Action - - Review - -
+ @if (competency.Description != null && !competency.AlwaysShowDescription) + { +
+ +

+ @competency.Vocabulary + @competency.Name +

+
+
+ @(Html.Raw(@competency.Description)) +
+
+ } + else + { +

+ @competency.Vocabulary @competency.Name +

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

+ @(Html.Raw(competency.Description)) +

+ } + } +
+ Action + + Review + +
+ + } +