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.
* Convert to using ExitStack instead of nested.
nested is not available in Python3.
* Use ExitStack from contextlib2.
ExitStack has not been backported to the Python 2.7 standard library and
contextlib.nested is no longer available in Python 3.5. We need to be
able to use something in both 2 and 3 as we transition so we'll pull in
contextlib2 which has backports of the full python3 contextlib.
Prior to this commit, it was possible for course authoring teams
to import and execute Mako templates using the obscure "customtag"
tag (CustomTagModule). Since Mako templates can run Python code
(e.g. imports, database queries, etc.), this would give a course
team the ability to execute arbitrary, unsandboxed code on the
server.
This commit converts CustomTagModule to use the Python library's
string.Template instead. This should be broadly compatible with
the most basic and common usage of customtag, which is simple
variable substitution in the style of ${var_name}.
The old Notes Django app is the only caller of this no longer
supported library. I have verified that this old app is no
longer functional and is already slated to be removed as part
of DEPR-18.
So this commit simply removes the call to firebase-token-generator
and leaves removal of the Notes app to DEPR-18.
The `DEFAULT_SHOW_RESET_BUTTON` is not actually referenced anywhere
other than in these two places where it's read. As far as I can tell,
nothing sets this value so it's always going to fallback to false.
Since this mixin is imported during startup, removing this unblocks
testing on python3 where it can fail to start up if the settings haven't
fully loaded before you try to access them.
The Randomized Content Block XBlock only randomizes the selection of
the children blocks and has unpredictable randomization of
the order of the selected child blocks due to the usage of sets, which
are unordered, for storing the selected blocks. This becomes apparent
when all the available child blocks in a library are chosen for a
Randomized Content Block, to randomize just the order of the child
blocks and not just the selection of the blocks. The order of the
selected blocks ends up being similar for multiple learners.
This change modifies the XBlock to store the selected child blocks in
a list, instead of a set, after randomly shuffling them.
A popular convention is to have user accounts stored in a separate authentication
database. This change add support for configuring edx-platform to work with
such a setup.