Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

High level requirement

High level: We want to support static assets in content libraries.

Less obvious implication: We need to support copying those assets back and forth when copy/pasting between courses and libraries, and when using library content in a course.

Strategy

Overall strategy for managing library <-> course content sharing is that a course gets a copy of the content, with some back-pointer.

...

  • Library assets are local to a Component. Course assets have a shared Files and Uploads across all Components.

  • Library asset->component relations are explicit, in that there's a database model for it. Course asset->component relationships are interpreted via scanning the content.

  • Library assets are versioned along with the Component, i.e. they obey draft/publish semantics. Course assets are not versioned.

  • Course assets have AssetKeys, Library assets are just relative paths against a particular version of a Component.

Current work in flight

I have a PR in flight that implements static assets on the libraries side: https://github.com/openedx/edx-platform/pull/35557

It requires three other PRs, two of which have merged:

...

https://github.com/overhangio/tutor/pull/1124

...

  • Copy content into the clipboard (content_staging), which will hold the file data and "normalized" name for the asset.

  • When pasting into a course from a library, create the assets in a subdirectory based on the UsageKey.

Work to be picked up

The one case this PR still doesn't handle is if someone copies from a library into a course, and then copies that thing they just pasted into the course and pastes it again. (i.e. it doesn't know how to convert a path to a course asset in a subdirectory back into the abstract "normal" form to put on the clipboard). I should have this addressed soon.

...