MOBILE-3039 book: Fix check automatic completion

main
Dani Palou 2019-05-29 13:14:09 +02:00
parent af53d44c03
commit 1a01d7da33
2 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ export class AddonModBookIndexComponent extends CoreCourseModuleMainResourceComp
// Chapter loaded, log view. We don't return the promise because we don't want to block the user for this.
this.bookProvider.logView(this.module.instance, chapterId, this.module.name).then(() => {
// Module is completed when last chapter is viewed, so we only check completion if the last is reached.
if (!this.nextChapter) {
if (this.nextChapter == '0') {
this.courseProvider.checkModuleCompletion(this.courseId, this.module.completiondata);
}
}).catch(() => {

View File

@ -342,7 +342,7 @@ export class AddonModForumDiscussionPage implements OnDestroy {
this.accessInfo = {};
}).then(() => {
this.defaultSubject = this.translate.instant('addon.mod_forum.re') + ' ' +
(this.discussion ? this.discussion.subject : "");
(this.discussion ? this.discussion.subject : '');
this.replyData.subject = this.defaultSubject;
const startingPost = this.forumProvider.extractStartingPost(posts);