Merge pull request #3840 from dpalou/MOBILE-4362

MOBILE-4362 quiz: Fix review not opened after finish offline quiz
main
Pau Ferrer Ocaña 2023-10-27 16:35:02 +02:00 committed by GitHub
commit 935da86caa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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([