File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
DigitalLearningSolutions.Data/DataServices
DigitalLearningSolutions.Web.Tests/Services
DigitalLearningSolutions.Web/Services Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -337,7 +337,8 @@ FROM Customisations cu
337337 cc.CategoryName,
338338 ct.CourseTopic,
339339 CASE WHEN ({ TutorialWithLearningCountQuery } ) > 0 THEN 1 ELSE 0 END AS HasLearning,
340- CASE WHEN ({ TutorialWithDiagnosticCountQuery } ) > 0 THEN 1 ELSE 0 END AS HasDiagnostic
340+ CASE WHEN ({ TutorialWithDiagnosticCountQuery } ) > 0 THEN 1 ELSE 0 END AS HasDiagnostic,
341+ CASE WHEN ap.ArchivedDate IS NULL THEN 0 ELSE 1 END AS Archived
341342 FROM Customisations AS c
342343 INNER JOIN Applications AS ap ON ap.ApplicationID = c.ApplicationID
343344 INNER JOIN CourseCategories AS cc ON ap.CourseCategoryId = cc.CourseCategoryId
@@ -869,8 +870,8 @@ public IEnumerable<CourseStatistics> GetNonArchivedCourseStatisticsAtCentreFilte
869870
870871 public IEnumerable < DelegateCourseInfo > GetDelegateCoursesInfo ( int delegateId )
871872 {
872- return connection . Query < DelegateCourseInfo > (
873- $@ "{ selectDelegateCourseInfoQuery }
873+ return connection . Query < DelegateCourseInfo > (
874+ $@ "{ selectDelegateCourseInfoQuery }
874875 WHERE pr.CandidateID = @delegateId
875876 AND pr.RemovedDate IS NULL
876877 AND ap.DefaultContentTypeID <> 4
@@ -914,8 +915,8 @@ AND ap.DefaultContentTypeID <> 4
914915 u.ProfessionalRegistrationNumber,
915916 da.CentreID,
916917 ap.ArchivedDate" ,
917- new { delegateId }
918- ) ;
918+ new { delegateId }
919+ ) ;
919920 }
920921
921922 public DelegateCourseInfo ? GetDelegateCourseInfoByProgressId ( int progressId )
Original file line number Diff line number Diff line change @@ -784,7 +784,7 @@ public void GetEligibleCoursesToAddToGroup_does_not_return_courses_already_in_gr
784784 var result = courseService . GetEligibleCoursesToAddToGroup ( centreId , categoryId , groupId ) . ToList ( ) ;
785785
786786 // Then
787- result . Should ( ) . HaveCount ( 4 ) ;
787+ result . Should ( ) . HaveCount ( 3 ) ;
788788 result . Should ( ) . NotContain ( c => c . CustomisationId == 2 ) ;
789789 }
790790
Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ int groupId
384384 )
385385 {
386386 var allPossibleCourses = courseDataService . GetCoursesAvailableToCentreByCategory ( centreId , categoryId )
387- . Where ( c => c . Active ) ;
387+ . Where ( c => c . Active && ! c . Archived ) ;
388388
389389 var groupCourseIds = groupsDataService . GetGroupCoursesVisibleToCentre ( centreId )
390390 . Where ( gc => gc . IsUsable && gc . GroupId == groupId )
You can’t perform that action at this time.
0 commit comments