From 27230c7e2b3fdcf33cb15a7d6c523b44c3055c54 Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Fri, 17 Apr 2026 12:27:27 +0100 Subject: [PATCH] TD-7126: Issue with the recent learning --- .../LearningHub.Nhs.AdminUI/Controllers/CatalogueController.cs | 1 + .../Services/MoodleBridgeApiService.cs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/CatalogueController.cs b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/CatalogueController.cs index b9f1b5e0..49aef963 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/CatalogueController.cs +++ b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/CatalogueController.cs @@ -740,6 +740,7 @@ public async Task AddCategoryToCatalogue(CatalogueViewModel catal this.ModelState.AddModelError("SelectedCategoryId", "Please select a category."); var vm = await this.catalogueService.GetCatalogueAsync(catalogueViewModel.CatalogueNodeVersionId); var categories = await this.moodleBridgeApiService.GetAllMoodleCategoriesAsync(); + vm.SelectedCategoryId = null; vm.MoodleCategorySelectList = BuildMoodleCategorySelectList(categories); return this.View("MoodleCategory", vm); diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/MoodleBridgeApiService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/MoodleBridgeApiService.cs index 80dd7617..71076c3f 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/MoodleBridgeApiService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/MoodleBridgeApiService.cs @@ -215,8 +215,7 @@ public async Task GetRecentEnrolledCoursesAsy } catch (Exception ex) { - this.logger.LogError(ex, "An error occurred while fetching user's recent learning activities "); - throw; + return null; } }