MOBILE-3039 book: Fix check automatic completion
parent
af53d44c03
commit
1a01d7da33
|
@ -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.
|
// 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(() => {
|
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.
|
// 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);
|
this.courseProvider.checkModuleCompletion(this.courseId, this.module.completiondata);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|
|
@ -342,7 +342,7 @@ export class AddonModForumDiscussionPage implements OnDestroy {
|
||||||
this.accessInfo = {};
|
this.accessInfo = {};
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.defaultSubject = this.translate.instant('addon.mod_forum.re') + ' ' +
|
this.defaultSubject = this.translate.instant('addon.mod_forum.re') + ' ' +
|
||||||
(this.discussion ? this.discussion.subject : "");
|
(this.discussion ? this.discussion.subject : '');
|
||||||
this.replyData.subject = this.defaultSubject;
|
this.replyData.subject = this.defaultSubject;
|
||||||
|
|
||||||
const startingPost = this.forumProvider.extractStartingPost(posts);
|
const startingPost = this.forumProvider.extractStartingPost(posts);
|
||||||
|
|
Loading…
Reference in New Issue