From 9c3834a488fb11f078cdc770a66b504a44956782 Mon Sep 17 00:00:00 2001 From: Daniel Manta Date: Fri, 29 Apr 2022 17:37:18 +0100 Subject: [PATCH 1/9] DLSV2-536 Move the competency description text in the self assessment overview and supervisor review self assessment to expanders throughout --- .../SelfAssessments/_OverviewTable.cshtml | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml index ed9076304a..d6284a7200 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml @@ -1,5 +1,13 @@ @using DigitalLearningSolutions.Data.Models.SelfAssessments; @model IGrouping; + @@ -32,8 +40,32 @@ From dc32c3439a5472b27fb6cf1ce59dec945eddd70b Mon Sep 17 00:00:00 2001 From: Daniel Manta Date: Fri, 29 Apr 2022 18:30:24 +0100 Subject: [PATCH 2/9] DLSV2-536 Moved code to parent view as it only needs to appear one time on the generated html page --- .../SelfAssessments/SelfAssessmentOverview.cshtml | 8 ++++++++ .../SelfAssessments/_OverviewTable.cshtml | 10 +--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml index 1cd95ece04..e7978768f8 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml @@ -83,6 +83,14 @@ 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 d6284a7200..ff1e2d235a 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml @@ -1,13 +1,5 @@ @using DigitalLearningSolutions.Data.Models.SelfAssessments; -@model IGrouping; - +@model IGrouping;
@competency.Vocabulary @competency.Name - @if (competency.AlwaysShowDescription) { -

@Html.Raw(competency.Description)

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

+ + @competency.Name + +

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

+ @competency.Name +

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

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

+ } }
From 388d3d6c7b3635f179ab7065a7a66cee9471db20 Mon Sep 17 00:00:00 2001 From: Daniel Manta Date: Tue, 3 May 2022 12:58:44 +0100 Subject: [PATCH 3/9] DLSV2-536 Removed redundant competency name --- .../LearningPortal/SelfAssessments/_OverviewTable.cshtml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml index ff1e2d235a..121ba570c4 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml @@ -31,15 +31,13 @@ - + + + + + + @foreach (var question in competency.AssessmentQuestions.Skip(1)) { -

- @competency.Vocabulary @competency.Name -

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

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

- } - } - - - - - @foreach (var question in competency.AssessmentQuestions.Skip(1)) - { - - + + - + - } - } - -
- @competency.Vocabulary @competency.Name @if (competency.Description != null && !competency.AlwaysShowDescription) {

- - @competency.Name - + @competency.Vocabulary + @competency.Name

@@ -50,7 +48,7 @@ else {

- @competency.Name + @competency.Vocabulary @competency.Name

@if (competency.Description != null) { From 42254be688bfbe29712753f4edeee62e59ca5d8c Mon Sep 17 00:00:00 2001 From: Daniel Manta Date: Tue, 3 May 2022 17:44:40 +0100 Subject: [PATCH 4/9] DLSV2-536 Turn Expander into a Details control --- .../SelfAssessments/SelfAssessmentOverview.cshtml | 4 ++-- .../LearningPortal/SelfAssessments/_OverviewTable.cshtml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml index e7978768f8..db714671fb 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml @@ -62,13 +62,13 @@ questionsTotal += questions.Count();
@{ - var expanderOpen = Model.CompetencyGroups.Count() == 1 + var detailsOpen = Model.CompetencyGroups.Count() == 1 ? "open" : ViewContext.RouteData.Values.ContainsKey("competencyGroupId") ? ViewContext.RouteData.Values["competencyGroupId"].Equals(competencyGroup.First().CompetencyGroupID.ToString()) ? "open" : "" : ""; } -
+
@competencyGroup.Key diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml index 121ba570c4..1cf75d49e7 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml @@ -40,7 +40,7 @@ @competency.Name -
+
@(Html.Raw(@competency.Description))
From 191cb032c202876139d11a08bf7e67ccc2a66a19 Mon Sep 17 00:00:00 2001 From: Daniel Manta Date: Thu, 5 May 2022 11:15:16 +0100 Subject: [PATCH 5/9] DLSV2-536 When listing competencies, use Expanders (+/-) for groups and Details (arrows) for competencies. Prevent error when competency description is null. --- .../SelfAssessmentOverview.cshtml | 26 +++++- .../SelfAssessments/_OverviewTable.cshtml | 89 +++++++++---------- 2 files changed, 67 insertions(+), 48 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml index e7978768f8..71700a76d6 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml @@ -84,11 +84,31 @@ } -
- @if (competency.Description != null && !competency.AlwaysShowDescription) - { -
- -

- @competency.Vocabulary - @competency.Name +

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

+ @competency.Vocabulary + @competency.Name +

+
+
+ @(Html.Raw(@competency.Description)) +
+
+ } + else if(competency.Description != null) + { +

+ @competency.Vocabulary @competency.Name

- -
- @(Html.Raw(@competency.Description)) -
- - } - else + @if (competency.Description != null) + { +

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

+ } + } +
+ Action + + Review + +
- Action - - Review - -
+ + } + From 6c88da7af49f940814bc00aa982dee39dc81581a Mon Sep 17 00:00:00 2001 From: Daniel Manta Date: Thu, 5 May 2022 12:16:14 +0100 Subject: [PATCH 6/9] DLSV2-536 Removed validation no longer needed --- .../Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml index e9dc34b1e3..b3b75fc1c0 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml @@ -45,7 +45,7 @@ } - else if(competency.Description != null) + else {

@competency.Vocabulary @competency.Name From 7e8bcdc4fdadd301c2f270d7480054487723e325 Mon Sep 17 00:00:00 2001 From: kevwhitt-hee Date: Fri, 6 May 2022 12:01:48 +0100 Subject: [PATCH 7/9] Revert "Merge branch 'Develop/Features/DLSV2-536-MoveCompetencyDescriptionToExpanders' of https://github.com/TechnologyEnhancedLearning/DLSV2 into Develop/Features/DLSV2-536-MoveCompetencyDescriptionToExpanders" This reverts commit 196b84717c526e7d0c94742f1ab34b4b58a2d36f, reversing changes made to 42254be688bfbe29712753f4edeee62e59ca5d8c. --- .../SelfAssessmentOverview.cshtml | 26 +----- .../SelfAssessments/_OverviewTable.cshtml | 89 ++++++++++--------- 2 files changed, 48 insertions(+), 67 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml index 046712c492..db714671fb 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/SelfAssessmentOverview.cshtml @@ -84,31 +84,11 @@ } - - - @if (competency.Description != null && !competency.AlwaysShowDescription) - { -
- -

- @competency.Vocabulary - @competency.Name -

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

- @competency.Vocabulary @competency.Name + + + + @if (competency.Description != null && !competency.AlwaysShowDescription) + { +
+ +

+ @competency.Vocabulary + @competency.Name

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

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

- } - } - - - - Action - - Review - - - - @foreach (var question in competency.AssessmentQuestions.Skip(1)) +
+
+ @(Html.Raw(@competency.Description)) +
+
+ } + else { - - +

+ @competency.Vocabulary @competency.Name +

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

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

+ } + } + + + + Action + + Review + + + + @foreach (var question in competency.AssessmentQuestions.Skip(1)) + { + + - + + } + } - - } - + + From 08dfd1aa97308d36cb5c1f924b48a8b8000d4727 Mon Sep 17 00:00:00 2001 From: Daniel Manta Date: Fri, 6 May 2022 13:56:13 +0100 Subject: [PATCH 8/9] DLSV2-536 Minor change, avoid using h2 tag --- .../SelfAssessments/_OverviewTable.cshtml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml index b3b75fc1c0..283665479e 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml @@ -35,24 +35,24 @@ {
-

+

@competency.Vocabulary @competency.Name -

+

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

+

@competency.Vocabulary @competency.Name -

+

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

+

@(Html.Raw(competency.Description))

} From 5bb4bf6bc0ba0f8deeac70e9dd46d71b020c1ff1 Mon Sep 17 00:00:00 2001 From: Daniel Manta Date: Mon, 16 May 2022 13:16:34 +0100 Subject: [PATCH 9/9] DLSV2-536 Minor style changes --- .../LearningPortal/SelfAssessments/_OverviewTable.cshtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml index 09706c7a4c..fd6ee6a42e 100644 --- a/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml +++ b/DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml @@ -35,24 +35,24 @@ {
-

+

@competency.Vocabulary @competency.Name

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

+

@competency.Vocabulary @competency.Name

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

+

@(Html.Raw(competency.Description))

}