Skip to content

Commit 55b1b52

Browse files
authored
Merge pull request #3940 from NoelDeMartin/MOBILE-4350
MOBILE-4350: Fix sequential navigation summary
2 parents 9a8c80d + df5bbf3 commit 55b1b52

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ <h2 *ngIf="question.type === 'description' || !question.questionnumber" class="i
104104
<!-- List of questions of the summary table. -->
105105
<ng-container *ngFor="let question of summaryQuestions">
106106
<ion-item *ngIf="question.type !== 'description' && question.questionnumber"
107-
(click)="changePage(question.page, false, question.slot)"
107+
(click)="!isSequential && canReturn && changePage(question.page, false, question.slot)"
108108
[attr.aria-label]="'core.question.questionno' | translate:{$a: question.questionnumber}"
109109
[detail]="!isSequential && canReturn" [button]="!isSequential && canReturn">
110110
<ion-label>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave {
412412
.filter(question => AddonModQuiz.isQuestionUnanswered(question))
413413
.length;
414414

415-
if (unansweredCount > 0) {
415+
if (!this.isSequential && unansweredCount > 0) {
416416
const warning = Translate.instant(
417417
'addon.mod_quiz.submission_confirmation_unanswered',
418418
{ $a: unansweredCount },

src/addons/mod/quiz/tests/behat/quiz_navigation.feature

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,14 @@ Feature: Navigate through a quiz in the app
132132
And I should find "Not yet answered" within "2" "ion-item" in the app
133133
And I should find "Not yet answered" within "3" "ion-item" in the app
134134

135+
When I press "Not yet answered" within "3" "ion-item" in the app
136+
Then I should not find "Text of the third question" in the app
137+
135138
When I press "Submit all and finish" in the app
136-
And I press "Submit" near "Once you submit" in the app
139+
Then I should find "Once you submit" in the app
140+
But I should not find "Questions without a response" in the app
141+
142+
When I press "Submit" near "Once you submit" in the app
137143
Then I should find "Review" in the app
138144
And I should find "Text of the first question" in the app
139145
And I should find "Text of the second question" in the app

0 commit comments

Comments
 (0)