Skip to content

Commit 25f6523

Browse files
TD-5291 Issue on 'Course set up' screen when selected Few course content first time and changed to 'All' of them clicking 'change link'
1 parent 6c2d6e4 commit 25f6523

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

DigitalLearningSolutions.Web/Controllers/TrackingSystem/CourseSetup/CourseSetupController.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,14 @@ public IActionResult SetSectionContent(int sectionIndex)
461461

462462
var showDiagnostic = data.Application!.DiagAssess;
463463
var tutorial = GetTutorialsFromSectionContentData(data.SectionContentData, tutorials);
464-
if(tutorial.Count() == 0)
464+
if (tutorial.Count() == 0)
465465
{
466466
var models = new SetSectionContentViewModel(section, sectionIndex, showDiagnostic, tutorials);
467467
return View("AddNewCentreCourse/SetSectionContent", models);
468468
}
469-
var model = new SetSectionContentViewModel(section, sectionIndex, showDiagnostic, tutorial);
470-
return View("AddNewCentreCourse/SetSectionContent", model);
471-
469+
var model = new SetSectionContentViewModel(section, sectionIndex, showDiagnostic, tutorial);
470+
return View("AddNewCentreCourse/SetSectionContent", model);
471+
472472

473473
}
474474

@@ -510,7 +510,7 @@ public IActionResult Summary()
510510

511511
updatedSections.AddRange(matchingSections);
512512
}
513-
513+
514514
updatedSections = updatedSections.Distinct().ToList();
515515
data.SectionContentData = updatedSections;
516516
multiPageFormService.SetMultiPageFormData(data, MultiPageFormDataFeature.AddNewCourse, TempData);
@@ -677,11 +677,11 @@ private IActionResult SaveSectionAndRedirect(SetSectionContentViewModel model)
677677
}
678678
}
679679
if (sectionsToRemove.Count > 0)
680-
{
681-
foreach (var section in sectionsToRemove)
682680
{
683-
data.SectionContentData.Remove(section);
684-
}
681+
foreach (var section in sectionsToRemove)
682+
{
683+
data.SectionContentData.Remove(section);
684+
}
685685
}
686686
data!.SectionContentData!.Add(
687687
new SectionContentTempData(

0 commit comments

Comments
 (0)