diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index e3c67ee0db..2593bbbbca 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -312,8 +312,10 @@ def container_handler(request, tag=None, package_id=None, branch=None, version_g ancestor_xblocks = [] parent = get_parent_xblock(xblock) + unit = None while parent and parent.category != 'sequential': ancestor_xblocks.append(parent) + unit = parent parent = get_parent_xblock(parent) ancestor_xblocks.reverse() @@ -322,6 +324,7 @@ def container_handler(request, tag=None, package_id=None, branch=None, version_g 'context_course': course, 'xblock': xblock, 'xblock_locator': locator, + 'unit': unit, 'ancestor_xblocks': ancestor_xblocks, }) else: diff --git a/cms/templates/container.html b/cms/templates/container.html index 83855250ed..bd055d37e3 100644 --- a/cms/templates/container.html +++ b/cms/templates/container.html @@ -79,6 +79,15 @@ xblock_info = {