File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
DigitalLearningSolutions.Data/Models/Courses
DigitalLearningSolutions.Web.Tests/TestHelpers
DigitalLearningSolutions.Web/Controllers/LearningPortalController Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments