Skip to content

Commit

Permalink
Merge pull request #3840 from dpalou/MOBILE-4362
Browse files Browse the repository at this point in the history
MOBILE-4362 quiz: Fix review not opened after finish offline quiz
  • Loading branch information
crazyserver authored Oct 27, 2023
2 parents 93a9d19 + d750b91 commit 935da86
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/addons/mod/quiz/components/index/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -594,7 +594,6 @@ export class AddonModQuizIndexComponent extends CoreCourseModuleMainActivityComp
if (!this.isDestroyed && this.isCurrentView) {
openReview = true;
}
this.autoReview = undefined;
}

const [options] = await Promise.all([
Expand Down

0 comments on commit 935da86

Please sign in to comment.