This commit introduces the changes needed for XBlocks in Blockstore to save their user state into CSM. Before this commit, all student state for Blockstore blocks was ephemeral (in-process dict store). Notes: * The main risk factor of this PR is that it adds non-course keys to the course_id field in CSM. If any code (like analytics?) reads course keys directly out of CSM and doesn't have graceful handling for key types it doesn't recognize, it could cause an issue. With the included changes to opaque-keys, calling CourseKey.from_string(...) on these values will raise InvalidKeyError since they're not CourseKeys. (But calling LearningContextKey.from_string(...) will work for both course and library keys.) * This commit introduces a slight regression for the Studio view of XBlocks in Blockstore content libraries: their state is now lost from request to request. I have a follow up PR to give them a proper studio-appropriate state store, but I want to review it separately so it doesn't hold up this PR and we can test this PR on its own.
Status: Deprecated (DEPR-24) Responsibilities ================ XModules render specific course run content types to users for both authoring and learning. For instance, there is an XModule for Videos, another for HTML snippets, and another for Sequences. This package provides both the implementations of these XModules as well as some supporting utilities. Direction: Convert and Extract ============================== XModule exists today as a complex set of compatibility shims on top of XBlock (all XModules currently inherit from XBlock). The goal is for all XModules to either be converted into pure XBlocks or be deleted altogether. Extracting them into separate repositories would be ideal, but even just converting them to pure XBlocks would significantly simplify the runtime. Glossary ======== More Documentation ================== `DEPR-24 <https://openedx.atlassian.net/browse/DEPR-24>`_ `Example conversion of Capa <https://github.com/edx/edx-platform/pull/20023/>`_