From 7de65ddd5a409ffcd3cb2774670033e303b36b3f Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 15 Jun 2021 15:37:51 +0200 Subject: [PATCH] MOBILE-3320 lesson: Remove sync review button after clicked --- src/addons/mod/lesson/components/index/index.ts | 6 ++++-- src/addons/mod/lesson/pages/player/player.html | 13 +++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/addons/mod/lesson/components/index/index.ts b/src/addons/mod/lesson/components/index/index.ts index 8557039c3..522d769fa 100644 --- a/src/addons/mod/lesson/components/index/index.ts +++ b/src/addons/mod/lesson/components/index/index.ts @@ -470,13 +470,13 @@ export class AddonModLessonIndexComponent extends CoreCourseModuleMainActivityCo /** * Review the lesson. */ - review(): void { + async review(): Promise { if (!this.retakeToReview || !this.lesson) { // No retake to review, stop. return; } - CoreNavigator.navigateToSitePath( + await CoreNavigator.navigateToSitePath( `${AddonModLessonModuleHandlerService.PAGE_NAME}/${this.courseId}/${this.module.id}/player`, { params: { @@ -487,6 +487,8 @@ export class AddonModLessonIndexComponent extends CoreCourseModuleMainActivityCo }, }, ); + + this.retakeToReview = undefined; } /** diff --git a/src/addons/mod/lesson/pages/player/player.html b/src/addons/mod/lesson/pages/player/player.html index 816db0f4e..b5a0a9e7b 100644 --- a/src/addons/mod/lesson/pages/player/player.html +++ b/src/addons/mod/lesson/pages/player/player.html @@ -186,13 +186,14 @@ + + + + {{ 'addon.mod_lesson.finishretakeoffline' | translate }} + + + -
- - - {{ 'addon.mod_lesson.finishretakeoffline' | translate }} - -
{{ 'addon.mod_lesson.congratulations' | translate }}