diff --git a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj index 89241ab9f..337bb21f5 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj +++ b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj @@ -89,7 +89,7 @@ - + diff --git a/LearningHub.Nhs.WebUI/Controllers/AccountController.cs b/LearningHub.Nhs.WebUI/Controllers/AccountController.cs index d8c324d1d..1b9bc87ae 100644 --- a/LearningHub.Nhs.WebUI/Controllers/AccountController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/AccountController.cs @@ -4,6 +4,7 @@ namespace LearningHub.Nhs.WebUI.Controllers { + using System; using System.Collections.Generic; using System.Linq; using System.Net; @@ -1236,7 +1237,17 @@ private async Task GetAccountConfirmationDetails(Ac var employer = await this.locationService.GetByIdAsync(int.TryParse(accountCreationViewModel.LocationId, out int primaryEmploymentId) ? primaryEmploymentId : 0); var region = await this.regionService.GetAllAsync(); var specialty = await this.specialtyService.GetSpecialtiesAsync(); - var role = await this.jobRoleService.GetPagedFilteredAsync(accountCreationViewModel.CurrentRoleName, accountCreationViewModel.CurrentPageIndex, UserRegistrationContentPageSize); + var role = new Tuple>(0, null); + if (!string.IsNullOrEmpty(accountCreationViewModel.CurrentRoleName) && accountCreationViewModel.CurrentRoleName.Contains('/')) + { + string jobrole = accountCreationViewModel.CurrentRoleName.Replace("/", " "); + role = await this.jobRoleService.GetPagedFilteredAsync(jobrole, accountCreationViewModel.CurrentPageIndex, UserRegistrationContentPageSize); + } + else + { + role = await this.jobRoleService.GetPagedFilteredAsync(accountCreationViewModel.CurrentRoleName, accountCreationViewModel.CurrentPageIndex, UserRegistrationContentPageSize); + } + if (role.Item1 > 0) { accountCreationViewModel.CurrentRoleName = role.Item2.FirstOrDefault(x => x.Id == int.Parse(accountCreationViewModel.CurrentRole)).NameWithStaffGroup; diff --git a/LearningHub.Nhs.WebUI/Controllers/ResourceController.cs b/LearningHub.Nhs.WebUI/Controllers/ResourceController.cs index 629f61c26..8e48edf82 100644 --- a/LearningHub.Nhs.WebUI/Controllers/ResourceController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/ResourceController.cs @@ -10,8 +10,6 @@ namespace LearningHub.Nhs.WebUI.Controllers using System.Threading.Tasks; using LearningHub.Nhs.Caching; using LearningHub.Nhs.Models.Common; - using LearningHub.Nhs.Models.Entities.Hierarchy; - using LearningHub.Nhs.Models.Entities.Resource; using LearningHub.Nhs.Models.Enums; using LearningHub.Nhs.Models.Extensions; using LearningHub.Nhs.Models.Resource; @@ -353,15 +351,13 @@ public async Task RateResource(ResourceRatingViewModel model) /// /// Ask user to confirm that they wish to edit a published resource. /// - /// The resourceId. - /// The resourceReferenceId. - /// The resourceTitle. + /// The ResourceIndexViewModel. /// The . [Authorize] - [Route("Resource/EditConfirm/{resourceId}/{resourceReferenceId}/{resourceTitle}")] - public IActionResult EditConfirm(int resourceId, int resourceReferenceId, string resourceTitle) + [Route("Resource/EditConfirm")] + public IActionResult EditConfirm(ResourceIndexViewModel viewModel) { - return this.View("EditConfirm", new ResourceEditConfirmViewModel { ResourceId = resourceId, ResourceReferenceId = resourceReferenceId, ResourceTitle = resourceTitle }); + return this.View("EditConfirm", new ResourceEditConfirmViewModel { ResourceId = viewModel.ResourceItem.ResourceId, ResourceReferenceId = viewModel.ResourceReferenceId, ResourceTitle = viewModel.ResourceItem.Title }); } /// @@ -380,24 +376,20 @@ public IActionResult EditConfirm(ResourceEditConfirmViewModel viewModel) /// /// Ask user to confirm that they wish to unpublish a published resource. /// - /// The resourceVersionId. - /// The resourceReferenceId. - /// The resourceType. - /// The catalogueNodeVersionId. - /// The resourceTitle. - /// The SCORM ESR link type. + /// The ResourceIndexViewModel. /// The . [Authorize] - [Route("Resource/UnpublishConfirm/{resourceVersionId}/{resourceReferenceId}/{resourceType}/{catalogueNodeVersionId}/{resourceTitle}/{scormEsrLinkType?}")] - public IActionResult UnpublishConfirm(int resourceVersionId, int resourceReferenceId, int resourceType, int catalogueNodeVersionId, string resourceTitle, int scormEsrLinkType) + [Route("Resource/UnpublishConfirm")] + public IActionResult UnpublishConfirm(ResourceIndexViewModel viewModel) { + int scormEsrLinkType = viewModel.ResourceItem.ResourceTypeEnum == ResourceTypeEnum.Scorm || viewModel.ResourceItem.ResourceTypeEnum == ResourceTypeEnum.GenericFile ? (int)viewModel.ExternalContentDetails.EsrLinkType : 0; return this.View("UnpublishConfirm", new ResourceUnpublishConfirmViewModel { - ResourceVersionId = resourceVersionId, - ResourceReferenceId = resourceReferenceId, - ResourceType = (ResourceTypeEnum)resourceType, - CatalogueNodeVersionId = catalogueNodeVersionId, - ResourceTitle = resourceTitle, + ResourceVersionId = viewModel.ResourceItem.ResourceVersionId, + ResourceReferenceId = viewModel.ResourceReferenceId, + ResourceType = (ResourceTypeEnum)(int)viewModel.ResourceItem.ResourceTypeEnum, + CatalogueNodeVersionId = viewModel.ResourceItem.Catalogue.CatalogueNodeVersionId, + ResourceTitle = viewModel.ResourceItem.Title, ScormEsrLinkType = (EsrLinkType)scormEsrLinkType, }); } @@ -494,15 +486,24 @@ public async Task HtmlResourceContent(int resourceReferenceId, st contentType = "text/html"; } - var file = await this.fileService.DownloadFileAsync(contentFilePath, path); - if (file != null) + if (contentType.Contains("video") || contentType.Contains("audio")) { - return this.File(file.Content, contentType); + var stream = await this.fileService.StreamFileAsync(contentFilePath, path); + if (stream != null) + { + return this.File(stream, contentType, enableRangeProcessing: true); + } } else { - return this.Ok(this.Content("No file found")); + var file = await this.fileService.DownloadFileAsync(contentFilePath, path); + if (file != null) + { + return this.File(file.Content, contentType); + } } + + return this.Ok(this.Content("No file found")); } } } \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Filters/OfflineCheckFilter.cs b/LearningHub.Nhs.WebUI/Filters/OfflineCheckFilter.cs index ef673b8ad..ab700abaa 100644 --- a/LearningHub.Nhs.WebUI/Filters/OfflineCheckFilter.cs +++ b/LearningHub.Nhs.WebUI/Filters/OfflineCheckFilter.cs @@ -46,18 +46,21 @@ public override async Task OnActionExecutionAsync(ActionExecutingContext context var internalSystem = await this.internalSystemService.GetByIdAsync((int)InternalSystemType.LearningHub); - if (controller != "Offline" - && !(controller == "Home" && action == "Logout") - && internalSystem.IsOffline - && (!user.Identity.IsAuthenticated || !(await this.userGroupService.UserHasPermissionAsync("System_Offline_Bypass")))) + if (internalSystem != null) { - context.Result = new RedirectToRouteResult( - new RouteValueDictionary - { + if (controller != "Offline" + && !(controller == "Home" && action == "Logout") + && internalSystem.IsOffline + && (!user.Identity.IsAuthenticated || !(await this.userGroupService.UserHasPermissionAsync("System_Offline_Bypass")))) + { + context.Result = new RedirectToRouteResult( + new RouteValueDictionary + { { "Controller", "Offline" }, { "Action", "Index" }, - }); - executeNextAction = false; + }); + executeNextAction = false; + } } if (executeNextAction) diff --git a/LearningHub.Nhs.WebUI/Interfaces/IFileService.cs b/LearningHub.Nhs.WebUI/Interfaces/IFileService.cs index 684e391c1..7b1af9a68 100644 --- a/LearningHub.Nhs.WebUI/Interfaces/IFileService.cs +++ b/LearningHub.Nhs.WebUI/Interfaces/IFileService.cs @@ -29,6 +29,14 @@ public interface IFileService /// A representing the result of the asynchronous operation. Task DownloadFileAsync(string filePath, string fileName); + /// + /// The StreamFileAsync. + /// + /// The filePath. + /// The fileName. + /// The . + Task StreamFileAsync(string filePath, string fileName); + /// /// The ProcessFile. /// diff --git a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj index 16161f081..c052f2516 100644 --- a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj +++ b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj @@ -112,7 +112,7 @@ - + diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentGenericFile.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentGenericFile.vue index ecc5a2f59..f1380b1ab 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentGenericFile.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentGenericFile.vue @@ -9,13 +9,9 @@ - + - - This is a SCORM/AICC elearning resource - - - + Please choose the resource type as Elearning/HTML for the SCORM/AICC elearning or HTML resources. diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/models/contribute/contributeResourceModel.ts b/LearningHub.Nhs.WebUI/Scripts/vuesrc/models/contribute/contributeResourceModel.ts index dc93c207a..a50fc6d4c 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/models/contribute/contributeResourceModel.ts +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/models/contribute/contributeResourceModel.ts @@ -41,7 +41,6 @@ export class AttachedFileModel { export class GenericFileResourceModel { resourceVersionId: number = 0; file: ResourceFileModel = new ResourceFileModel(); - scormAiccContent: boolean = false; authoredYear: number = 0; authoredMonth: number = 0; authoredDayOfMonth: number = 0; diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue index a1e80d97a..909fd8396 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue @@ -426,6 +426,11 @@ window.location.pathname = './Home/Error'; }); } + + if (interactionType == "ended") { + setTimeout(() => { this.checkUserCertificateAvailability() }, 10000); + await this.recordActivityComplete(); + } }, async recordMediaPlayingEvent(): Promise { let currentMediaTime = this.getMediaPlayerDisplayTime(); diff --git a/LearningHub.Nhs.WebUI/Services/FileService.cs b/LearningHub.Nhs.WebUI/Services/FileService.cs index c5661edf5..88d5b2579 100644 --- a/LearningHub.Nhs.WebUI/Services/FileService.cs +++ b/LearningHub.Nhs.WebUI/Services/FileService.cs @@ -98,6 +98,29 @@ public async Task DownloadFileAsync(string filePath, stri return null; } + /// + /// The StreamFileAsync. + /// + /// The filePath. + /// The fileName. + /// The . + public async Task StreamFileAsync(string filePath, string fileName) + { + var directory = this.ShareClient.GetDirectoryClient(filePath); + + if (await directory.ExistsAsync()) + { + var file = directory.GetFileClient(fileName); + + if (await file.ExistsAsync()) + { + return await file.OpenReadAsync(); + } + } + + return null; + } + /// /// The ProcessFile. /// diff --git a/LearningHub.Nhs.WebUI/Styles/nhsuk/common.scss b/LearningHub.Nhs.WebUI/Styles/nhsuk/common.scss index 067b105fe..72d1fe015 100644 --- a/LearningHub.Nhs.WebUI/Styles/nhsuk/common.scss +++ b/LearningHub.Nhs.WebUI/Styles/nhsuk/common.scss @@ -139,9 +139,9 @@ padding-right: px2rem(68); } -#maincontent .search-width-container { +#maincontent { - .nhsuk-search__submit__green span.nhsuk-u-visually-hidden { + button[class^='nhsuk-search__submit'] span.nhsuk-u-visually-hidden { color: #595959; background-color: #fff; } @@ -222,4 +222,4 @@ white-space: nowrap; margin-top: auto !important; margin-bottom: auto !important; -} \ No newline at end of file +} diff --git a/LearningHub.Nhs.WebUI/Styles/nhsuk/layout.scss b/LearningHub.Nhs.WebUI/Styles/nhsuk/layout.scss index 03eb2e416..e5c9cb57a 100644 --- a/LearningHub.Nhs.WebUI/Styles/nhsuk/layout.scss +++ b/LearningHub.Nhs.WebUI/Styles/nhsuk/layout.scss @@ -108,6 +108,16 @@ } +.nhsuk-header__search { + .nhsuk-search__input { + width: px2rem(260); + } + + #search > label.nhsuk-u-visually-hidden { + background-color: $nhsuk-white; + } +} + .nhsuk-account__login--link, .nhsuk-account__login--link:visited, .nhsuk-account__login--link:hover { @@ -325,6 +335,10 @@ .nhsuk-back-link { padding: 0.5rem 0; } + + .nhsuk-header__menu .nhsuk-header__not-mobile { + display: none; + } } /* mobile */ diff --git a/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/mylearning.scss b/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/mylearning.scss index 0d28c2393..26b854a14 100644 --- a/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/mylearning.scss +++ b/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/mylearning.scss @@ -2,7 +2,7 @@ .my-learning { - + .downloadbuttonaslink { background: none !important; @@ -101,6 +101,8 @@ .search-filters { + position: relative; + .nhsuk-expander { border-width: 0; @@ -126,31 +128,33 @@ border-width: 12.124px 7px 0 7px; border-top-color: inherit } + } - .filter-summary { - color: $nhsuk-black; + .filter-summary { + color: $nhsuk-black; + display: flex; + line-height: 1.8; + position: absolute; + z-index: 1; + margin-top: 67px; + width: 100%; + + .clear-filter { + justify-content: flex-end; display: flex; - line-height: 1.8; - - .clear-filter { - justify-content: flex-end; - display: flex; - flex: 1 1 auto !important; - } + flex: 1 1 auto !important; + } - @media(max-width: 48.0525em) { - display: initial; + @media(max-width: 48.0525em) { + display: initial; - .clear-filter { - display: block; - margin-top: 12px; - } + .clear-filter { + display: block; + margin-top: 12px; } } } - - .search-filter-items { background-color: $nhsuk-grey-white; } diff --git a/LearningHub.Nhs.WebUI/Views/MyLearning/Index.cshtml b/LearningHub.Nhs.WebUI/Views/MyLearning/Index.cshtml index b04dff53d..01e337190 100644 --- a/LearningHub.Nhs.WebUI/Views/MyLearning/Index.cshtml +++ b/LearningHub.Nhs.WebUI/Views/MyLearning/Index.cshtml @@ -12,7 +12,7 @@ var routeData = ViewActivityHelper.GetActivityParameters(Model); } -@section styles{ +@section styles { @@ -57,11 +57,12 @@ Download PDF } - + Search within My learning - + Search Text + @@ -93,6 +94,9 @@ + + + @@ -102,10 +106,8 @@ - - - - + + diff --git a/LearningHub.Nhs.WebUI/Views/Resource/Resource.cshtml b/LearningHub.Nhs.WebUI/Views/Resource/Resource.cshtml index d0150991a..0c89a0f24 100644 --- a/LearningHub.Nhs.WebUI/Views/Resource/Resource.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Resource/Resource.cshtml @@ -79,18 +79,22 @@ && resource.ResourceVersionIdPublishing == 0 && !resource.ReadOnly) { - - Edit resource - Unpublish + + + + + + + + + + + + + + + + } @@ -100,8 +104,12 @@ && !resource.ReadOnly) { - Edit resource + + + + + + } @@ -174,13 +182,13 @@ { - @if (Model.UserHasCertificate) - { - - - - - } + @if (Model.UserHasCertificate) + { + + + + + } @if (resource.Id > 0 && !resource.Catalogue.Hidden && !(resource.VersionStatusEnum == VersionStatusEnum.Unpublished && !resource.DisplayForContributor)) - { + { @@ -215,14 +223,14 @@ { - @if (Model.UserHasCertificate) - { - displayCertificateButton = false; - - - - - } + @if (Model.UserHasCertificate) + { + displayCertificateButton = false; + + + + + } @{ @@ -240,13 +248,13 @@ { - @if (Model.UserHasCertificate && displayCertificateButton) - { - - - - - } + @if (Model.UserHasCertificate && displayCertificateButton) + { + + + + + } -@section Scripts{ +@section Scripts { @if (ViewBag.UserAuthenticated) { diff --git a/LearningHub.Nhs.WebUI/Views/Resource/_ResourceItem.cshtml b/LearningHub.Nhs.WebUI/Views/Resource/_ResourceItem.cshtml index eb227f27c..fec0338dd 100644 --- a/LearningHub.Nhs.WebUI/Views/Resource/_ResourceItem.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Resource/_ResourceItem.cshtml @@ -92,7 +92,7 @@ @* Weblink *@ @if (canShowMoreDetails && resourceItem.ResourceTypeEnum == ResourceTypeEnum.WebLink) { - + Visit site: @{ @@ -103,23 +103,7 @@ displayText = resourceItem.WebLinkDetails.Url; } } - @displayText - - - } - - @* Html Resource *@ - @if (canShowMoreDetails && resourceItem.ResourceTypeEnum == ResourceTypeEnum.Html) - { - - - - - Launch HTML resource - - - This resource will launch in a new window + @displayText } @@ -128,45 +112,16 @@ @if (canShowMoreDetails && resourceItem.ResourceTypeEnum == ResourceTypeEnum.GenericFile) { - - @if (!resourceItem.GenericFileDetails.ScormAiccContent) - { - - - Download: - - @GetFileExtension(resourceItem.GenericFileDetails.File.FileName) - @resourceItem.GenericFileDetails.File.FileName (@resourceItem.GenericFileDetails.File.FileSizeKb KB) - - - - } - else - { - - - - You will be able to launch SCORM/AICC elearning resources on the Learning Hub in the future. - In the meantime you can download this and add it to another system that supports this type of resource. - - Download this elearning resource - - - - - - Why am I unable to view e-learning resources? - - - - - TBC - - - - + + + Download: + + @GetFileExtension(resourceItem.GenericFileDetails.File.FileName) + @resourceItem.GenericFileDetails.File.FileName (@resourceItem.GenericFileDetails.File.FileSizeKb KB) + - } + + } @@ -191,6 +146,22 @@ } } + @* Html Resource *@ + @if (canShowMoreDetails && resourceItem.ResourceTypeEnum == ResourceTypeEnum.Html) + { + + + + + Launch HTML resource + + + This resource will launch in a new window + + + } + @if (canShowMoreDetails && resourceItem.ResourceTypeEnum == ResourceTypeEnum.Video || resourceItem.ResourceTypeEnum == ResourceTypeEnum.Audio || resourceItem.ResourceTypeEnum == ResourceTypeEnum.Scorm || resourceItem.ResourceTypeEnum == ResourceTypeEnum.Case || resourceItem.ResourceTypeEnum == ResourceTypeEnum.Assessment) diff --git a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj index d0b8cbace..e56e18a79 100644 --- a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj +++ b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj @@ -27,7 +27,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj index 1a077edd8..0df2956b9 100644 --- a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj +++ b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj index cf477a8d2..acf8cf30b 100644 --- a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj @@ -11,7 +11,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Database/Stored Procedures/Resources/GetDashboardResources.sql b/WebAPI/LearningHub.Nhs.Database/Stored Procedures/Resources/GetDashboardResources.sql index 18d83863b..b57d97063 100644 --- a/WebAPI/LearningHub.Nhs.Database/Stored Procedures/Resources/GetDashboardResources.sql +++ b/WebAPI/LearningHub.Nhs.Database/Stored Procedures/Resources/GetDashboardResources.sql @@ -15,6 +15,7 @@ -- 15 Jun 2023 RS Re-added BadgeUrl column following design change -- 27 Sep 2023 HV Included Paging and user resource activity -- 08 Nov 2023 OA Fixed latest resource activity entry selection(with updated logic for media activities) and status check for incomplete assessment. +-- 27 Feb 2024 SS Fixed missing In progress resources in the My Accessed Learning tray issue ------------------------------------------------------------------------------- CREATE PROCEDURE [resources].[GetDashboardResources] @@ -222,8 +223,7 @@ BEGIN BEGIN INSERT INTO @MyActivity SELECT TOP (@MaxRows) ra.ResourceId, MAX(ra.Id) ResourceActivityId - FROM - (SELECT a.* FROM activity.ResourceActivity a INNER JOIN (SELECT ResourceId, MAX(Id) as id FROM activity.ResourceActivity GROUP BY ResourceId ) AS b ON a.ResourceId = b.ResourceId AND a.id = b.id order by a.Id desc OFFSET 0 ROWS) ra + FROM activity.ResourceActivity ra JOIN [resources].[Resource] r ON ra.ResourceId = r.Id JOIN [resources].[ResourceVersion] rv ON rv.Id = ra.ResourceVersionId LEFT JOIN [resources].[AssessmentResourceVersion] arv ON arv.ResourceVersionId = ra.ResourceVersionId diff --git a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj index 3cd8e1a81..a9edf892b 100644 --- a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj @@ -9,7 +9,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj index e1327564c..b78eb079f 100644 --- a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj +++ b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj @@ -9,7 +9,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj index 5b31e41c3..43fcaa997 100644 --- a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj @@ -16,7 +16,7 @@ - + all diff --git a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj index 47e0e5cc5..851d4a9b7 100644 --- a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj @@ -13,7 +13,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Services/InternalSystemService.cs b/WebAPI/LearningHub.Nhs.Services/InternalSystemService.cs index 34ad5ff4d..33fb4dcbc 100644 --- a/WebAPI/LearningHub.Nhs.Services/InternalSystemService.cs +++ b/WebAPI/LearningHub.Nhs.Services/InternalSystemService.cs @@ -72,9 +72,10 @@ public async Task> GetAllAsync() /// /// The id. /// A representing the result of the asynchronous operation. - public Task GetByIdAsync(int id) + public async Task GetByIdAsync(int id) { - return Task.FromResult(this.GetAllAsync().Result.Single(x => x.Id == id)); + var allItems = await this.GetAllAsync(); + return allItems.Single(x => x.Id == id); } /// diff --git a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj index 0a200d9a9..d9cfdd580 100644 --- a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj +++ b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj @@ -13,7 +13,7 @@ - + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj index 4548a8fa3..7990f7c87 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj @@ -24,7 +24,7 @@ - + all diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj index 1bf03adeb..5c0d5b6b9 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj index b67880c09..e51a95a68 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj @@ -10,7 +10,7 @@ - + all diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj index ca56473a8..21be892d0 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj @@ -9,7 +9,7 @@ - + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj index 976365de3..930bff128 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj @@ -10,7 +10,7 @@ - + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj index ea8b9d3eb..6b9db73c4 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive
Visit site:
@displayText
This resource will launch in a new window
Download:
- @GetFileExtension(resourceItem.GenericFileDetails.File.FileName) - @resourceItem.GenericFileDetails.File.FileName (@resourceItem.GenericFileDetails.File.FileSizeKb KB) -
You will be able to launch SCORM/AICC elearning resources on the Learning Hub in the future.
In the meantime you can download this and add it to another system that supports this type of resource.
- TBC -
+ @GetFileExtension(resourceItem.GenericFileDetails.File.FileName) + @resourceItem.GenericFileDetails.File.FileName (@resourceItem.GenericFileDetails.File.FileSizeKb KB) +