7474@dataclass (frozen = True )
7575class ContainerEntityListEntry :
7676 """
77- [ ❓TODO: STABLE or UNSTABLE? ]
7877 Data about a single entity in a container, e.g. a component in a unit.
7978 """
8079
@@ -143,7 +142,6 @@ def create_container(
143142 can_stand_alone : bool = True ,
144143) -> ContainerModel :
145144 """
146- [ ❓TODO: STABLE or UNSTABLE? ]
147145 Create a new container.
148146
149147 Args:
@@ -183,7 +181,6 @@ def create_container(
183181
184182def create_entity_list () -> EntityList :
185183 """
186- [ ❓TODO: STABLE or UNSTABLE? ]
187184 Create a new entity list. This is an structure that holds a list of entities
188185 that will be referenced by the container.
189186
@@ -199,7 +196,6 @@ def create_entity_list_with_rows(
199196 learning_package_id : LearningPackage .ID | None ,
200197) -> EntityList :
201198 """
202- [ ❓TODO: STABLE or UNSTABLE? ]
203199 Create new entity list rows for an entity list.
204200
205201 Args:
@@ -305,7 +301,6 @@ def create_container_version(
305301 created_by : int | None ,
306302) -> ContainerVersion :
307303 """
308- [ ❓TODO: STABLE or UNSTABLE? ]
309304 Create a new container version.
310305
311306 Args:
@@ -355,7 +350,6 @@ def create_container_and_version(
355350 can_stand_alone : bool = True ,
356351) -> tuple [ContainerModel , ContainerVersionModel ]:
357352 """
358- [ ❓TODO: STABLE or UNSTABLE? ] Create a new container and its initial version.
359353
360354 Args:
361355 learning_package_id: The learning package ID.
@@ -470,7 +464,6 @@ def create_next_container_version(
470464 force_version_num : int | None = None ,
471465) -> ContainerVersion :
472466 """
473- [ ❓TODO: STABLE or UNSTABLE? ]
474467 Create the next version of a container. A new version of the container is created
475468 only when its metadata changes:
476469
@@ -543,7 +536,6 @@ def create_next_container_version(
543536
544537def get_container (pk : Container .ID ) -> Container :
545538 """
546- [ ❓TODO: STABLE or UNSTABLE? ]
547539 Get a container by its primary key.
548540
549541 This returns the Container, not any specific version. It may not be published, or may have been soft deleted.
@@ -559,7 +551,6 @@ def get_container(pk: Container.ID) -> Container:
559551
560552def get_container_version (container_version_pk : int ) -> ContainerVersion :
561553 """
562- [ ❓TODO: STABLE or UNSTABLE? ]
563554 Get a container version by its primary key.
564555
565556 Args:
@@ -573,7 +564,6 @@ def get_container_version(container_version_pk: int) -> ContainerVersion:
573564
574565def get_container_by_code (learning_package_id : LearningPackage .ID , / , container_code : str ) -> Container :
575566 """
576- [ ❓TODO: STABLE or UNSTABLE? ]
577567 Get a container by its learning package and container code.
578568
579569 Args:
@@ -639,7 +629,6 @@ def get_containers(
639629 include_deleted : bool | None = False ,
640630) -> QuerySet [Container ]:
641631 """
642- [ ❓TODO: STABLE or UNSTABLE? ]
643632 Get all containers in the given learning package.
644633
645634 Args:
@@ -667,7 +656,6 @@ def get_entities_in_container(
667656 select_related_version : str | None = None ,
668657) -> list [ContainerEntityListEntry ]:
669658 """
670- [ ❓TODO: STABLE or UNSTABLE? ]
671659 Get the list of entities and their versions in the current draft or
672660 published version of the given container.
673661
@@ -726,7 +714,6 @@ def get_entities_in_container_as_of(
726714 publish_log_id : int ,
727715) -> tuple [ContainerVersion | None , list [ContainerEntityListEntry ]]:
728716 """
729- [ ❓TODO: STABLE or UNSTABLE? ]
730717 Get the list of entities and their versions in the published version of the
731718 given container as of the given PublishLog version (which is essentially a
732719 version for the entire learning package).
@@ -760,7 +747,6 @@ def get_entities_in_container_as_of(
760747
761748def contains_unpublished_changes (container_or_pk : Container | Container .ID , / ) -> bool :
762749 """
763- [ ❓TODO: STABLE or UNSTABLE? ]
764750 Check recursively if a container has any unpublished changes.
765751
766752 Note: I've preserved the API signature for now, but we probably eventually
@@ -813,7 +799,6 @@ def get_containers_with_entity(
813799 published = False ,
814800) -> QuerySet [Container ]:
815801 """
816- [ ❓TODO: STABLE or UNSTABLE? ]
817802 Find all draft containers that directly contain the given entity.
818803
819804 They will always be from the same learning package; cross-package containers
@@ -854,7 +839,6 @@ def get_container_children_count(
854839 published : bool ,
855840):
856841 """
857- [ ❓TODO: STABLE or UNSTABLE? ]
858842 Get the count of entities in the current draft or published version of the given container.
859843
860844 Args:
@@ -892,7 +876,6 @@ def get_container_children_entity_refs(container_version: ContainerVersion) -> l
892876
893877def get_descendant_component_entity_ids (container : Container ) -> list [int ]:
894878 """
895- [ ❓TODO: STABLE or UNSTABLE? ]
896879 Return the entity IDs of all leaf (non-Container) descendants of ``container``.
897880
898881 Intermediate containers (e.g. Subsections, Units) are never included in the
0 commit comments