diff --git a/openedx/core/djangoapps/xblock/runtime/learning_core_runtime.py b/openedx/core/djangoapps/xblock/runtime/learning_core_runtime.py index 9715231a64bd..0942a5a8b3c7 100644 --- a/openedx/core/djangoapps/xblock/runtime/learning_core_runtime.py +++ b/openedx/core/djangoapps/xblock/runtime/learning_core_runtime.py @@ -331,6 +331,12 @@ def _get_component_from_usage_key(self, usage_key): return component def _get_component_version_from_block(self, block): + """ + Given an XBlock instance, return the Learning Core ComponentVersion. + + This relies on our runtime setting the _runtime_requested_version + attribute on blocks that it fetches. + """ usage_key = block.usage_key component = self._get_component_from_usage_key(usage_key) @@ -345,6 +351,12 @@ def _get_component_version_from_block(self, block): return component_version def _absolute_url_for_asset(self, component_version, asset_path): + """ + The full URL for a specific library asset in a ComponentVersion. + + This does not check for whether the path actually exists–it just returns + where it would be if it did exist. + """ # This function should return absolute URLs, so we need the site root. site_root_url = get_xblock_app_config().get_site_root_url()