Merge pull request #3948 from NoelDeMartin/MOBILE-4350

MOBILE-4350 quiz: Allow navigating from sequential summary
main
Dani Palou 2024-02-29 10:28:06 +01:00 committed by GitHub
commit 5d3e8dba35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -271,9 +271,12 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave {
await this.scrollToQuestion(slot); await this.scrollToQuestion(slot);
return; return;
} else if ((page == this.attempt.currentpage && !this.showSummary) || (fromModal && this.isSequential && page != -1)) { } else if (
(page == this.attempt.currentpage && !this.showSummary) ||
(fromModal && this.isSequential && page != this.attempt.currentpage)
) {
// If the user is navigating to the current page we do nothing. // If the user is navigating to the current page we do nothing.
// Also, in sequential quizzes we don't allow navigating using the modal except for finishing the quiz (summary). // Also, in sequential quizzes we can only navigate to the current page.
return; return;
} else if (page === -1 && this.showSummary) { } else if (page === -1 && this.showSummary) {
// Summary already shown. // Summary already shown.