Skip to content

Commit b6278e7

Browse files
committed
MOBILE-4350 quiz: Allow navigating from sequential summary
This is consistent with the LMS which has a "return to attempt" button. It also fixes the behaviour that users would expect, given that the buttons in the side navigation for the current page are not disabled in the summary.
1 parent 41f2b36 commit b6278e7

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)