From 02918af5125f1b5bf3cc0d0f9f72a20feb9547ea Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 22 Feb 2024 13:24:21 +0100 Subject: [PATCH 1/2] MOBILE-4350 quiz: Disable unanswered warning in sequential navigation --- src/addons/mod/quiz/pages/player/player.ts | 2 +- src/addons/mod/quiz/tests/behat/quiz_navigation.feature | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/addons/mod/quiz/pages/player/player.ts b/src/addons/mod/quiz/pages/player/player.ts index 2fdc9e1b4..4d2b44c8f 100644 --- a/src/addons/mod/quiz/pages/player/player.ts +++ b/src/addons/mod/quiz/pages/player/player.ts @@ -412,7 +412,7 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave { .filter(question => AddonModQuiz.isQuestionUnanswered(question)) .length; - if (unansweredCount > 0) { + if (!this.isSequential && unansweredCount > 0) { const warning = Translate.instant( 'addon.mod_quiz.submission_confirmation_unanswered', { $a: unansweredCount }, diff --git a/src/addons/mod/quiz/tests/behat/quiz_navigation.feature b/src/addons/mod/quiz/tests/behat/quiz_navigation.feature index 215885128..f4d437147 100644 --- a/src/addons/mod/quiz/tests/behat/quiz_navigation.feature +++ b/src/addons/mod/quiz/tests/behat/quiz_navigation.feature @@ -133,7 +133,10 @@ Feature: Navigate through a quiz in the app And I should find "Not yet answered" within "3" "ion-item" in the app When I press "Submit all and finish" in the app - And I press "Submit" near "Once you submit" in the app + Then I should find "Once you submit" in the app + But I should not find "Questions without a response" in the app + + When I press "Submit" near "Once you submit" in the app Then I should find "Review" in the app And I should find "Text of the first question" in the app And I should find "Text of the second question" in the app From df5bbf33bc6498a6679d957b0b1030be24c05445 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 22 Feb 2024 13:24:57 +0100 Subject: [PATCH 2/2] MOBILE-4350 quiz: Fix disabled clicks in summaries --- src/addons/mod/quiz/pages/player/player.html | 2 +- src/addons/mod/quiz/tests/behat/quiz_navigation.feature | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/addons/mod/quiz/pages/player/player.html b/src/addons/mod/quiz/pages/player/player.html index c0df031f7..aef418478 100644 --- a/src/addons/mod/quiz/pages/player/player.html +++ b/src/addons/mod/quiz/pages/player/player.html @@ -104,7 +104,7 @@ diff --git a/src/addons/mod/quiz/tests/behat/quiz_navigation.feature b/src/addons/mod/quiz/tests/behat/quiz_navigation.feature index f4d437147..a4b942375 100644 --- a/src/addons/mod/quiz/tests/behat/quiz_navigation.feature +++ b/src/addons/mod/quiz/tests/behat/quiz_navigation.feature @@ -132,6 +132,9 @@ Feature: Navigate through a quiz in the app And I should find "Not yet answered" within "2" "ion-item" in the app And I should find "Not yet answered" within "3" "ion-item" in the app + When I press "Not yet answered" within "3" "ion-item" in the app + Then I should not find "Text of the third question" in the app + When I press "Submit all and finish" in the app Then I should find "Once you submit" in the app But I should not find "Questions without a response" in the app