Update the tests around static_file code to use byte streams instead of
string streams for generating static content. This is a fix to get
these tests passing on python 3.
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.
This is similar to use_read_replica_if_available(),
but it just returns either 'read_replica' or
'default', for use with the Django ORM using()
method. Syntactically, it fits nicer with queryset
method-call chains.
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
This is the first in a series of commits to create
a Python API for the LMS program_enrollments app.
We do some general refactoring, renaming, and clean-up
in order to move toward the creation of that API.
EDUCATOR-4321