Skip to content

Commit 118a5a7

Browse files
authored
Merge pull request #1524 from TechnologyEnhancedLearning/Develop/Fixes/TD-6429-LMS-Error-Occurring-in-Test-Environment-While-Launching-SCORM-Content
SIT fixes
2 parents c317da6 + 4a7f9f8 commit 118a5a7

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

AdminUI/LearningHub.Nhs.AdminUI/Controllers/CatalogueController.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
using System.Collections.Generic;
2121
using System.Drawing;
2222
using System.Linq;
23+
using System.Net;
2324
using System.Text.RegularExpressions;
2425
using System.Threading.Tasks;
2526

@@ -282,7 +283,10 @@ public async Task<IActionResult> MoodleCategory(int id)
282283

283284
// Build hierarchical select list
284285
var selectList = BuildList(categories, parentId: null, depth: 0);
285-
286+
foreach (var item in selectList)
287+
{
288+
item.Text = WebUtility.HtmlDecode(item.Text);
289+
}
286290
vm.MoodleCategorySelectList = new SelectList(selectList, "Value", "Text");
287291
this.ViewData["CatalogueName"] = vm.Name;
288292
this.ViewData["id"] = id;
@@ -736,6 +740,12 @@ public async Task<IActionResult> AddCategoryToCatalogue(CatalogueViewModel catal
736740
vm.MoodleCategories = categories;
737741
// Build hierarchical select list
738742
var selectList = BuildList(categories, parentId: null, depth: 0);
743+
744+
foreach (var item in selectList)
745+
{
746+
item.Text = WebUtility.HtmlDecode(item.Text);
747+
}
748+
739749
vm.MoodleCategorySelectList = new SelectList(selectList, "Value", "Text");
740750
return this.View("MoodleCategory", vm);
741751
}
@@ -766,6 +776,10 @@ public async Task<IActionResult> RemoveCategoryFromCatalogue(int categoryId, int
766776
vm.SelectedCategoryId = 0;
767777
// Build hierarchical select list
768778
var selectList = BuildList(categories, parentId: null, depth: 0);
779+
foreach (var item in selectList)
780+
{
781+
item.Text = WebUtility.HtmlDecode(item.Text);
782+
}
769783
vm.MoodleCategorySelectList = new SelectList(selectList, "Value", "Text");
770784
return this.View("MoodleCategory", vm);
771785
}

LearningHub.Nhs.WebUI/Views/Catalogue/Courses.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<div class="nhsuk-u-padding-bottom-3 nhsuk-u-padding-top-2">
2121
<h2 class="folder-title line-clamp-2">
2222
<img src="/images/folder-icon.svg" alt="folder icon" />
23-
<a asp-controller="Catalogue" asp-route-reference="@Model.Catalogue.Url" asp-route-moodleCategoryId="@item.Id">@item.Name</a>
23+
<a asp-controller="Catalogue" asp-route-reference="@Model.Catalogue.Url" asp-route-moodleCategoryId="@item.Id">@Html.Raw(@item.Name)</a>
2424
</h2>
2525
</div>
2626
<hr class="nhsuk-u-margin-top-0 nhsuk-u-margin-bottom-0" />

LearningHub.Nhs.WebUI/Views/Catalogue/Index.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
return "Search catalogue";
5252
case "browse":
5353
default:
54-
return "Browse";
54+
return "Resources";
5555
}
5656
}
5757
if (Model.Catalogue.SelectedCategoryId == 0 ||
@@ -116,7 +116,7 @@
116116

117117
@* Catalogue header *@
118118
<div class="nhsuk-u-margin-bottom-7">
119-
<partial name="_Breadcrumbs" model="new BreadcrumbViewModel { Breadcrumbs = breadcrumbs, ShowBackToParentOnMobile = true }" />
119+
<partial name="_Breadcrumbs" model="new BreadcrumbViewModel { Breadcrumbs = breadcrumbs, ShowBackToParentOnMobile = false }" />
120120
@if (Model.Catalogue.Hidden)
121121
{
122122
<div class="nhsuk-u-margin-bottom-4">

0 commit comments

Comments
 (0)