Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Refactor or deprecate parent-child relationships between XBlocks

オープン
#729 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

@kdmccormick がすでに取り組んでいます。

2025年11月10日 から。

評価

この issue はまだ評価されていません。

説明

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...

  • File a DEPR encompassing our plan to:
    • Remove parent-child relationships on the base XBlock class. Delete the _HasChildrenMetaclass. Move all parent-child logic to a new subclass, XBlockWithChildren. Make it XBlock.has_children a read-only class property. Some details.
    • Raise an exception if get_parent is called at or above the VerticalBlock level.
    • For all XBlockWithChildren subclasses above the VerticalBlock (so, CourseBlock, SectionBlock, and SequenceBlock): Move their implementations to either Learning Core or edx-platform djangoapps.
  • Decide: Should parent-child relationships still exist at/below the Vertical block?
    • Either way -> ADR it.
    • Yes -> We're done.
    • No -> File another DEPR encompassing our plan to:
      • Raise deprecation warnings on the XBlockWithChildren class.
      • For all remaining XBlockWithChildren subclasses in edx-platform (eg, LibraryContentBlock, SplitTestBlock):
        Move their implementations to either Learning Core or edx-platform djangoapps.
      • Write guidance on how custom XBlockWithChildren subclasses can be similarly migrated. Ensure that, for example, OpenCraft's ProblemBuilder block can be migrated using this guide.
      • Delete the XBlockWithChildren class, and delete all parent-child logic from the XBlock repository.
      • Delete all parent-child logic from modulestore and edx-platform's XBlock runtimes.
主要言語
Python
スター
470
フォーク
231
平均マージ
2日 14時間
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openedx/XBlock のほかの issue

openedx/XBlock の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。