Commit 259e6e46 by Ibrahim Awwal

Fix discussion module

It worked in Chrome because Chrome appears to magically infer some missing
arguments to methods. This is the second time this happened, should be more
careful about it in the future, because it causes confusion when features
work for some students but not others.
parent 19bd60e9
......@@ -56,12 +56,12 @@ if Backbone?
url: url
type: "GET"
dataType: 'json'
success: (response, textStatus, jqXHR) => @renderDiscussion(event, response, textStatus, discussionId)
success: (response, textStatus, jqXHR) => @renderDiscussion($elem, response, textStatus, discussionId)
renderDiscussion: (event, response, textStatus, discussionId) =>
renderDiscussion: ($elem, response, textStatus, discussionId) =>
window.user = new DiscussionUser(response.user_info)
Content.loadContentInfos(response.annotated_content_info)
$(event.target).html("Hide Discussion")
$elem.html("Hide Discussion")
@discussion = new Discussion()
@discussion.reset(response.discussion_data, {silent: false})
$discussion = $(Mustache.render $("script#_inline_discussion").html(), {'threads':response.discussion_data, 'discussionId': discussionId})
......
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