Commit 2881bac3 by Awais Jibran Committed by GitHub

Merge pull request #14623 from edx/aj/fix-edit-discussions

Fix discussion Edit post.
parents dca22ff2 0f1ec82e
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
Content.loadContentInfos(response.annotated_content_info); Content.loadContentInfos(response.annotated_content_info);
DiscussionUtil.loadRoles(response.roles); DiscussionUtil.loadRoles(response.roles);
this.course_settings = new DiscussionCourseSettings(response.course_settings); this.courseSettings = new DiscussionCourseSettings(response.course_settings);
this.discussion = new Discussion(undefined, {pages: response.num_pages}); this.discussion = new Discussion(undefined, {pages: response.num_pages});
this.discussion.reset(response.discussion_data, { this.discussion.reset(response.discussion_data, {
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
this.threadListView = new DiscussionThreadListView({ this.threadListView = new DiscussionThreadListView({
el: this.$('.inline-threads'), el: this.$('.inline-threads'),
collection: self.discussion, collection: self.discussion,
courseSettings: self.course_settings courseSettings: self.courseSettings
}); });
this.threadListView.render(); this.threadListView.render();
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
this.newPostView = new NewPostView({ this.newPostView = new NewPostView({
el: this.newPostForm, el: this.newPostForm,
collection: this.discussion, collection: this.discussion,
course_settings: this.course_settings, course_settings: this.courseSettings,
topicId: discussionId, topicId: discussionId,
is_commentable_cohorted: response.is_commentable_cohorted is_commentable_cohorted: response.is_commentable_cohorted
}); });
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
el: this.$('.forum-content'), el: this.$('.forum-content'),
model: thread, model: thread,
mode: 'inline', mode: 'inline',
course_settings: this.course_settings courseSettings: this.courseSettings
}); });
this.threadView.render(); this.threadView.render();
this.listenTo(this.threadView.showView, 'thread:_delete', this.navigateToAllPosts); this.listenTo(this.threadView.showView, 'thread:_delete', this.navigateToAllPosts);
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
mode: this.mode, mode: this.mode,
model: this.model, model: this.model,
el: this.el, el: this.el,
course_settings: this.options.course_settings, courseSettings: this.options.courseSettings,
topicId: this.topicId topicId: this.topicId
}); });
return this.render(); return this.render();
...@@ -396,7 +396,7 @@ ...@@ -396,7 +396,7 @@
model: this.model, model: this.model,
mode: this.mode, mode: this.mode,
context: this.context, context: this.context,
course_settings: this.options.course_settings course_settings: this.options.courseSettings
}); });
this.editView.bind('thread:updated thread:cancel_edit', this.closeEditView); this.editView.bind('thread:updated thread:cancel_edit', this.closeEditView);
return this.editView.bind('comment:endorse', this.endorseThread); return this.editView.bind('comment:endorse', this.endorseThread);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment