Fixed discussion module get_course.

TNL-3237
This commit is contained in:
Waheed Ahmed
2015-09-10 21:30:12 +05:00
parent 4234ff5959
commit 18411cd480
2 changed files with 69 additions and 6 deletions

View File

@@ -97,13 +97,10 @@ class DiscussionModule(DiscussionFields, XModule):
def get_course(self):
"""
Return the CourseDescriptor at the root of the tree we're in.
Return CourseDescriptor by course id.
"""
block = self
while block.parent:
block = block.get_parent()
return block
course = self.runtime.modulestore.get_course(self.course_id)
return course
class DiscussionDescriptor(DiscussionFields, MetadataOnlyEditingDescriptor, RawDescriptor):