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.
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user