MOBILE-3855 completion: Fix manual completion when recent item clicked

main
Dani Palou 2021-09-07 10:32:23 +02:00
parent 32c186aebe
commit 67c4a3e928
1 changed files with 3 additions and 0 deletions

View File

@ -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);