Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f2c339f
test: Test for publish section/subsection
ChrisChV May 29, 2025
f1f4043
Merge remote-tracking branch 'origin/master' into chris/FAL-4180-sect…
pomegranited Jun 17, 2025
b8071aa
test: published_by is now None for unpublished containers
pomegranited Jun 17, 2025
7bf61d3
test: adds TODO comments to the tests
pomegranited Jun 17, 2025
c19a64c
feat: adds api to retrieve library block/container hierarchy
pomegranited Jun 23, 2025
b9020f3
test: adds query counts for hierarchy API tests
pomegranited Jun 24, 2025
6a65d5f
Merge remote-tracking branch 'origin/master' into chris/FAL-4180-sect…
pomegranited Jun 26, 2025
6fd8dca
perf: reduce hierarchy API query counts
pomegranited Jun 26, 2025
9923d1e
Merge remote-tracking branch 'origin/master' into chris/FAL-4180-sect…
pomegranited Jun 29, 2025
6fedb3b
perf: cut query counts in half
pomegranited Jul 2, 2025
195c73e
Merge remote-tracking branch 'origin/master' into chris/FAL-4180-sect…
pomegranited Jul 2, 2025
b2a0cd1
Merge branch 'master' into chris/FAL-4180-sections-subsections-publish
rpenido Jul 23, 2025
6c83d5e
chore: trigger ci
rpenido Jul 23, 2025
27d8418
chore: update openedx-learning constraint
rpenido Jul 23, 2025
addb0b5
Merge branch 'master' into chris/FAL-4180-sections-subsections-publish
rpenido Aug 14, 2025
df46ff6
chore: compile requirements
rpenido Aug 14, 2025
ef4fd07
test: updating query count
rpenido Aug 14, 2025
e29c69e
style: Add missing comment in kernel.in
ChrisChV Aug 15, 2025
3e969af
fix: get_container_from_key param and comments
rpenido Aug 16, 2025
1934a7d
docs: mark api as UNSTABLE and add comment about get_library_object_h…
rpenido Aug 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def test_unit_sync(self):
'<problem display_name="Problem 3 Display Name" max_attempts="22">single select...</problem>'
)
self._add_container_children(self.upstream_unit["id"], [upstream_problem3["id"]])
self._remove_container_components(self.upstream_unit["id"], [self.upstream_problem2["id"]])
self._remove_container_children(self.upstream_unit["id"], [self.upstream_problem2["id"]])
self._commit_library_changes(self.library["id"]) # publish everything

status = self._get_sync_status(downstream_unit["locator"])
Expand Down Expand Up @@ -415,7 +415,7 @@ def test_unit_sync(self):
""")

# Now, reorder components
self._patch_container_components(self.upstream_unit["id"], [
self._patch_container_children(self.upstream_unit["id"], [
upstream_problem3["id"],
self.upstream_problem1["id"],
self.upstream_html1["id"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def from_container(cls, library_key, container: Container, associated_collection
container=container,
)
container_type = ContainerType(container_key.container_type)
published_by = ""
published_by = None
if last_publish_log and last_publish_log.published_by:
published_by = last_publish_log.published_by.username

Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/content_libraries/api/libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class PublishableItem(LibraryItem):
published_display_name: str | None
last_published: datetime | None = None
# The username of the user who last published this.
published_by: str = ""
published_by: str | None = ""
last_draft_created: datetime | None = None
# The username of the user who created the last draft.
last_draft_created_by: str = ""
Expand Down
8 changes: 4 additions & 4 deletions openedx/core/djangoapps/content_libraries/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,27 +419,27 @@ def _add_container_children(
expect_response
)

def _remove_container_components(
def _remove_container_children(
self,
container_key: ContainerKey | str,
children_ids: list[str],
expect_response=200,
):
""" Remove container components"""
""" Remove container children"""
return self._api(
'delete',
URL_LIB_CONTAINER_CHILDREN.format(container_key=container_key),
{'usage_keys': children_ids},
expect_response
)

def _patch_container_components(
def _patch_container_children(
self,
container_key: ContainerKey | str,
children_ids: list[str],
expect_response=200,
):
""" Update container components"""
""" Update container children"""
return self._api(
'patch',
URL_LIB_CONTAINER_CHILDREN.format(container_key=container_key),
Expand Down
Loading