edx-platform icon indicating copy to clipboard operation
edx-platform copied to clipboard

Follow-ups from Learning Core Switchover

Open kdmccormick opened this issue 1 year ago • 0 comments

Following up on https://github.com/openedx/edx-platform/pull/34066 ...

### Tasks
- [ ] https://github.com/openedx/openedx-learning/pull/186
- [ ] https://github.com/openedx/openedx-learning/pull/184
- [ ] https://github.com/openedx/edx-platform/issues/34737
- [ ] https://github.com/openedx/openedx-learning/issues/167
- [ ] https://github.com/openedx/public-engineering/issues/238
- [ ] Rip out `def_key` from `LibraryXBlockMetadata` (does this require frontend code changes?)
- [ ] All `content libraries misc` tickets: https://github.com/openedx/edx-platform/issues?q=is%3Aissue+is%3Aopen+label%3A%22content+libraries+misc%22
- [ ] Better consolidate some of the runtime related logic. I've written "get the component for this usage key" at least three times.
- [x] Make Content and file data for content 1:1 by encoding the mime type as part of the file saved... (? though this would make changing mimetypes text much more expensive...) Anyhow, figure this out while implementing static asset support.
- [ ] Figure out what fields are actually needed in the library listing view and optimize the data model if necessary (things like publish status and count are somewhat expensive to aggregate right now). Can be punted if it's not necessary for MVP.
- [ ] See if we can remove some of the computations that would be more expensive from the `get_metadata()` calls that are meant to operate over a queryset of libraries (things like getting the size of a library, whether there are unpublished changes, etc.)–these queries are fine for any one particular library, but the expense scales with the size of the library, and we probably don't want it in a list view.
- [ ] Figure out how we really want to model the LibraryKey
- [ ] In order to make duplication and import work robustly, [write and implement ADRs around the do-not-query-old-libraries-versions decisions](https://openedx.atlassian.net/wiki/spaces/COMM/pages/3966795804?focusedCommentId=3971317767).
- [ ] Maybe we can use slugs rather than UUIDs for the UsageKeys of blocks in libraries? We could make them type in the title in a modal when creating a new block, and use a slug of that maybe? We could also allow them to freely change it until they publish (after which we preserve it so that content linking to it doesn't break)?
- [ ] Make get_block return Draft vs Published based on an initialization parameter. Currently it's hardcoded to Draft because we're just supporting CMS for now.
- [x] Avoid importing from openedx-learning models; perhaps even use importlinter to enforce this. Models we need should be exposed through api.py. Better yet, we should return data objects instead of models.
- [ ] Figure out how to write a get_library_blocks function that returns a queryset of XBlock metadata objects rather than a list.
- [ ] https://github.com/openedx/edx-platform/pull/34237
- [ ] Remove unnecessary type-ignore comments once ^ merges
- [ ] Remove whole-library version number from REST API
- [ ] Handle cases where `content_library.learning_package is None`

kdmccormick avatar Feb 22 '24 16:02 kdmccormick