MOBILE-2840 scorm: Fix blank page on refresh

main
Albert Gasset 2019-05-28 10:20:36 +02:00
parent a6f7feed92
commit aa151774d8
1 changed files with 3 additions and 3 deletions

View File

@ -245,12 +245,12 @@ export class AddonModScormIndexComponent extends CoreCourseModuleMainActivityCom
return Promise.all(promises).then(() => {
// Check whether to launch the SCORM immediately.
if (typeof this.skip == 'undefined' && !this.hasOffline && !this.errorMessage &&
if (typeof this.skip == 'undefined') {
this.skip = !this.hasOffline && !this.errorMessage &&
(!this.scorm.lastattemptlock || this.scorm.attemptsLeft > 0) &&
this.accessInfo.canskipview && !this.accessInfo.canviewreport &&
this.scorm.skipview >= AddonModScormProvider.SKIPVIEW_FIRST &&
(this.scorm.skipview == AddonModScormProvider.SKIPVIEW_ALWAYS || this.lastAttempt == 0)) {
this.skip = true;
(this.scorm.skipview == AddonModScormProvider.SKIPVIEW_ALWAYS || this.lastAttempt == 0);
}
});
});