From 22edea2dfc61d06bd1dac2dff2736b3f6277210c Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 15 Jun 2021 15:00:08 +0200 Subject: [PATCH] MOBILE-3320 lesson: Hide nav menu when reviewing the lesson --- src/addons/mod/lesson/pages/player/player.page.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/addons/mod/lesson/pages/player/player.page.ts b/src/addons/mod/lesson/pages/player/player.page.ts index 303d8add6..9d5d7db72 100644 --- a/src/addons/mod/lesson/pages/player/player.page.ts +++ b/src/addons/mod/lesson/pages/player/player.page.ts @@ -272,8 +272,7 @@ export class AddonModLessonPlayerPage implements OnInit, OnDestroy, CanLeave { // If lesson has offline data already, use offline mode. this.offline = await AddonModLessonOffline.hasOfflineData(this.lesson.id); - if (!this.offline && !CoreApp.isOnline() && AddonModLesson.isLessonOffline(this.lesson) && - !this.review) { + if (!this.offline && !CoreApp.isOnline() && AddonModLesson.isLessonOffline(this.lesson) && !this.review) { // Lesson doesn't have offline data, but it allows offline and the device is offline. Use offline mode. this.offline = true; } @@ -586,11 +585,12 @@ export class AddonModLessonPlayerPage implements OnInit, OnDestroy, CanLeave { this.originalData = undefined; } - if (data.displaymenu && !this.displayMenu) { + // Don't display the navigation menu in review mode, using them displays errors. + if (data.displaymenu && !this.displayMenu && !this.review) { // Load the menu. this.loadMenu(); } - this.displayMenu = !!data.displaymenu; + this.displayMenu = !this.review && !!data.displaymenu; if (!this.firstPageLoaded) { this.firstPageLoaded = true;