Skip to content

Commit e5c7fe5

Browse files
committed
Merge branch 'DLS-Release-v1.2.2' into UAT
2 parents 21a27e6 + d3a6ec1 commit e5c7fe5

File tree

13 files changed

+307
-306
lines changed

13 files changed

+307
-306
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,3 +512,5 @@ DigitalLearningSolutions.Web/Views/Shared/Components/SelectList/Default.cshtml
512512
DigitalLearningSolutions.Web/Views/Shared/Components/SingleCheckbox/Default.cshtml
513513
DigitalLearningSolutions.Web/Views/Shared/Components/TextArea/Default.cshtml
514514
DigitalLearningSolutions.Web/Views/Shared/Components/TextInput/Default.cshtml
515+
/DigitalLearningSolutions.Web/appsettings.Test.json
516+
/DigitalLearningSolutions.Web/web.config

DigitalLearningSolutions.Data/DataServices/SelfAssessmentDataService/SelfAsssessmentReportDataService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ public IEnumerable<SelfAssessmentReportData> GetSelfAssessmentReportDataForCentr
4747
{
4848
return connection.Query<SelfAssessmentReportData>("usp_GetSelfAssessmentReport",
4949
new { selfAssessmentId, centreId },
50-
commandType: CommandType.StoredProcedure
50+
commandType: CommandType.StoredProcedure,
51+
commandTimeout: 150
5152
);
5253
}
53-
}
54+
}
5455
}

DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ FROM SelfAssessmentResults AS sar2
696696
AdminAccounts AS aa ON sd.SupervisorAdminID = aa.ID
697697
WHERE (sd.SupervisorAdminID = @adminId) AND (cas.Removed IS NULL) AND (sasv.Verified IS NULL) AND (sd.Removed IS NULL)
698698
AND (aa.CategoryID is null or sa.CategoryID = aa.CategoryID)
699-
GROUP BY sa.ID, ca.ID, sd.ID, u.FirstName, u.LastName, sa.Name,cast(sasv.Requested as date)", new { adminId }
699+
GROUP BY sa.ID, ca.ID, sd.ID, u.FirstName, u.LastName, sa.Name", new { adminId }
700700
);
701701
}
702702

DigitalLearningSolutions.Web.Tests/Controllers/TrackingSystem/Delegates/DelegateProgressControllerTests.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
namespace DigitalLearningSolutions.Web.Tests.Controllers.TrackingSystem.Delegates
22
{
3-
using System;
4-
using System.Collections.Generic;
53
using DigitalLearningSolutions.Data.Models;
64
using DigitalLearningSolutions.Data.Models.Courses;
75
using DigitalLearningSolutions.Data.Models.CustomPrompts;
@@ -15,8 +13,11 @@
1513
using DigitalLearningSolutions.Web.ViewModels.TrackingSystem.Delegates.DelegateProgress;
1614
using FakeItEasy;
1715
using FluentAssertions.AspNetCore.Mvc;
16+
using Microsoft.AspNetCore.Mvc;
1817
using Microsoft.Extensions.Configuration;
1918
using NUnit.Framework;
19+
using System;
20+
using System.Collections.Generic;
2021

2122
public class DelegateProgressControllerTests
2223
{
@@ -386,7 +387,11 @@ public void Delegate_removal_for_delegate_with_no_active_progress_returns_not_fo
386387
);
387388

388389
// Then
389-
result.Should().BeNotFoundResult();
390+
result.Should()
391+
.BeRedirectToActionResult()
392+
.WithActionName("StatusCode")
393+
.WithControllerName("LearningSolutions")
394+
.WithRouteValue("code", 410);
390395
}
391396

392397
[Test]

DigitalLearningSolutions.Web/Controllers/TrackingSystem/Delegates/DelegateProgressController.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,8 @@ public IActionResult ConfirmRemoveFromCourse(
275275
)
276276
{
277277
var progress = progressService.GetDetailedCourseProgress(progressId);
278-
if (progress == null)
279-
{
280-
return StatusCode((int)HttpStatusCode.Gone);
281-
}
278+
if (!courseService.DelegateHasCurrentProgress(progressId) || progress == null)
279+
return RedirectToAction("StatusCode", "LearningSolutions", new { code = 410 });
282280

283281
var model = new RemoveFromCourseViewModel(
284282
progress,
@@ -305,9 +303,7 @@ RemoveFromCourseViewModel model
305303

306304
var progress = progressService.GetDetailedCourseProgress(progressId);
307305
if (!courseService.DelegateHasCurrentProgress(progressId) || progress == null)
308-
{
309-
return new NotFoundResult();
310-
}
306+
return RedirectToAction("StatusCode", "LearningSolutions", new { code = 410 });
311307

312308
courseService.RemoveDelegateFromCourse(
313309
progress.DelegateId,

DigitalLearningSolutions.Web/Styles/index.scss

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,7 @@ ul > li > ul > li {
6262
padding-top: 0;
6363
}
6464

65-
.nhsuk-button {
66-
@include mq($until: tablet) {
67-
margin-top: nhsuk-spacing(3);
68-
}
69-
}
65+
7066

7167
input:invalid {
7268
border: $nhsuk-border-width-form-element-error solid $nhsuk-error-color;
@@ -78,13 +74,7 @@ input[type=file] {
7874
}
7975
}
8076

81-
input[type=file].nhsuk-input--error {
82-
height: 44px;
8377

84-
@include govuk-media-query($until: tablet) {
85-
height: 40px;
86-
}
87-
}
8878

8979
h1#page-heading {
9080
margin-bottom: 16px;
@@ -98,9 +88,6 @@ h1#page-heading {
9888
display: flex;
9989
}
10090

101-
.nhsuk-main-wrapper {
102-
flex: 1;
103-
}
10491

10592
.responsive-iframe-wrapper {
10693
height: 100%;
@@ -121,10 +108,6 @@ h1#page-heading {
121108
padding-bottom: $iframe-padding-bottom * 1.5;
122109
}
123110

124-
.nhsuk-heading-xl.heading-margin-2 {
125-
margin-bottom: nhsuk-spacing(2);
126-
}
127-
128111
.responsive-iframe {
129112
width: 100%;
130113
height: 100%;
@@ -147,25 +130,6 @@ h1#page-heading {
147130
margin-bottom: 0;
148131
}
149132

150-
.basic-summary-list__row:last-child .nhsuk-summary-list__key {
151-
border: none;
152-
}
153-
154-
.basic-summary-list__row:last-child .nhsuk-summary-list__value {
155-
border: none;
156-
margin-bottom: 0;
157-
}
158-
159-
.nhsuk-summary-list__value {
160-
@include govuk-media-query($until: tablet) {
161-
word-break: break-word;
162-
@include word-break-ie-fix;
163-
}
164-
}
165-
166-
.nhsuk-tag {
167-
text-align: center;
168-
}
169133

170134
.right-align-tag-column {
171135
padding: 0;
@@ -211,10 +175,6 @@ ul.no-bullets {
211175
margin-bottom: 0;
212176
}
213177

214-
.nhsuk-details__text > .nhsuk-button {
215-
margin-bottom: 0;
216-
}
217-
218178
@mixin hidden-submit-ie-fix {
219179
// IE11 hack
220180
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
@@ -335,10 +295,6 @@ ul.no-bullets {
335295
}
336296
}
337297

338-
.nhsuk-error-message.error-message--margin-bottom-1 {
339-
margin-bottom: nhsuk-spacing(1);
340-
}
341-
342298
.display-none {
343299
display: none;
344300
}

DigitalLearningSolutions.Web/Styles/layout.scss

Lines changed: 1 addition & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -14,84 +14,14 @@ body {
1414
}
1515

1616
#pagewrapper {
17-
display: flex;
18-
flex-direction: column;
1917
height: 100%;
2018
min-height: 100vh;
2119
}
2220

23-
#maincontentwrapper {
24-
flex: 1 0 auto;
25-
align-self: center;
26-
width: 100%;
27-
margin: 0;
28-
}
29-
3021
footer {
3122
flex-shrink: 0;
3223
}
3324

34-
.nhsuk-header__navigation-item.selected {
35-
a {
36-
font-weight: bold;
37-
}
38-
}
39-
40-
.nhsuk-header__logo {
41-
@include mq($until: large-desktop) {
42-
max-width: unset;
43-
44-
.nhsuk-header__link--service {
45-
align-items: center;
46-
display: flex;
47-
-ms-flex-align: center;
48-
margin-bottom: 0;
49-
width: auto;
50-
}
51-
52-
.nhsuk-header__service-name {
53-
padding-left: nhsuk-spacing(3);
54-
max-width: unset;
55-
}
56-
}
57-
}
58-
.nhsuk-navigation-container {
59-
@include mq($until: tablet) {
60-
margin-top: unset;
61-
}
62-
}
63-
64-
body:not(.js-enabled) {
65-
.nhsuk-header__menu {
66-
display: none;
67-
}
68-
69-
#close-menu {
70-
display: none;
71-
}
72-
73-
.nhsuk-header__navigation {
74-
display: block;
75-
}
76-
}
77-
78-
:not(.nhsuk-header--transactional) div.nhsuk-header__container {
79-
@media (max-width: 40.0525em) {
80-
margin: 0;
81-
}
82-
}
83-
84-
.nhsuk-header--transactional {
85-
.nhsuk-header__link--service {
86-
width: auto;
87-
height: auto;
88-
89-
@include mq($from: large-desktop) {
90-
display: flex;
91-
}
92-
}
93-
}
94-
9525
.centre-brand-logo {
9626
float: right;
9727
max-width: 280px;
@@ -102,14 +32,6 @@ body:not(.js-enabled) {
10232
}
10333
}
10434

105-
nav .nhsuk-width-container {
106-
margin: 0 auto;
107-
}
108-
109-
nav, .nhsuk-header__navigation, #header-navigation {
110-
border-bottom: 0;
111-
}
112-
11335
.visual-separator {
11436
height: 8px;
11537
width: 100%;
@@ -307,19 +229,7 @@ nav, .nhsuk-header__navigation, #header-navigation {
307229
clip: auto;
308230
}
309231

310-
.nhsuk-button--danger {
311-
background-color: $color_nhsuk-red;
312-
box-shadow: 0 4px 0 shade($color_nhsuk-red, 50%);
313-
margin-bottom: 16px !important;
314232

315-
&:hover {
316-
background-color: shade($color_nhsuk-red, 20%);
317-
}
318-
319-
&:active {
320-
background-color: shade($color_nhsuk-red, 50%);
321-
}
322-
}
323233

324234
.first-row td {
325235
border-top: 2px solid #d8dde0;
@@ -330,12 +240,6 @@ nav, .nhsuk-header__navigation, #header-navigation {
330240
white-space: nowrap;
331241
}
332242

333-
.nhsuk-header__link--service {
334-
@include mq($from: large-desktop) {
335-
align-items: unset;
336-
}
337-
}
338-
339243
.header-beta {
340244
color: #c8e4ff;
341245
font-family: FrutigerLTW01-55Roman, Arial, sans-serif;
@@ -347,15 +251,8 @@ nav, .nhsuk-header__navigation, #header-navigation {
347251
}
348252
}
349253

350-
.nhsuk-width-container, .nhsuk-header__navigation-list {
351-
max-width: 1144px !important;
352-
padding-left: $nhsuk-gutter !important;
353-
padding-right: $nhsuk-gutter !important;
354-
}
355254

356-
.nhsuk-width-container {
357-
margin: auto !important;
358-
}
255+
359256

360257
@media only screen and (max-width: 767px) {
361258
.section-card-result {

0 commit comments

Comments
 (0)