Skip to content

Commit 4c2781f

Browse files
authored
Merge pull request #2175 from TechnologyEnhancedLearning/Develop/fix/TD-2183-Course-delegates-list-to-use-SQL-filtering-IssueFix
TD-2183 - Course delegates list to use SQL filtering - search issue fixed.
2 parents 84d47fb + 4845aba commit 4c2781f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

DigitalLearningSolutions.Data/DataServices/CourseDataService.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ FROM CentreApplications cap
853853
public (IEnumerable<DelegateCourseInfo>, int) GetDelegateCourseInfosPerPageForCourse(string searchString, int offSet, int itemsPerPage, string sortBy, string sortDirection,
854854
int customisationId, int centreId, bool? isDelegateActive, bool? isProgressLocked, bool? removed, bool? hasCompleted, string? answer1, string? answer2, string? answer3)
855855
{
856-
856+
searchString = searchString == null ? string.Empty : searchString.Trim();
857857
var selectColumnQuery = $@"SELECT
858858
cu.CustomisationID AS CustomisationId,
859859
cu.CustomisationName,
@@ -1413,8 +1413,8 @@ FROM DelegateAccounts AS da
14131413

14141414
public int GetCourseDelegatesCountForExport(string searchString, string sortBy, string sortDirection,
14151415
int customisationId, int centreId, bool? isDelegateActive, bool? isProgressLocked, bool? removed, bool? hasCompleted, string? answer1, string? answer2, string? answer3)
1416-
{
1417-
1416+
{
1417+
searchString = searchString == null ? string.Empty : searchString.Trim();
14181418
var fromTableQuery = $@" FROM Customisations cu WITH (NOLOCK)
14191419
INNER JOIN Applications AS ap WITH (NOLOCK) ON ap.ApplicationID = cu.ApplicationID
14201420
INNER JOIN Progress AS pr WITH (NOLOCK) ON pr.CustomisationID = cu.CustomisationID
@@ -1482,7 +1482,7 @@ AND ap.DefaultContentTypeID <> 4
14821482
public async Task<IEnumerable<CourseDelegateForExport>> GetCourseDelegatesForExport(string searchString, int offSet, int itemsPerPage, string sortBy, string sortDirection,
14831483
int customisationId, int centreId, bool? isDelegateActive, bool? isProgressLocked, bool? removed, bool? hasCompleted, string? answer1, string? answer2, string? answer3)
14841484
{
1485-
1485+
searchString = searchString == null ? string.Empty : searchString.Trim();
14861486
var selectColumnQuery = $@"SELECT
14871487
ap.ApplicationName,
14881488
cu.CustomisationName,

0 commit comments

Comments
 (0)