MOBILE-4350 quiz: Fix submit navigation button
parent
f68a9b10fe
commit
c53db7f546
|
@ -44,7 +44,7 @@
|
||||||
</ion-content>
|
</ion-content>
|
||||||
<ion-footer *ngIf="!isReview">
|
<ion-footer *ngIf="!isReview">
|
||||||
<!-- In player, show button to finish attempt. -->
|
<!-- In player, show button to finish attempt. -->
|
||||||
<ion-button class="ion-text-wrap ion-margin" expand="block" (click)="loadPage(-1)">
|
<ion-button class="ion-text-wrap ion-margin" expand="block" (click)="loadPage(-1)" [disabled]="isSequential && nextPage !== -1">
|
||||||
{{ 'addon.mod_quiz.finishattemptdots' | translate }}
|
{{ 'addon.mod_quiz.finishattemptdots' | translate }}
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-footer>
|
</ion-footer>
|
||||||
|
|
|
@ -28,6 +28,7 @@ export class AddonModQuizNavigationModalComponent {
|
||||||
|
|
||||||
@Input() navigation?: AddonModQuizNavigationQuestion[]; // Whether the user is reviewing the attempt.
|
@Input() navigation?: AddonModQuizNavigationQuestion[]; // Whether the user is reviewing the attempt.
|
||||||
@Input() summaryShown?: boolean; // Whether summary is currently being shown.
|
@Input() summaryShown?: boolean; // Whether summary is currently being shown.
|
||||||
|
@Input() nextPage?: number; // Next page.
|
||||||
@Input() currentPage?: number; // Current page.
|
@Input() currentPage?: number; // Current page.
|
||||||
@Input() isReview?: boolean; // Whether the user is reviewing the attempt.
|
@Input() isReview?: boolean; // Whether the user is reviewing the attempt.
|
||||||
@Input() isSequential?: boolean; // Whether quiz navigation is sequential.
|
@Input() isSequential?: boolean; // Whether quiz navigation is sequential.
|
||||||
|
|
|
@ -273,7 +273,7 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave {
|
||||||
return;
|
return;
|
||||||
} else if (
|
} else if (
|
||||||
(page == this.attempt.currentpage && !this.showSummary) ||
|
(page == this.attempt.currentpage && !this.showSummary) ||
|
||||||
(fromModal && this.isSequential && page != this.attempt.currentpage)
|
(fromModal && this.isSequential && page != this.attempt.currentpage && page !== this.nextPage)
|
||||||
) {
|
) {
|
||||||
// If the user is navigating to the current page we do nothing.
|
// If the user is navigating to the current page we do nothing.
|
||||||
// Also, in sequential quizzes we can only navigate to the current page.
|
// Also, in sequential quizzes we can only navigate to the current page.
|
||||||
|
@ -733,6 +733,7 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave {
|
||||||
navigation: this.navigation,
|
navigation: this.navigation,
|
||||||
summaryShown: this.showSummary,
|
summaryShown: this.showSummary,
|
||||||
currentPage: this.attempt?.currentpage,
|
currentPage: this.attempt?.currentpage,
|
||||||
|
nextPage: this.nextPage,
|
||||||
isReview: false,
|
isReview: false,
|
||||||
isSequential: this.isSequential,
|
isSequential: this.isSequential,
|
||||||
},
|
},
|
||||||
|
|
|
@ -344,6 +344,7 @@ export class AddonModQuizReviewPage implements OnInit {
|
||||||
navigation: this.navigation,
|
navigation: this.navigation,
|
||||||
summaryShown: false,
|
summaryShown: false,
|
||||||
currentPage: this.attempt?.currentpage,
|
currentPage: this.attempt?.currentpage,
|
||||||
|
nextPage: this.nextPage,
|
||||||
isReview: true,
|
isReview: true,
|
||||||
isSequential: this.quiz && AddonModQuiz.isNavigationSequential(this.quiz),
|
isSequential: this.quiz && AddonModQuiz.isNavigationSequential(this.quiz),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue