From aa151774d8f49c28bbb56207a04bcc6ad5751d11 Mon Sep 17 00:00:00 2001 From: Albert Gasset Date: Tue, 28 May 2019 10:20:36 +0200 Subject: [PATCH] MOBILE-2840 scorm: Fix blank page on refresh --- src/addon/mod/scorm/components/index/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/addon/mod/scorm/components/index/index.ts b/src/addon/mod/scorm/components/index/index.ts index 181342b58..6672548b7 100644 --- a/src/addon/mod/scorm/components/index/index.ts +++ b/src/addon/mod/scorm/components/index/index.ts @@ -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); } }); });