From d750b917477f4f5cff83ec1eef201f8270489024 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 27 Oct 2023 10:00:08 +0200 Subject: [PATCH] MOBILE-4362 quiz: Fix review not opened after finish offline quiz --- src/addons/mod/quiz/components/index/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/addons/mod/quiz/components/index/index.ts b/src/addons/mod/quiz/components/index/index.ts index cf5d867e5d5..f0dd6bb5be9 100644 --- a/src/addons/mod/quiz/components/index/index.ts +++ b/src/addons/mod/quiz/components/index/index.ts @@ -406,6 +406,7 @@ export class AddonModQuizIndexComponent extends CoreCourseModuleMainActivityComp // Verify that user can see the review. const attemptId = this.autoReview.attemptId; + this.autoReview = undefined; if (this.quizAccessInfo?.canreviewmyattempts) { try { @@ -452,7 +453,6 @@ export class AddonModQuizIndexComponent extends CoreCourseModuleMainActivityComp // Check if we need to go to review an attempt automatically. if (this.autoReview && this.autoReview.synced) { promise = this.goToAutoReview(); - this.autoReview = undefined; } // Refresh data. @@ -594,7 +594,6 @@ export class AddonModQuizIndexComponent extends CoreCourseModuleMainActivityComp if (!this.isDestroyed && this.isCurrentView) { openReview = true; } - this.autoReview = undefined; } const [options] = await Promise.all([