Skip to content

Commit 90b714f

Browse files
committed
TD-2508 - variable type modified.
1 parent f4af019 commit 90b714f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

DigitalLearningSolutions.Data/Models/Courses/AvailableCourse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public string? Topic
1616
set => topic = GetValidOrNull(value);
1717
}
1818
public int DelegateStatus { get; set; }
19-
public int HideInLearnerPortal { get; set; }
19+
public bool HideInLearnerPortal { get; set; }
2020

2121
private string? category;
2222
private string? topic;

DigitalLearningSolutions.Web.Tests/TestHelpers/AvailableCourseHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static AvailableCourse CreateDefaultAvailableCourse(
1717
string? category = "Category 1",
1818
string? topic = "Topic 1",
1919
int delegateStatus = 0,
20-
int hideInLearnerPortal =0
20+
bool hideInLearnerPortal = false
2121
)
2222
{
2323
return new AvailableCourse

DigitalLearningSolutions.Web/Controllers/LearningPortalController/Available.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public IActionResult Available(
2424
var availableCourses = courseDataService.GetAvailableCourses(
2525
User.GetCandidateIdKnownNotNull(),
2626
User.GetCentreIdKnownNotNull()
27-
).Where(course => course.HideInLearnerPortal == 0).ToList();
27+
).Where(course => !course.HideInLearnerPortal).ToList();
2828
var bannerText = GetBannerText();
2929
var searchSortPaginationOptions = new SearchSortFilterAndPaginateOptions(
3030
new SearchOptions(searchString),
@@ -51,7 +51,7 @@ public IActionResult AllAvailableItems()
5151
var availableCourses = courseDataService.GetAvailableCourses(
5252
User.GetCandidateIdKnownNotNull(),
5353
User.GetCentreIdKnownNotNull()
54-
).Where(course => course.HideInLearnerPortal == 0).ToList();
54+
).Where(course => !course.HideInLearnerPortal).ToList();
5555
var model = new AllAvailableItemsPageViewModel(availableCourses);
5656
return View("Available/AllAvailableItems", model);
5757
}

0 commit comments

Comments
 (0)