From 67c4a3e9287517f913ef06a305ae45317ba6d74c Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 7 Sep 2021 10:32:23 +0200 Subject: [PATCH] MOBILE-3855 completion: Fix manual completion when recent item clicked --- src/core/features/course/classes/main-resource-component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/features/course/classes/main-resource-component.ts b/src/core/features/course/classes/main-resource-component.ts index 3fb59518a..856ac0375 100644 --- a/src/core/features/course/classes/main-resource-component.ts +++ b/src/core/features/course/classes/main-resource-component.ts @@ -100,6 +100,9 @@ export class CoreCourseModuleMainResourceComponent implements OnInit, OnDestroy, this.showCompletion = !!CoreSites.getCurrentSite()?.isVersionGreaterEqualThan('3.11'); if (this.showCompletion) { + CoreCourseHelper.calculateModuleCompletionData(this.module, this.courseId); + CoreCourseHelper.loadModuleOfflineCompletion(this.courseId, this.module); + this.completionObserver = CoreEvents.on(CoreEvents.COMPLETION_MODULE_VIEWED, async (data) => { if (data && data.cmId == this.module.id) { await CoreCourse.invalidateModule(this.module.id);