MOBILE-2817 lesson: Remove continue button if not needed

main
Dani Palou 2019-04-18 12:47:01 +02:00
parent 265f4a40f4
commit 3ec25faf65
1 changed files with 9 additions and 4 deletions

View File

@ -570,10 +570,15 @@ export class AddonModLessonPlayerPage implements OnInit, OnDestroy {
// Button to continue. // Button to continue.
if (this.lesson.review && !result.correctanswer && !result.noanswer && !result.isessayquestion && if (this.lesson.review && !result.correctanswer && !result.noanswer && !result.isessayquestion &&
!result.maxattemptsreached) { !result.maxattemptsreached) {
this.processData.buttons.push({ /* If both the "Yes, I'd like to try again" and "No, I just want to go on to the next question" point to the
label: 'addon.mod_lesson.reviewquestioncontinue', same page then don't show the "No, I just want to go on to the next question" button. It's confusing. */
pageId: result.newpageid if (this.pageData.page.id != result.newpageid) {
}); // Button to continue the lesson (the page to go is configured by the teacher).
this.processData.buttons.push({
label: 'addon.mod_lesson.reviewquestioncontinue',
pageId: result.newpageid
});
}
} else { } else {
this.processData.buttons.push({ this.processData.buttons.push({
label: 'addon.mod_lesson.continue', label: 'addon.mod_lesson.continue',