refactor: remove get_displayable_items and displayable_items from XModule

This commit is contained in:
Arunmozhi
2022-12-15 11:25:35 +05:30
committed by Agrendalath
parent 59d8b5d286
commit 7c621e6ad2
2 changed files with 0 additions and 29 deletions

View File

@@ -394,21 +394,3 @@ class XBlockShim:
student when the module is created. This is deprecated and discouraged.
"""
return False
def get_display_blocks(self):
"""
Returns a list of descendent XBlock instances that will display
immediately inside this module.
"""
warnings.warn("get_display_blocks() is deprecated.", DeprecationWarning, stacklevel=2)
blocks = []
for child in self.get_children():
blocks.append(child)
return blocks
def displayable_items(self):
"""
Returns list of displayable modules contained by this XBlock. If this
module is visible, should return [self].
"""
return [self]

View File

@@ -524,17 +524,6 @@ class XModuleMixin(XModuleFields, XBlock):
not children of this module"""
return []
def get_display_blocks(self):
"""
Returns a list of descendent module instances that will display
immediately inside this module.
"""
blocks = []
for child in self.get_children():
blocks.append(child)
return blocks
def get_child_by(self, selector):
"""
Return a child XBlock that matches the specified selector