refactor: remove get_displayable_items and displayable_items from XModule
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user