Skip to content

Commit f4af019

Browse files
committed
Merge branch 'Release-DLS-2023.22' into Develop/fix/TD-2508-hidden-in-learning-portal-should-not-appear
2 parents c805543 + 49013d4 commit f4af019

File tree

44 files changed

+742
-228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+742
-228
lines changed

DigitalLearningSolutions.Data.Migrations/2023090611401334_updateCookiePolicyContentHtml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
namespace DigitalLearningSolutions.Data.Migrations
99
{
10-
[Migration(202309141452)]
10+
[Migration(202309191452)]
1111

1212
public class UpdateCookiePolicyContentHtml : Migration
1313
{
1414
public override void Up()
1515
{
16-
var CookiePolicyContentHtml = Properties.Resources.TD_1943_CookiePolicyContentHtml;
16+
var CookiePolicyContentHtml = Properties.Resources.TD_1943_CookiesPolicyContentHtml;
1717

1818
Execute.Sql(
1919
@"UPDATE Config SET ConfigText =N'" + CookiePolicyContentHtml + "' " +

DigitalLearningSolutions.Data.Migrations/Properties/Resources.Designer.cs

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DigitalLearningSolutions.Data.Migrations/Properties/Resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@
304304
<data name="TD_1943_CookiePolicyContentHtmlOldRecord" type="System.Resources.ResXFileRef, System.Windows.Forms">
305305
<value>..\Resources\TD_1943_CookiePolicyContentHtmlOldRecord.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
306306
</data>
307-
<data name="TD_1943_CookiePolicyContentHtml" type="System.Resources.ResXFileRef, System.Windows.Forms">
308-
<value>..\Resources\TD_1943_CookiePolicyContentHtml.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
307+
<data name="TD_1943_CookiesPolicyContentHtml" type="System.Resources.ResXFileRef, System.Windows.Forms">
308+
<value>..\Resources\TD_1943_CookiesPolicyContentHtml.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
309309
</data>
310310
<data name="TD_2508_GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak" type="System.Resources.ResXFileRef, System.Windows.Forms">
311311
<value>..\Scripts\TD-2508-GetActivitiesForDelegateEnrolmentHiddenInLearningPortalTweak.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>

DigitalLearningSolutions.Data.Migrations/Resources/TD_1943_CookiePolicyContentHtml.txt renamed to DigitalLearningSolutions.Data.Migrations/Resources/TD_1943_CookiesPolicyContentHtml.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ When you close the browser (if you do not use the banner) or 1 year (if you use
102102
<p><a href=http://www.dls.nhs.uk/ data-cke-saved-href=http://www.dls.nhs.uk/ title=http://www.dls.nhs.uk>www.dls.nhs.uk</a></td>
103103
<td class="nhsuk-table__cell" data-label="Purpose" role="cell">
104104
<span class="nhsuk-table-responsive__heading">Purpose</span>
105-
<p>Several of these are used to remember your filter selections when using the application. Including:
106-
<ul><li>AdminFilter<li>DelegateFilter<li>DelegateGroupsFilter<li>CourseFilter</ul></td>
105+
<p><div>Several of these are used to remember your filter selections when using the application. Including:<p>
106+
<ul><li>AdminFilter<li>DelegateFilter<li>DelegateGroupsFilter<li>CourseFilter</ul></div></td>
107107
<td class="nhsuk-table__cell" data-label="Expiry" role="cell">
108108
<span class="nhsuk-table-responsive__heading">Expiry</span>5 months </td>
109109
</tr>
@@ -127,7 +127,7 @@ Legacy tracking system cookies</td>
127127
<p><a href=http://www.dls.nhs.uk/ data-cke-saved-href=http://www.dls.nhs.uk/ title=http://www.dls.nhs.uk>www.dls.nhs.uk</a></td>
128128
<td class="nhsuk-table__cell" data-label="Purpose" role="cell">
129129
<span class="nhsuk-table-responsive__heading">Purpose</span>
130-
<p>Several of these are used to remember your grid search, filter and sort selections when using the legacy applications. Including:<ul><li>cms_courses_aspx_MainContent_<ul><li>bsgvCourses</ul><li>tracking_tickets_aspx_MainContent_<ul><li>bsgvTickets<li>bsgvCentreDelegates<li>bsgvCustomisations<li>bsgvAdminUsers<li>bsgvSuperviseDelegates</ul></ul></td>
130+
<p><div>Several of these are used to remember your grid search, filter and sort selections when using the legacy applications. Including:<p><ul><li>cms_courses_aspx_MainContent_<ul><li>bsgvCourses</ul><li>tracking_tickets_aspx_MainContent_<ul><li>bsgvTickets<li>bsgvCentreDelegates<li>bsgvCustomisations<li>bsgvAdminUsers<li>bsgvSuperviseDelegates</ul></ul></div></td>
131131
<td class="nhsuk-table__cell" data-label="Expiry" role="cell"><span class="nhsuk-table-responsive__heading">Expiry</span>12 months</td>
132132
</tr>
133133
<tr class="nhsuk-table__row" role="row">
@@ -173,7 +173,7 @@ Google analytics cookies</td>
173173
<a href=http://www.dls.nhs.uk/ data-cke-saved-href=http://www.dls.nhs.uk/ title=http://www.dls.nhs.uk>www.dls.nhs.uk</a></td>
174174
<td class="nhsuk-table__cell" data-label="Purpose" role="cell">
175175
<span class="nhsuk-table-responsive__heading">Purpose</span>
176-
<p>These cookies are used to collect information about how visitors use our site, which we use to help improve it. The cookies collect information in an anonymous form, including the number of visitors to the site, where visitors have come to the site from and the pages they visited. These cookies may also be identified as originating from england.nhs.uk<p>These include cookies with names starting "_ga"<p><a href=http://www.google.com/intl/en-GB/policies/technologies/cookies/ >More information about Google cookies</a>.</td>
176+
<p><div>These cookies are used to collect information about how visitors use our site, which we use to help improve it. The cookies collect information in an anonymous form, including the number of visitors to the site, where visitors have come to the site from and the pages they visited.<p>These cookies may also be identified as originating from england.nhs.uk<p>These include cookies with names starting "_ga"<p><a href=http://www.google.com/intl/en-GB/policies/technologies/cookies/ >More information about Google cookies</a>.</div></td>
177177
<td class="nhsuk-table__cell" data-label="Expiry" role="cell"><span class="nhsuk-table-responsive__heading">Expiry</span>13 months</td>
178178
</tr>
179179
<tr class="nhsuk-table__row" role="row">
@@ -185,11 +185,11 @@ Hotjar cookies</td>
185185
<a href=http://www.dls.nhs.uk/ data-cke-saved-href=http://www.dls.nhs.uk/ title=http://www.dls.nhs.uk>www.dls.nhs.uk</a></td>
186186
<td class="nhsuk-table__cell" data-label="Purpose" role="cell">
187187
<span class="nhsuk-table-responsive__heading">Purpose</span>
188-
<p>Hotjar Tracking Code cookies are set on a visitor''s browser when they visit a website that loads the Hotjar Tracking Code. These cookies allow the Hotjar Tracking Code to function correctly. Apart from cookies, the Hotjar Tracking Code uses local and session storage as well.<p>These include cookies with names starting "_hj".<p><a href=https://help.hotjar.com/hc/en-us/articles/6952777582999-Cookies-Set-by-the-Hotjar-Tracking-Code>More information about Hotjar cookies</a>.</td>
188+
<p><div>Hotjar Tracking Code cookies are set on a visitor''s browser when they visit a website that loads the Hotjar Tracking Code. These cookies allow the Hotjar Tracking Code to function correctly. Apart from cookies, the Hotjar Tracking Code uses local and session storage as well.<p>These include cookies with names starting "_hj".<p><a href=https://help.hotjar.com/hc/en-us/articles/6952777582999-Cookies-Set-by-the-Hotjar-Tracking-Code>More information about Hotjar cookies</a>.</div></td>
189189
<td class="nhsuk-table__cell" data-label="Expiry" role="cell">
190190
<span class="nhsuk-table-responsive__heading">Expiry</span>1 year</td>
191191
</tr>
192192
</table>
193193
</div>
194194
</div>
195-
</details>
195+
</details>

DigitalLearningSolutions.Data.Tests/DataServices/ActivityDataServiceTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public void GetFilteredActivity_gets_expected_activity()
3333
// when
3434
var result = service.GetFilteredActivity(
3535
101,
36-
DateTime.Parse("2014-01-01 00:00:00.000"),
37-
DateTime.Parse("2014-01-31 23:59:59.999"),
36+
DateTime.Parse("2014-01-01"),
37+
DateTime.Parse("2014-01-31"),
3838
null,
3939
null,
4040
null
@@ -48,22 +48,22 @@ public void GetFilteredActivity_gets_expected_activity()
4848
result.Count().Should().Be(9);
4949

5050
var first = result.First();
51-
first.LogDate.Should().Be(DateTime.Parse("2014-01-08 11:04:35.753"));
51+
first.LogDate.Should().Be(DateTime.Parse("2014-01-08"));
5252
first.LogYear.Should().Be(2014);
5353
first.LogQuarter.Should().Be(1);
5454
first.LogMonth.Should().Be(1);
55-
first.Completed.Should().BeFalse();
56-
first.Evaluated.Should().BeFalse();
57-
first.Registered.Should().BeTrue();
55+
first.Completed.Should().Equals(0);
56+
first.Evaluated.Should().Equals(0);
57+
first.Registered.Should().Equals(1);
5858

5959
var last = result.Last();
60-
last.LogDate.Should().Be(DateTime.Parse("2014-01-31 09:43:28.840"));
60+
last.LogDate.Should().Be(DateTime.Parse("2014-01-31"));
6161
last.LogYear.Should().Be(2014);
6262
last.LogQuarter.Should().Be(1);
6363
last.LogMonth.Should().Be(1);
64-
last.Completed.Should().BeFalse();
65-
last.Evaluated.Should().BeFalse();
66-
last.Registered.Should().BeTrue();
64+
last.Completed.Should().Equals(0);
65+
last.Evaluated.Should().Equals(0);
66+
last.Registered.Should().Equals(1);
6767
}
6868
}
6969

DigitalLearningSolutions.Data/DataServices/ActivityDataService.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ public IEnumerable<ActivityLog> GetFilteredActivity(
4040
{
4141
return connection.Query<ActivityLog>(
4242
@"SELECT
43-
LogDate,
43+
Cast(LogDate As Date) As LogDate,
4444
LogYear,
4545
LogQuarter,
4646
LogMonth,
47-
Registered,
48-
Completed,
49-
Evaluated
47+
SUM(CAST(Registered AS Int)) AS Registered,
48+
SUM(CAST(Completed AS Int)) AS Completed,
49+
SUM(CAST(Evaluated AS Int)) AS Evaluated
5050
FROM tActivityLog AS al
5151
WHERE (LogDate >= @startDate
5252
AND (@endDate IS NULL OR LogDate <= @endDate)
@@ -59,7 +59,10 @@ AND EXISTS (
5959
SELECT ap.ApplicationID
6060
FROM Applications ap
6161
WHERE ap.ApplicationID = al.ApplicationID
62-
AND ap.DefaultContentTypeID <> 4)",
62+
AND ap.DefaultContentTypeID <> 4)
63+
GROUP BY Cast(LogDate As Date), LogYear,
64+
LogQuarter,
65+
LogMonth",
6366
new
6467
{
6568
centreId,

0 commit comments

Comments
 (0)