diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3322ecd..f916645 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,9 @@ Change Log Unreleased ~~~~~~~~~~ +[4.2.1]- 2023-04-26 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* Support ``get_child_blocks`` along with ``get_child_descriptors``. * Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is deprecated diff --git a/completion/__init__.py b/completion/__init__.py index d0efb25..00d812e 100644 --- a/completion/__init__.py +++ b/completion/__init__.py @@ -2,6 +2,6 @@ Completion App """ -__version__ = '4.2.0' +__version__ = '4.2.1' default_app_config = 'completion.apps.CompletionAppConfig' # pylint: disable=invalid-name diff --git a/completion/services.py b/completion/services.py index 13e051a..14174e2 100644 --- a/completion/services.py +++ b/completion/services.py @@ -93,7 +93,9 @@ def get_completable_children(self, node): user_children = [] mode = XBlockCompletionMode.get_mode(node) if mode == XBlockCompletionMode.AGGREGATOR: + # TODO: `get_child_descriptors` will be renamed to `get_child_blocks` in the Redwood release. node_children = ((hasattr(node, 'get_child_descriptors') and node.get_child_descriptors()) + or (hasattr(node, 'get_child_blocks') and node.get_child_blocks()) or (hasattr(node, 'get_children') and node.get_children())) for child in node_children: user_children.extend(self.get_completable_children(child))