MOBILE-4470 timeline: Avoid filtering past courses

This may have been introduced by mistake in commit 0f5416e2f0. Looking at improvements introduced in 4.0, past courses were never filtered out but the UI says "No in-progress courses" when empty; that may have caused the confusion.
main
Noel De Martin 2024-05-27 11:19:32 +02:00
parent 00fd418b84
commit 086a220f86
1 changed files with 2 additions and 3 deletions

View File

@ -256,9 +256,8 @@ export class AddonBlockTimelineComponent implements OnInit, ICoreBlockComponent
.filter(
course =>
!course.hidden &&
!CoreCoursesHelper.isPastCourse(course, gracePeriod.after) &&
!CoreCoursesHelper.isFutureCourse(course, gracePeriod.after, gracePeriod.before) &&
courseEvents[course.id].events.length > 0,
!CoreCoursesHelper.isFutureCourse(course, gracePeriod.after, gracePeriod.before) &&
courseEvents[course.id].events.length > 0,
)
.map(course => {
const section = new AddonBlockTimelineSection(