Skip to content

Commit

Permalink
Merge pull request #3948 from NoelDeMartin/MOBILE-4350
Browse files Browse the repository at this point in the history
MOBILE-4350 quiz: Allow navigating from sequential summary
  • Loading branch information
dpalou authored Feb 29, 2024
2 parents 41f2b36 + b6278e7 commit 5d3e8db
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/addons/mod/quiz/pages/player/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,12 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave {
await this.scrollToQuestion(slot);

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.
// 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;
} else if (page === -1 && this.showSummary) {
// Summary already shown.
Expand Down

0 comments on commit 5d3e8db

Please sign in to comment.