Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ public IEnumerable<SelfAssessmentSelect> GetSelfAssessmentsForReportList(int cen
@"SELECT csa.SelfAssessmentID AS Id, sa.Name,
(SELECT COUNT(*) FROM
CandidateAssessments ca1 INNER JOIN
Candidates c1 ON ca1.CandidateID = c1.CandidateID
WHERE c1.CentreID = @centreId AND ca1.SelfAssessmentID = sa.ID AND ca1.RemovedDate IS NULL) AS LearnerCount
Candidates c1 ON ca1.CandidateID = c1.CandidateID LEFT OUTER JOIN
AdminUsers AS au ON c1.EmailAddress = au.Email AND c1.CentreID = au.CentreID
WHERE (au.AdminID IS NULL) AND (c1.CentreID = @centreId) AND (ca1.SelfAssessmentID = sa.ID) AND (ca1.RemovedDate IS NULL)) AS LearnerCount
FROM CentreSelfAssessments AS csa INNER JOIN
SelfAssessments AS sa ON csa.SelfAssessmentID = sa.ID
WHERE (csa.CentreID = @centreId) AND (sa.CategoryID = @categoryId) AND (sa.SupervisorResultsReview = 1) AND (sa.ArchivedDate IS NULL) OR
Expand Down Expand Up @@ -71,13 +72,7 @@ sa.Name AS SelfAssessment
, CASE WHEN c.CustomField1PromptID = 10 THEN can.Answer1 WHEN c.CustomField2PromptID = 10 THEN can.Answer2 WHEN c.CustomField3PromptID = 10 THEN can.Answer3 WHEN c.CustomField4PromptID = 10 THEN can.Answer4 WHEN c.CustomField5PromptID = 10 THEN can.Answer5 WHEN c.CustomField6PromptID = 10 THEN can.Answer6 ELSE '' END AS 'ProgrammeCourse'
, CASE WHEN c.CustomField1PromptID = 4 THEN can.Answer1 WHEN c.CustomField2PromptID = 4 THEN can.Answer2 WHEN c.CustomField3PromptID = 4 THEN can.Answer3 WHEN c.CustomField4PromptID = 4 THEN can.Answer4 WHEN c.CustomField5PromptID = 4 THEN can.Answer5 WHEN c.CustomField6PromptID = 4 THEN can.Answer6 ELSE '' END AS 'Organisation'
, CASE WHEN c.CustomField1PromptID = 1 THEN can.Answer1 WHEN c.CustomField2PromptID = 1 THEN can.Answer2 WHEN c.CustomField3PromptID = 1 THEN can.Answer3 WHEN c.CustomField4PromptID = 1 THEN can.Answer4 WHEN c.CustomField5PromptID = 1 THEN can.Answer5 WHEN c.CustomField6PromptID = 1 THEN can.Answer6 ELSE '' END AS 'DepartmentTeam'
, CASE
WHEN au.AdminID IS NULL THEN 'Learner'
WHEN au.IsCentreManager = 1 THEN 'Centre Manager'
WHEN au.CentreAdmin = 1 AND au.IsCentreManager = 0 THEN 'Centre Admin'
WHEN au.Supervisor = 1 THEN 'Supervisor'
WHEN au.NominatedSupervisor = 1 THEN 'Nominated supervisor'
END AS DLSRole

, can.DateRegistered AS Registered
, ca.StartedDate AS Started
, ca.LastAccessed
Expand All @@ -100,7 +95,7 @@ SelfAssessments AS sa INNER JOIN
SupervisorDelegates AS sd ON cas.SupervisorDelegateId = sd.ID
LEFT OUTER JOIN LatestAssessmentResults AS LAR ON LAR.CandidateID = can.CandidateID
WHERE
(sa.ID = @SelfAssessmentID) AND (sa.ArchivedDate IS NULL) AND (c.Active = 1) AND (ca.RemovedDate IS NULL)
(au.AdminID IS NULL) AND (sa.ID = @SelfAssessmentID) AND (sa.ArchivedDate IS NULL) AND (c.Active = 1) AND (ca.RemovedDate IS NULL)
Group by sa.Name
, can.LastName + ', ' + can.FirstName
, can.Active
Expand All @@ -120,11 +115,6 @@ Group by sa.Name
, can.Answer5
, can.Answer6
, can.DateRegistered
, au.AdminID
, au.IsCentreManager
, au.CentreAdmin
, au.Supervisor
, au.NominatedSupervisor
, ca.StartedDate
, ca.LastAccessed
ORDER BY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public class SelfAssessmentReportData
public string? ProgrammeCourse { get; set; }
public string? Organisation { get; set; }
public string? DepartmentTeam { get; set; }
public string? DLSRole { get; set; }
public DateTime? Registered { get; set; }
public DateTime? Started { get; set; }
public DateTime? LastAccessed { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public byte[] GetSelfAssessmentExcelExportForCentre(int centreId, int selfAssess
x.ProgrammeCourse,
x.Organisation,
x.DepartmentTeam,
x.DLSRole,
x.Registered,
x.Started,
x.LastAccessed,
Expand Down