diff --git a/scripts/langindex.json b/scripts/langindex.json index b245d6a4e..70cc0b1cc 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -657,6 +657,7 @@ "addon.mod_forum.posttoforum": "forum", "addon.mod_forum.posttomygroups": "forum", "addon.mod_forum.privatereply": "forum", + "addon.mod_forum.qandanotify": "forum", "addon.mod_forum.re": "forum", "addon.mod_forum.refreshposts": "local_moodlemobileapp", "addon.mod_forum.removefromfavourites": "forum", diff --git a/src/addons/mod/forum/components/index/index.html b/src/addons/mod/forum/components/index/index.html index 34c075f39..724c2e70d 100644 --- a/src/addons/mod/forum/components/index/index.html +++ b/src/addons/mod/forum/components/index/index.html @@ -31,6 +31,14 @@ + + + + + {{ 'addon.mod_forum.qandanotify' | translate }} + + + diff --git a/src/addons/mod/forum/components/index/index.ts b/src/addons/mod/forum/components/index/index.ts index db1c36d17..7686059b6 100644 --- a/src/addons/mod/forum/components/index/index.ts +++ b/src/addons/mod/forum/components/index/index.ts @@ -85,6 +85,7 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom sortOrders: AddonModForumSortOrder[] = []; canPin = false; hasOfflineRatings = false; + showQAMessage = false; sortOrderSelectorModalOptions: ModalOptions = { component: AddonModForumSortOrderSelectorComponent, }; @@ -404,6 +405,7 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom const cutoffDateReached = AddonModForumHelper.isCutoffDateReached(forum) && !accessInfo.cancanoverridecutoff; this.canAddDiscussion = !!forum.cancreatediscussions && !cutoffDateReached; + this.showQAMessage = forum.type === 'qanda' && !accessInfo.canviewqandawithoutposting; return; }), diff --git a/src/addons/mod/forum/lang.json b/src/addons/mod/forum/lang.json index 86e48abf7..1c30bcf6a 100644 --- a/src/addons/mod/forum/lang.json +++ b/src/addons/mod/forum/lang.json @@ -49,6 +49,7 @@ "posttoforum": "Post to forum", "posttomygroups": "Post a copy to all groups", "privatereply": "Reply privately", + "qandanotify": "This is a question and answer forum. In order to see other responses to these questions, you must first post your answer", "re": "Re:", "refreshposts": "Refresh posts", "removefromfavourites": "Unstar this discussion", diff --git a/src/addons/mod/forum/pages/discussion/discussion.html b/src/addons/mod/forum/pages/discussion/discussion.html index 44a517136..1c5b8d781 100644 --- a/src/addons/mod/forum/pages/discussion/discussion.html +++ b/src/addons/mod/forum/pages/discussion/discussion.html @@ -84,6 +84,14 @@ + + + + + {{ 'addon.mod_forum.qandanotify' | translate }} + + +
post.author.id === currentUserId); + return; }), );