Skip to content
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

Copy/Paste in Libraries must support static assets #1170

Closed
jmakowski1123 opened this issue Jul 17, 2024 · 3 comments
Closed

Copy/Paste in Libraries must support static assets #1170

jmakowski1123 opened this issue Jul 17, 2024 · 3 comments

Comments

@jmakowski1123
Copy link

jmakowski1123 commented Jul 17, 2024

Out of scope for MVP but must be a fast follow.

@kdmccormick kdmccormick transferred this issue from openedx-unsupported/frontend-app-library-authoring Jul 18, 2024
@bradenmacdonald bradenmacdonald moved this from EPICS to Backlog in Libraries Overhaul Jul 25, 2024
@kdmccormick
Copy link
Member

Will be fixed by: openedx/edx-platform#35668

kdmccormick pushed a commit to openedx/edx-platform that referenced this issue Oct 23, 2024
…#35668)

The biggest challenge is dealing with the mismatch between how Libraries store
assets (per-Component) and how Courses store assets (global Files and Uploads
space). To bridge this, we're going to kludge a component-local namespace in
Files and Uploads by making use of the obscure feature that you can create
folders there at an API level, even if no such UI exists.

In this commit:
* Assets work when copy-pasting between library components.
* Assets work when copy-pasting from a library to a course, with the convention
  being to put that file in a subdirectory of the form:
  components/{block_type}/{block_id}/file.
  Note that the Studio course Files page still just shows the filename.
* Assets work when copy-pasting from a course to a library.
  Top level assets are put into a static folder in the Component, per Learning
  Core conventions.

Limitations:
* Roundtrips don't work properly.
* There's no normalized form, so directories will start nesting if you copy
  from library and paste into course, then copy the pasted thing and paste back
  into library, etc. This was deemed acceptable for Sumac.

Low level stuff:
* XBlockSerializerForLearningCore has been removed, with the url_name stripping
  functionality added as an optional param to XBlockSerializer (the other stuff
  was for children and "vertical" -> "unit" conversion, neither of which are
  relevant now).
* url_name is now stripped out of anything added to the clipboard, so that we
  don't end up writing it in block.xml when it is redundant (and would be
  stripped out with the next write anyway).

For the Libraries Relaunch Beta. This should not affect any site which
has kept New Libraries disabled.

Issue: openedx/frontend-app-authoring#1170
@kdmccormick
Copy link
Member

This was merged before the Sumac cutoff, and is ready for AC testing.

@bradenmacdonald bradenmacdonald moved this from Out of scope for MVP to Ready for AC testing in Libraries Overhaul Oct 25, 2024
@jmakowski1123
Copy link
Author

This works!

@jmakowski1123 jmakowski1123 moved this from Ready for AC testing to Done in Libraries Overhaul Nov 19, 2024
@jmakowski1123 jmakowski1123 closed this as completed by moving to Done in Libraries Overhaul Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants