Skip to content

Commit 5d3e8db

Browse files
authored
Merge pull request #3948 from NoelDeMartin/MOBILE-4350
MOBILE-4350 quiz: Allow navigating from sequential summary
2 parents 41f2b36 + b6278e7 commit 5d3e8db

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/addons/mod/quiz/pages/player/player.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,12 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave {
271271
await this.scrollToQuestion(slot);
272272

273273
return;
274-
} else if ((page == this.attempt.currentpage && !this.showSummary) || (fromModal && this.isSequential && page != -1)) {
274+
} else if (
275+
(page == this.attempt.currentpage && !this.showSummary) ||
276+
(fromModal && this.isSequential && page != this.attempt.currentpage)
277+
) {
275278
// If the user is navigating to the current page we do nothing.
276-
// Also, in sequential quizzes we don't allow navigating using the modal except for finishing the quiz (summary).
279+
// Also, in sequential quizzes we can only navigate to the current page.
277280
return;
278281
} else if (page === -1 && this.showSummary) {
279282
// Summary already shown.

0 commit comments

Comments
 (0)