MOBILE-3946 completion: Fix bug detecting automatic completion

main
Dani Palou 2021-12-13 15:07:01 +01:00
parent 09a8d8fead
commit 007fbe0ab2
2 changed files with 3 additions and 7 deletions

View File

@ -362,11 +362,11 @@ export class AddonModH5PActivityIndexComponent extends CoreCourseModuleMainActiv
/** /**
* Play the package. * Play the package.
*/ */
play(): void { async play(): Promise<void> {
this.playing = true; this.playing = true;
// Mark the activity as viewed. // Mark the activity as viewed.
AddonModH5PActivity.logView(this.h5pActivity!.id, this.h5pActivity!.name, this.siteId); await AddonModH5PActivity.logView(this.h5pActivity!.id, this.h5pActivity!.name, this.siteId);
CoreCourse.checkModuleCompletion(this.courseId, this.module.completiondata); CoreCourse.checkModuleCompletion(this.courseId, this.module.completiondata);
} }

View File

@ -203,11 +203,7 @@ export class CoreCourseModuleMainActivityComponent extends CoreCourseModuleMainR
try { try {
if (refresh && this.showCompletion) { if (refresh && this.showCompletion) {
try { await CoreUtils.ignoreErrors(this.fetchModule());
this.module = await CoreCourse.getModule(this.module.id, this.courseId);
} catch {
// Ignore errors.
}
} }
await this.fetchContent(refresh, sync, showErrors); await this.fetchContent(refresh, sync, showErrors);