diff --git a/src/addon/mod/assign/feedback/comments/providers/handler.ts b/src/addon/mod/assign/feedback/comments/providers/handler.ts index 559f00029..6898521e6 100644 --- a/src/addon/mod/assign/feedback/comments/providers/handler.ts +++ b/src/addon/mod/assign/feedback/comments/providers/handler.ts @@ -183,6 +183,9 @@ export class AddonModAssignFeedbackCommentsHandler implements AddonModAssignFeed * @return True or promise resolved with true if enabled. */ isEnabled(): boolean | Promise { + // In here we should check if comments is not disabled in site. + // But due to this is not a common comments place and it can be disabled separately into Moodle (disabling the plugin). + // We are leaving it always enabled. It's also a teacher's feature. return true; } diff --git a/src/addon/mod/glossary/pages/entry/entry.ts b/src/addon/mod/glossary/pages/entry/entry.ts index dc11406ec..d1e22e722 100644 --- a/src/addon/mod/glossary/pages/entry/entry.ts +++ b/src/addon/mod/glossary/pages/entry/entry.ts @@ -81,8 +81,8 @@ export class AddonModGlossaryEntryPage { if (this.glossary && this.glossary.allowcomments && this.entry && this.entry.id > 0 && this.commentsEnabled && this.comments) { // Refresh comments. Don't add it to promises because we don't want the comments fetch to block the entry fetch. - this.comments.doRefresh().catch(() => { - // Ignore errors. + this.comments.doRefresh().catch(() => { + // Ignore errors. }); } diff --git a/src/core/comments/components/comments/comments.ts b/src/core/comments/components/comments/comments.ts index e5c9d701b..9f8408442 100644 --- a/src/core/comments/components/comments/comments.ts +++ b/src/core/comments/components/comments/comments.ts @@ -83,13 +83,11 @@ export class CoreCommentsCommentsComponent implements OnChanges, OnDestroy { // Refresh comments count if event received. this.commentsCountObserver = eventsProvider.on(CoreCommentsProvider.COMMENTS_COUNT_CHANGED_EVENT, (data) => { // Verify these comments need to be updated. - if (this.undefinedOrEqual(data, 'contextLevel') && this.undefinedOrEqual(data, 'instanceId') && - this.undefinedOrEqual(data, 'component') && this.undefinedOrEqual(data, 'itemId') && - this.undefinedOrEqual(data, 'area') && !this.countError) { - if (!this.commentsCount.endsWith('+')) { - // Parse and unparse string. - this.commentsCount = parseInt(this.commentsCount, 10) + data.countChange + ''; - } + if (!this.commentsCount.endsWith('+') && this.undefinedOrEqual(data, 'contextLevel') && + this.undefinedOrEqual(data, 'instanceId') && this.undefinedOrEqual(data, 'component') && + this.undefinedOrEqual(data, 'itemId') && this.undefinedOrEqual(data, 'area') && !this.countError) { + // Parse and unparse string. + this.commentsCount = parseInt(this.commentsCount, 10) + data.countChange + ''; } }, sitesProvider.getCurrentSiteId()); }