Commit 22e4fb30 by Calen Pennington

Merge pull request #8987 from edx/ormsbee/inline_discussion_ccx_perf_hotfix

Ormsbee/inline discussion ccx perf hotfix
parents a9c4774f 69390152
...@@ -66,9 +66,13 @@ class DiscussionModule(DiscussionFields, XModule): ...@@ -66,9 +66,13 @@ class DiscussionModule(DiscussionFields, XModule):
def get_course(self): def get_course(self):
""" """
Return course by course id. Return the CourseDescriptor at the root of the tree we're in.
""" """
return self.descriptor.runtime.modulestore.get_course(self.course_id) block = self
while block.parent:
block = block.get_parent()
return block
class DiscussionDescriptor(DiscussionFields, MetadataOnlyEditingDescriptor, RawDescriptor): class DiscussionDescriptor(DiscussionFields, MetadataOnlyEditingDescriptor, RawDescriptor):
......
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