Skip to content

Commit 468e0b2

Browse files
authored
Merge pull request #3368 from TechnologyEnhancedLearning/DLS-Release-v1.2.3
Dls release v1.2.3 to UAT
2 parents a7bb19c + 0cdf530 commit 468e0b2

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

DigitalLearningSolutions.Web/Controllers/SuperAdmin/Centres/CentresController.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
using System;
2222
using System.Collections.Generic;
2323
using System.Linq;
24-
using System.Text.RegularExpressions;
2524

2625
namespace DigitalLearningSolutions.Web.Controllers.SuperAdmin.Centres
2726
{
@@ -331,8 +330,7 @@ public IActionResult ManageCentreManager(EditCentreManagerDetailsViewModel editC
331330
{
332331
editCentreManagerDetailsViewModel.FirstName = editCentreManagerDetailsViewModel.FirstName == null ? string.Empty : editCentreManagerDetailsViewModel.FirstName.Trim();
333332
editCentreManagerDetailsViewModel.LastName = editCentreManagerDetailsViewModel.LastName == null ? string.Empty : editCentreManagerDetailsViewModel.LastName.Trim();
334-
editCentreManagerDetailsViewModel.Telephone = editCentreManagerDetailsViewModel.Telephone != null ? Regex.Replace(editCentreManagerDetailsViewModel.Telephone, @"\s+", "")
335-
: string.Empty; ;
333+
editCentreManagerDetailsViewModel.Telephone = editCentreManagerDetailsViewModel.Telephone?.Trim() ?? string.Empty;
336334
if (!ModelState.IsValid)
337335
{
338336
return View(editCentreManagerDetailsViewModel);

DigitalLearningSolutions.Web/Services/ImportCompetenciesFromFileService.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ public ImportCompetenciesResult PreProcessCompetenciesTable(IXLWorkbook workbook
3737
var newCompetencyIds = competencyRows.Select(row => row.ID ?? 0).ToList();
3838
var existingIds = frameworkService.GetFrameworkCompetencyOrder(frameworkId, newCompetencyIds);
3939
var existingGroups = frameworkService
40-
.GetFrameworkCompetencyGroups(frameworkId)
40+
.GetFrameworkCompetencyGroups(frameworkId).Where(x => x.FrameworkCompetencies.Any()).ToList()
4141
.Select(row => row.Name)
4242
.Distinct()
4343
.ToList();
44-
var newGroups = competencyRows.Select(row => row.CompetencyGroup ?? "").Distinct().ToList();
44+
var newGroups = competencyRows.Select(row => row.CompetencyGroup)
45+
.Where(g => !string.IsNullOrEmpty(g))
46+
.Distinct().ToList();
4547
foreach (var competencyRow in competencyRows)
4648
{
4749
PreProcessCompetencyRow(competencyRow, newCompetencyIds, existingIds, existingGroups, newGroups);

DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/CompetencySelfAssessmentCertificate.cshtml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,21 @@
7676
<h1>Certificate</h1>
7777

7878
<h2>@Model.CompetencySelfAssessmentCertificates.SelfAssessment - @Model.CompetencySelfAssessmentCertificates.LearnerName </h2>
79-
@if (Model.Vocabulary == "Proficiencies")
79+
80+
@if (Model.Vocabulary == "ProfileAssessment")
8081
{
8182
<a class="nhsuk-button "
82-
asp-controller="LearningPortal"
83+
asp-controller="Supervisor"
8384
asp-route-candidateAssessmentId="@Model.CompetencySelfAssessmentCertificates.CandidateAssessmentID"
8485
asp-action="DownloadCertificate"
8586
role="button">
8687
Download certificate
8788
</a>
8889
}
89-
@if (Model.Vocabulary == "ProfileAssessment")
90+
else
9091
{
9192
<a class="nhsuk-button "
92-
asp-controller="Supervisor"
93+
asp-controller="LearningPortal"
9394
asp-route-candidateAssessmentId="@Model.CompetencySelfAssessmentCertificates.CandidateAssessmentID"
9495
asp-action="DownloadCertificate"
9596
role="button">

0 commit comments

Comments
 (0)