Make the team discussion thread private
Develop the capability to allow instructors to designate teams to have private discussions. This way, so non-teammembers cannot view discussion. And the intend is for course teams to manage the team membership as well. MST-10
This commit is contained in:
committed by
Simon Chen
parent
855346e9e1
commit
cd3bc236eb
@@ -176,9 +176,15 @@
|
||||
this.threadListView.$('.is-active').focus();
|
||||
},
|
||||
|
||||
hideDiscussion: function() {
|
||||
this.$('section.discussion').addClass('is-hidden');
|
||||
this.toggleDiscussionBtn.removeClass('shown');
|
||||
this.toggleDiscussionBtn.find('.button-text').text(gettext('Show Discussion'));
|
||||
this.showed = false;
|
||||
},
|
||||
|
||||
toggleDiscussion: function() {
|
||||
var self = this;
|
||||
|
||||
if (this.showed) {
|
||||
this.hideDiscussion();
|
||||
} else {
|
||||
@@ -188,25 +194,27 @@
|
||||
this.$('section.discussion').removeClass('is-hidden');
|
||||
this.showed = true;
|
||||
} else {
|
||||
this.loadDiscussions(this.$el, function() {
|
||||
self.hideDiscussion();
|
||||
DiscussionUtil.discussionAlert(
|
||||
gettext('Error'),
|
||||
gettext('This discussion could not be loaded. Refresh the page and try again.')
|
||||
);
|
||||
this.loadDiscussions(this.$el, function(request) {
|
||||
if (request.status === 403 && request.responseText) {
|
||||
DiscussionUtil.discussionAlert(
|
||||
gettext('Warning'),
|
||||
request.responseText
|
||||
);
|
||||
self.$el.text(request.responseText);
|
||||
self.showed = true;
|
||||
} else {
|
||||
self.hideDiscussion();
|
||||
DiscussionUtil.discussionAlert(
|
||||
gettext('Error'),
|
||||
gettext('This discussion could not be loaded. Refresh the page and try again.')
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.toggleDiscussionBtn.focus();
|
||||
},
|
||||
|
||||
hideDiscussion: function() {
|
||||
this.$('section.discussion').addClass('is-hidden');
|
||||
this.toggleDiscussionBtn.removeClass('shown');
|
||||
this.toggleDiscussionBtn.find('.button-text').text(gettext('Show Discussion'));
|
||||
this.showed = false;
|
||||
},
|
||||
|
||||
toggleNewPost: function(event) {
|
||||
event.preventDefault();
|
||||
if (!this.newPostForm) {
|
||||
|
||||
Reference in New Issue
Block a user