From 2dcb3895fa2122b7ff7b6e9cffbe33fe826cc996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 22 Mar 2022 11:15:23 +0100 Subject: [PATCH] MOBILE-4088 timeline: Don't filter courses, can contain activities due --- src/addons/block/timeline/components/timeline/timeline.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/addons/block/timeline/components/timeline/timeline.ts b/src/addons/block/timeline/components/timeline/timeline.ts index 969658ee7..ce962f59f 100644 --- a/src/addons/block/timeline/components/timeline/timeline.ts +++ b/src/addons/block/timeline/components/timeline/timeline.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit } from '@angular/core'; -import { CoreTimeUtils } from '@services/utils/time'; import { CoreSites } from '@services/sites'; import { CoreBlockBaseComponent } from '@features/block/classes/base-block-component'; import { AddonBlockTimeline } from '../../services/timeline'; @@ -171,11 +170,8 @@ export class AddonBlockTimelineComponent extends CoreBlockBaseComponent implemen * @return Promise resolved when done. */ protected async fetchMyOverviewTimelineByCourses(): Promise { - const courses = await CoreCoursesHelper.getUserCoursesWithOptions(); - const today = CoreTimeUtils.timestamp(); - - this.timelineCourses.courses = courses.filter((course) => - (course.startdate || 0) <= today && (!course.enddate || course.enddate >= today)); + // Do not filter courses by date because they can contain activities due. + this.timelineCourses.courses = await CoreCoursesHelper.getUserCoursesWithOptions(); if (this.timelineCourses.courses.length > 0) { this.courseIds = this.timelineCourses.courses.map((course) => course.id);