-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Background
After the merge of #35639, we have the ability to serve static assets from Learning Core, but we haven't hooked it into the Learning Core XBlock runtime so that we can display it properly. A draft of this functionality is available in _lookup_asset_url from this older, abandoned static asset PR, but that pre-dates the version-awareness that was added in #35626.
Acceptance Criteria
Implement _lookup_asset_url borrowing from the original draft implementation of this functionality, but checking for the block. _runtime_requested_version in order to figure out which version we should be pulling it from. Add tests.
This can be tested manually by using the add_assets_to_component management command to add/replace/delete images.
So the steps would be:
- Create an HTML component in a Library, and specify a
/static/test.jpegimage inside of it using the raw HTML editor. - Use the
add_assets_to_componentmanagement command to manually add thetest.jpegasset. - Verify it shows up in the library preview.
- Use the
add_assets_to_componentmanagement command to change thetest.jpegasset. - Verify the new asset shows up in the library preview.
- Verify the old asset shows up when referencing the embed URL with the old version of the component.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done