Skip to content

Conversation

@pomegranited
Copy link

@pomegranited pomegranited commented Mar 26, 2025

Finishes the CRUD API started in openedx#36371.

Private ref: FAL-4052

Testing instructions

Should be enough to do a code review and careful check of the tests to ensure they validate the desired behaviour for these new methods.

@pomegranited pomegranited force-pushed the jill/units-api-update-delete branch 3 times, most recently from 67e0e34 to 426c9dd Compare March 26, 2025 09:58
@pomegranited pomegranited changed the title feat: adds python and REST APIs to update a container's display_name feat: adds APIs to update or delete a container Mar 26, 2025
@pomegranited pomegranited force-pushed the jill/units-api-update-delete branch from 426c9dd to 6482bf4 Compare March 26, 2025 10:40
@pomegranited pomegranited force-pushed the jill/units-api-update-delete branch from 6482bf4 to 23fa9df Compare March 26, 2025 10:51
@pomegranited pomegranited force-pushed the jill/units-api-update-delete branch from 23fa9df to 2ef5c83 Compare March 26, 2025 11:13
Copy link
Member

@navinkarkera navinkarkera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pomegranited Looks great! Thanks! 👍

  • I tested this: (verified tests)
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation

container_key,
)

return Response({})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: We could set the status_code to 204 for deleted.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cf 0523899

@pomegranited pomegranited marked this pull request as ready for review March 27, 2025 23:24
@pomegranited pomegranited merged commit 1ef3b1e into braden/units-api Mar 27, 2025
47 checks passed
@pomegranited pomegranited deleted the jill/units-api-update-delete branch March 27, 2025 23:46
navinkarkera pushed a commit that referenced this pull request Mar 28, 2025
…penedx#36371)

* refactor: convert libraries API from attr.s to dataclass, fix types

* fix: make corresponding updates to 'search' code

* feat: use new version of openedx-learning with containers support

* temp: Use opencraft branch of opaquekeys

* refactor: Use LibraryElementKey instead of LibraryCollectionKey

* refactor: split libraries API & REST API up into smaller modules

* feat: new REST API for units in content libraries

* feat: python+REST API to get a unit

* feat: auto-generate slug/key/ID from title of units

* feat: generate search index documents for containers

* refactor: rename LibraryElementKey to LibraryItemKey

* fix: lint error

* feat: adds new units to search index on create/update

and when running reindex_studio.

Updates requirements for openedx-events and openedx-learning to support
these changes.

* fix: pylint

* fix: temp requirement

* fix: search index container events/tasks

* feat: add get_library_container_usage_key to libraries API

and use it when search indexing containers

* fix: index all containers during reindex_studio

* chore: bump openedx-events requirement

* fix: address review comments

* chore: bumps openedx-learning to 0.19.1

* fix: rename api method to library_container_locator

since container keys are locators, not usage keys

* chore: bumps opaque-keys dependency

* test: fix misnamed unit_usage_key

* feat: adds APIs to update or delete a container (#757)

* feat: adds python and REST APIs to update a container's display_name
* refactor: adds _get_container method to api to reduce code duplication
* feat: adds python and REST APIs to delete a container
* test: add container permission tests

---------

Co-authored-by: XnpioChV <xnpiochv@gmail.com>
Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants