-
Notifications
You must be signed in to change notification settings - Fork 12
Subsections in Learning Core #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Subsections in Learning Core #301
Conversation
…-cl-subsection feat: [AXM-1879] implement contentlibrary subsections
Thanks for the pull request, @andrii-hantkovskyi! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Submit a signed contributor agreement (CLA)
If you've signed an agreement in the past, you may need to re-sign. Once you've signed the CLA, please allow 1 business day for it to be processed. 🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Hi @kdmccormick and @ormsbee, could you please review this PR when you have a chance? |
entity_list = getattr(container.versioning.draft, "entity_list", None) | ||
# ?FOR REVIEW: Is this correct? | ||
if entity_list is None: | ||
# This container has not been published yet, or has been deleted. | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
container.versioning.draft
should always return an object with an entity_list
. Are you finding that the attribute is missing sometimes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, test_soft_deleting_unit
is failing when calling authoring_api.contains_unpublished_changes
because of:
entity_list = container.versioning.draft.entity_list
E AttributeError: 'NoneType' object has no attribute 'entity_list'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will happen if you create a publishable entity but haven't created any versions of that entity. It's probably worth just bootstrapping it so that creating a PublishableEntity
always sets the Draft
and Published
versions to None
, so we never have to deal with that state.
@@ -0,0 +1,50 @@ | |||
""" | |||
Models that implement units |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Models that implement units | |
Models that implement subsections |
publishable_entities_pks=publishable_entities_pks, | ||
entity_version_pks=entity_version_pks, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API contract has changed as of a recent PR. Please update to the latest.
entity_list = getattr(container.versioning.draft, "entity_list", None) | ||
# ?FOR REVIEW: Is this correct? | ||
if entity_list is None: | ||
# This container has not been published yet, or has been deleted. | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will happen if you create a publishable entity but haven't created any versions of that entity. It's probably worth just bootstrapping it so that creating a PublishableEntity
always sets the Draft
and Published
versions to None
, so we never have to deal with that state.
…-content-library-section feat: [AXM-1886] implement content library sections
This PR implements the new subsections functionality in Learning Core, which allows for organizing units within hierarchical containers. Subsections serve as containers that can store and manage units within the content structure.
Changes in this PR
get_units_in_subsection
to retrieve units in draft or published subsectionsget_units_in_published_subsection_as_of
to access historical states of subsectionsThis implementation extends our hierarchical content structure, allowing for more organized content arrangement with units being contained within subsections.