Skip to content

Commit dffabda

Browse files
authored
Merge pull request #2849 from TechnologyEnhancedLearning/Develop/Features/TD-4469-FixReportFails
TD-4469 fix test fails re enrolled column name and GUID emails
2 parents c6ecb97 + cb265e8 commit dffabda

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

DigitalLearningSolutions.Data/DataServices/ActivityDataService.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,22 +143,23 @@ int currentRun
143143
c.CustomisationName,
144144
u.FirstName,
145145
u.LastName,
146-
u.PrimaryEmail,
146+
CASE WHEN COALESCE(ucd.Email, u.PrimaryEmail) LIKE '%@%' THEN COALESCE(ucd.Email, u.PrimaryEmail) ELSE '' END AS EmailAddress,
147147
da.CandidateNumber AS DelegateId,
148148
da.Answer1,
149149
da.Answer2,
150150
da.Answer3,
151151
da.Answer4,
152152
da.Answer5,
153153
da.Answer6,
154-
al.Registered,
154+
al.Registered AS Enrolled,
155155
al.Completed,
156156
al.Evaluated
157157
FROM Applications AS a INNER JOIN
158158
tActivityLog AS al ON a.ApplicationID = al.ApplicationID INNER JOIN
159159
Users AS u INNER JOIN
160160
DelegateAccounts AS da ON u.ID = da.UserID ON al.CandidateID = da.ID AND al.CentreID = da.CentreID INNER JOIN
161-
Customisations AS c ON al.CustomisationID = c.CustomisationID
161+
Customisations AS c ON al.CustomisationID = c.CustomisationID LEFT OUTER JOIN
162+
UserCentreDetails AS ucd ON u.ID = ucd.UserID AND c.CentreID = al.CentreID
162163
WHERE (al.LogDate >= @startDate) AND (@endDate IS NULL OR
163164
al.LogDate <= @endDate) AND (al.CentreID = @centreId) AND (@jobGroupId IS NULL OR
164165
al.JobGroupID = @jobGroupId) AND (@customisationId IS NULL OR

DigitalLearningSolutions.Data/Models/TrackingSystem/ActivityLogDetail.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class ActivityLogDetail
1717
public string? Answer4 { get; set; }
1818
public string? Answer5 { get; set; }
1919
public string? Answer6 { get; set; }
20-
public bool Registered { get; set; }
20+
public bool Enrolled { get; set; }
2121
public bool Completed { get; set; }
2222
public bool Evaluated { get; set; }
2323
}

0 commit comments

Comments
 (0)