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.
test fixes
changes made as suggested
test fixes
test fixes for python 2
test fixes
python 3 fixes
test fixes
changes made as suggested
test fixes
test fixes for python 2
test fixes
minor fixes
python 3 fixes
minor changes
The underlying data is put into json documents that expect unicode
strings not byte strings. In python2 lxml provided strings that were
auto coerced but in python3 it provides byte strings.
by making CAPA <input> elements siblings of their <label>s, instead of children.
Also:
* Moves radio submitted status block down below the problem
to match the checkbox problem status blocks.
* Marks submitted choicegroup answers with a class
https://github.com/edx/edx-platform/pull/20645
This introduces:
* A new XBlock runtime that can read and write XBlocks that are persisted using
Blockstore instead of Modulestore. The new runtime is currently isolated so
that it can be tested without risk to the current courseware/runtime.
* Content Libraries v2, which store XBlocks in Blockstore not modulestore
* An API Client for Blockstore
* "Learning Context" plugin API. A learning context is a more abstract concept
than a course; it's a collection of XBlocks that serves some learning purpose.
This reverts commit 3d2617983b.
The change was not quite right because the method six provides needs to
have `self` be passed in as well. See the docs here:
https://six.readthedocs.io/#unittest-assertions
Reverting for now and we can fix it in smaller chunks later.