From 086a220f86c622b7692825ae2e05b19b1546e373 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Mon, 27 May 2024 11:19:32 +0200 Subject: [PATCH] MOBILE-4470 timeline: Avoid filtering past courses This may have been introduced by mistake in commit https://github.com/moodlehq/moodleapp/commit/0f5416e2f0750da7aa5c015ffcfb2d12fd87ae32. 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. --- src/addons/block/timeline/components/timeline/timeline.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/addons/block/timeline/components/timeline/timeline.ts b/src/addons/block/timeline/components/timeline/timeline.ts index 6969c63c3..76e7881c2 100644 --- a/src/addons/block/timeline/components/timeline/timeline.ts +++ b/src/addons/block/timeline/components/timeline/timeline.ts @@ -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(