Open kdmccormick opened 6 months ago
Should parent-child relationships still exist at/below the Vertical block?
Other than the "structural" XBlocks (course, sequential, vertical/unit, etc.), the only blocks I know of with has_children
are:
ConditionalBlock
(built-in)SplitTestBlock
(built-in, for A/B testing)LibraryContentBlock
(built-in, may be renamed to Problem Bank or Item Pool Block)has_children
, we'd need to figure out a path forward for courses that use Problem Builder, but that's been known for a while so needn't be a blocker here, just something to solve at the same time.For the other three (conditional, split, LCB), I think they're going to be a blocker for now until we have some kind of Outline concept that can unify and replace them. But what I'd love to do is put in a restriction so that only those three blocks can have children, and attempting to do it for other blocks will raise an error. That way we can prevent people from introducing new dependencies on has_children.
This would be a long-term initiative. It probably belongs on the platform-roadmap.
Context
We have decided that parent-child relationships should only exist at/below the VerticalBlock: https://github.com/openedx/edx-platform/blob/master/docs/decisions/0006-role-of-xblock.rst
We have further discussed that parent-child relationships in their entirety should be removed; I'm not sure if we came to a consensus on that.
TODO -- Add more context ( @ormsbee , @kdmccormick , and @bradenmacdonald ).
Tasks
Off the top of my head...
XBlock.has_children
a read-only class property. Some details.get_parent
is called at or above the VerticalBlock level.