* INCR-214: python-modernize on common/lib/xmodule/xmodule/modulestore/tests
* Running isort on common/lib/xmodule/xmodule/modulestore/tests
* Resolving issues with mangled comments and fixing int/long test
* INCR-227: python-modernize on common/lib/xmodule/xmodule/video_module, partitions, and util
* pylint will ignore imports from six
* INCR-227 Fixing mangled comments and variable names
This is part of a larger effort to split packages out into independent,
composable, PyPI installable Python packages.
While this package itself isn't monumental, it represents the bottom of
the dependecy tree and can be split out before any other packages.
* Minimum possible changes were made to merge CapaModule & CapaDescriptor into
one ProblemBlock class.
* There are no known changes in behavior.
* CapaModule and CapaDescriptor inherited from a number of classes which inherit
from XModule or XModuleDescriptor but did not depend on them. For all these
classes the methods were moved to mixins which did not inherit from either and
then these mixins were added to ProblemBlock in the order which maintains MRO.
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.
In Studio: Introduces a new option, `after some number of attempts`
and a new entry box for specifying the number of attempts.
This allows course creators to specify that a given question's
answer is only viewable, i.e its show answer button is visible,
after the learner has attempted answering the question -
by hitting the submit button - a given number of times. Included
in this commit are unit tests for the new feature.