Skip to content

Commit 731621b

Browse files
authored
Merge pull request #2861 from TechnologyEnhancedLearning/Develop/Features/TD-4469-FixReportFails
TD-4469 fix report fails
2 parents 76e103f + 865ca2d commit 731621b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

DigitalLearningSolutions.Data/DataServices/ActivityDataService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ int currentRun
143143
c.CustomisationName,
144144
u.FirstName,
145145
u.LastName,
146-
CASE WHEN COALESCE(ucd.Email, u.PrimaryEmail) LIKE '%@%' THEN COALESCE(ucd.Email, u.PrimaryEmail) ELSE '' END AS EmailAddress,
146+
COALESCE(ucd.Email, u.PrimaryEmail) AS EmailAddress,
147147
da.CandidateNumber AS DelegateId,
148148
da.Answer1,
149149
da.Answer2,
@@ -166,7 +166,8 @@ Users AS u INNER JOIN
166166
al.CustomisationID = @customisationId) AND (@courseCategoryId IS NULL OR
167167
al.CourseCategoryID = @courseCategoryId) AND (al.Registered = 1 OR
168168
al.Completed = 1 OR
169-
al.Evaluated = 1) AND EXISTS
169+
al.Evaluated = 1) AND
170+
(u.PrimaryEmail like '%_@_%' OR ucd.Email IS NOT NULL) AND EXISTS
170171
(SELECT ApplicationID
171172
FROM Applications AS ap
172173
WHERE (ApplicationID = al.ApplicationID) AND (DefaultContentTypeID <> 4))

DigitalLearningSolutions.Data/Models/TrackingSystem/ActivityLogDetail.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class ActivityLogDetail
99
public string? CustomisationName { get; set; }
1010
public string? FirstName { get; set; }
1111
public string? LastName { get; set; }
12-
public string? PrimaryEmail { get; set; }
12+
public string? EmailAddress { get; set; }
1313
public string? DelegateId { get; set; }
1414
public string? Answer1 { get; set; }
1515
public string? Answer2 { get; set; }

0 commit comments

Comments
 (0)