MOBILE-3946 completion: Fix bug detecting automatic completion
parent
09a8d8fead
commit
007fbe0ab2
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue