Skip to content

Commit 5409baa

Browse files
authored
feat: include upstream_info for all xblocks including sections and subsections (#37041)
1 parent a7a7a5b commit 5409baa

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

cms/djangoapps/contentstore/xblock_storage_handlers/view_handlers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,13 +1303,12 @@ def create_xblock_info( # lint-amnesty, pylint: disable=too-many-statements
13031303

13041304
# Update with gating info
13051305
xblock_info.update(_get_gating_info(course, xblock))
1306+
# Also add upstream info
1307+
xblock_info["upstream_info"] = UpstreamLink.try_get_for_block(xblock, log_error=False).to_json()
13061308
if is_xblock_unit:
13071309
# if xblock is a Unit we add the discussion_enabled option
13081310
xblock_info["discussion_enabled"] = xblock.discussion_enabled
13091311

1310-
# Also add upstream info
1311-
xblock_info["upstream_info"] = UpstreamLink.try_get_for_block(xblock, log_error=False).to_json()
1312-
13131312
if xblock.category == "sequential":
13141313
# Entrance exam subsection should be hidden. in_entrance_exam is
13151314
# inherited metadata, all children will have it.

0 commit comments

Comments
 (0)