Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions LearningHub.Nhs.WebUI/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ public async Task<IActionResult> LoadPage(string dashBoardTray = "my-learning",
Catalogues = new Nhs.Models.Dashboard.DashboardCatalogueResponseViewModel { Type = catalogueDashBoard },
};

var enableMoodle = Task.Run(() => this.featureManager.IsEnabledAsync(FeatureFlags.EnableMoodle)).Result;
this.ViewBag.EnableMoodle = enableMoodle;
this.ViewBag.ValidMoodleUser = this.CurrentMoodleUserId > 0;

bool isAjax = this.HttpContext.Request.Headers["X-Requested-With"] == "XMLHttpRequest";

if (isAjax)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<Nullable>enable</Nullable>
Expand All @@ -21,6 +21,7 @@
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageReference Include="Microsoft.ApplicationInsights.NLogTarget" Version="2.22.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.36" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.36" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.15.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
Expand Down
7 changes: 3 additions & 4 deletions OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,11 @@ public void ConfigureServices(IServiceCollection services)
{
options.Filters.Add(new HttpResponseExceptionFilter());
options.Filters.Add(new AuthorizeFilter());
})
.AddJsonOptions(options =>
{
options.JsonSerializerOptions.ReferenceHandler = System.Text.Json.Serialization.ReferenceHandler.IgnoreCycles;
});

services.AddMvc()
.AddNewtonsoftJson(options => options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore);

services.AddSwaggerGen(
c =>
{
Expand Down
Loading