Skip to content

Commit f71a58c

Browse files
authored
Merge pull request #684 from TechnologyEnhancedLearning/RC
Merge RC changes to tucana
2 parents 5852223 + 0c9073e commit f71a58c

File tree

25 files changed

+55
-69
lines changed

25 files changed

+55
-69
lines changed

AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<PackageReference Include="HtmlSanitizer" Version="6.0.453" />
9090
<PackageReference Include="IdentityModel" Version="4.4.0" />
9191
<PackageReference Include="LearningHub.Nhs.Caching" Version="2.0.2" />
92-
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.40" />
92+
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.41" />
9393
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.19.0" />
9494
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.0" />
9595
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0" />

LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
<PackageReference Include="HtmlAgilityPack" Version="1.11.38" />
109109
<PackageReference Include="IdentityModel" Version="4.3.0" />
110110
<PackageReference Include="LearningHub.Nhs.Caching" Version="2.0.0" />
111-
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.40" />
111+
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.41" />
112112
<PackageReference Include="linqtotwitter" Version="6.9.0" />
113113
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.19.0" />
114114
<PackageReference Include="Microsoft.ApplicationInsights.EventCounterCollector" Version="2.21.0" />

LearningHub.Nhs.WebUI/Views/Shared/_FooterPartial.cshtml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,27 @@
33
@using LearningHub.Nhs.WebUI.Configuration;
44
@inject IOptions<Settings> settings;
55

6-
<footer role="contentinfo">
7-
<div class="nhsuk-footer" id="nhsuk-footer">
8-
<div class="nhsuk-width-container nhsuk-footer__container app-width-container">
6+
7+
<div class="nhsuk-footer" id="nhsuk-footer">
8+
<div class="nhsuk-width-container nhsuk-footer__container app-width-container">
99
<h2 class="nhsuk-u-visually-hidden">Support links</h2>
1010
<ul class="nhsuk-footer__list">
11-
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="@(settings.Value.SupportUrls.SupportSite)">Help</a></li>
12-
@if (!SystemOffline())
13-
{
14-
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="@Url.Action("Contactus", "Home")">Contact us</a></li>
15-
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="@Url.Action("Aboutus", "Home")">About us</a></li>
16-
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="@Url.Action("Updates", "RoadMap")">Service updates and releases</a></li>
17-
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="@Url.Action("NHSsites", "Home")">NHS sites</a></li>
18-
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="/Policies">Our policies</a></li>
19-
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="/Home/Accessibility">Accessibility statement</a></li>
20-
}
11+
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="@(settings.Value.SupportUrls.SupportSite)">Help</a></li>
12+
@if (!SystemOffline())
13+
{
14+
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="@Url.Action("Contactus", "Home")">Contact us</a></li>
15+
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="@Url.Action("Aboutus", "Home")">About us</a></li>
16+
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="@Url.Action("Updates", "RoadMap")">Service updates and releases</a></li>
17+
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="@Url.Action("NHSsites", "Home")">NHS sites</a></li>
18+
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="/Policies">Our policies</a></li>
19+
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="/Home/Accessibility">Accessibility statement</a></li>
20+
}
2121
</ul>
2222
<p class="nhsuk-footer__copyright">&copy; NHS England @DateTime.Now.Year</p>
23-
</div>
2423
</div>
25-
</footer>
24+
</div>
2625

27-
@functions{
26+
@functions {
2827
public bool SystemOffline()
2928
{
3029
return ViewContext.RouteData.Values["controller"].ToString() == "Offline";

OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.39" />
19+
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.41" />
2020
<PackageReference Include="NLog.Web.AspNetCore" Version="4.13.0" />
2121
</ItemGroup>
2222

OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.39" />
19+
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.41" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<ItemGroup>
2525
<PackageReference Include="FluentValidation.AspNetCore" Version="10.3.4" />
2626
<PackageReference Include="IdentityModel" Version="4.3.0" />
27-
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.39" />
27+
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.41" />
2828
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
2929
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
3030
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />

OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/SearchService.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ private async Task<List<ResourceMetadataViewModel>> GetResourceMetadataViewModel
8383
FindwiseResultModel findwiseResultModel, int? currentUserId)
8484
{
8585
List<ResourceActivityDTO> resourceActivities = new List<ResourceActivityDTO>() { };
86+
List<ResourceMetadataViewModel> resourceMetadataViewModels = new List<ResourceMetadataViewModel>() { };
8687
var documentsFound = findwiseResultModel.SearchResults?.DocumentList.Documents?.ToList() ??
8788
new List<Document>();
8889
var findwiseResourceIds = documentsFound.Select(d => int.Parse(d.Id)).ToList();
@@ -94,7 +95,15 @@ private async Task<List<ResourceMetadataViewModel>> GetResourceMetadataViewModel
9495

9596
var resourcesFound = await this.resourceRepository.GetResourcesFromIds(findwiseResourceIds);
9697

97-
List<ResourceMetadataViewModel> resourceMetadataViewModels = resourcesFound.Select(resource => MapToViewModel(resource, resourceActivities.Where(x => x.ResourceId == resource.Id).ToList()))
98+
if (currentUserId.HasValue)
99+
{
100+
List<int> resourceIds = resourcesFound.Select(x => x.Id).ToList();
101+
List<int> userIds = new List<int>() { currentUserId.Value };
102+
103+
resourceActivities = (await this.resourceRepository.GetResourceActivityPerResourceMajorVersion(resourceIds, userIds))?.ToList() ?? new List<ResourceActivityDTO>() { };
104+
}
105+
106+
resourceMetadataViewModels = resourcesFound.Select(resource => this.MapToViewModel(resource, resourceActivities.Where(x => x.ResourceId == resource.Id).ToList()))
98107
.OrderBySequence(findwiseResourceIds)
99108
.ToList();
100109

@@ -109,13 +118,6 @@ private async Task<List<ResourceMetadataViewModel>> GetResourceMetadataViewModel
109118
unmatchedResourcesIdsString);
110119
}
111120

112-
if (currentUserId.HasValue)
113-
{
114-
List<int> resourceIds = resourcesFound.Select(x => x.Id).ToList();
115-
List<int> userIds = new List<int>() { currentUserId.Value };
116-
117-
resourceActivities = (await this.resourceRepository.GetResourceActivityPerResourceMajorVersion(resourceIds, userIds))?.ToList() ?? new List<ResourceActivityDTO>() { };
118-
}
119121
return resourceMetadataViewModels;
120122
}
121123

OpenAPI/LearningHub.Nhs.OpenApi/SwaggerDefinitions/v1.3.0.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"info": {
44
"title": "LearningHub.NHS.OpenAPI",
55
"version": "1.3.0",
6-
"description": "A set of API endpoints for retrieving learning resource information from the Learning Hub learning platform. The [Learning Hub](https://learninghub.nhs.uk/) is a platform for hosting and sharing learning resources for health and social care provided by Technology Enhanced Learning (TEL) at NHS England. An application API key must be used to authorise calls to the API from external applications. To contact TEL to discuss connecting your external system to the Learning Hub, email [[email protected]]([email protected])"
6+
"description": "A set of API endpoints for retrieving learning resource information from the Learning Hub learning platform. The [Learning Hub](https://learninghub.nhs.uk/) is a platform for hosting and sharing learning resources for health and social care provided by Technology Enhanced Learning (TEL) at NHS England. An application API key must be used to authorise calls to the API from external applications. To contact TEL to discuss connecting your external system to the Learning Hub, email [email protected]."
77
},
88
"paths": {
99
"/Bookmark/GetAllByParent": {

WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<PackageReference Include="elfhHub.Nhs.Models" Version="3.0.8" />
2828
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
2929
<PackageReference Include="LearningHub.Nhs.Caching" Version="2.0.0" />
30-
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.40" />
30+
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.41" />
3131
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.19.0" />
3232
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
3333
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0" />

WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ItemGroup>
1010
<PackageReference Include="elfhHub.Nhs.Models" Version="3.0.8" />
1111
<PackageReference Include="LearningHub.Nhs.Caching" Version="2.0.0" />
12-
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.40" />
12+
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.41" />
1313
<PackageReference Update="StyleCop.Analyzers" Version="1.1.118">
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

0 commit comments

Comments
 (0)