This is a follow up from MST-16, which was commited
in 3858036a4e.
Changes:
* Enrich course teams_configuration from a plain Dict
to a custom XBlock field that uses the new TeamsConfig
wrapper class.
* Remove teams_conf property from course, as the previous
change made it redundant.
* Update teams_enabled implementation.
* Remove teams_max_size field from course, which is
no longer semantically correct, as max team size
is now defined on a teamset level.
* Remove teams_topics in order to discourage use of raw
teams config dict.
* Add convenience properties teamsets and teamsets_by_id
to course.
* Allow periods and spaces in teamset IDs to avoid breaking
existing course teams.
Some parts of the code still use the old raw config data
(identifiable by searching "cleaned_data_old_format"),
which we expect to be slowly factored away as we build
new teams features. MST-40 has been created to remove any
remaining references if necessary.
MST-18
* fix: bokchoy test
* fix: remove pdb break
This PR introduces some backend python + REST APIs for storing static
asset files along with an XBlock in a content library. It also updates
the new runtime to be able to load such static asset files.
Example use cases:
* Store an image file with an HTML block and then use the image inline
in the HTML block.
* Store a PDF file with an HTML block and provide a link in the HTML for
the learner to download the PDF.
* Store .srt files or even video .mp4 files that belong to a video
XBlock.
Within the bundle, these static asset files are stored in a "static/"
subfolder of the folder that contains the OLX file. Extending an
existing LMS/Studio convention, a static asset file such as "image.png"
is referenced within the OLX as "/static/image.png" and the URL will be
rewritten by the runtime.
Python 3 has no way to access this implementation of rounding in the
standard library. We implement it here so that we can continue to use
it for grades calculation to keep regrading consistent.
Currently we can't be confident that if we change the rounding behaviour
we won't impact students. We can't be sure that students that were
previously passing wouldn't suddenly no longer be passing. Given this,
it's lower risk to just implement the old rounding strategy here and use
it when we are rounding to calculate grades.
Wrap CourseModule.teams_configuration in TeamsConfig
class, centralizing parsing, validation, error handling,
etc. Wrapped object is exposed on 'teams_conf' field.
Old code still uses 'teams_configuration' dict;
we should change this in the future (MST-18).
MST-16
We need to do this because when I tride to go to the JSON serializer a
bunch of tests started failing because various parts of our code are
putting things into the session that are not JSON serializable.
We can't keep using the default pickle serializer because it defaluts to
using the highest available protocol and that will cause issues with the
python 2 to 3 upgrade since both will be running in production at the
same time. We need to use a version of the pickle protocol that both
can use interchangably.
We also need to make sure we read with latin1 encoding to make datetimes
work correctly between the two versions of python.
HIGHEST_PROTOCOL will cause it to change when we move from python 2 to 3
and this may cause issues as older machines try to read objects pickeld
with a version of the protocol they don't know.
During deploys, and if we have to roll back are two examples.
changes made to pass tests with python 2 and other minor changes
Updated the tests to fix the string/bytes input
changes made to pass tests with python 2 and other minor changes
made some changes as suggested
made changes as suggested
changes made as suggested
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.
* Remove old performance tests that we haven't been running.
As far as I can tell, these tests to capture HAR files were created 5
years ago and not being run as a part of our suite? They capture HAR
data that we do nothing with so even if they were running we should
remove them until we're ready to care about consuming this kind of
information.
* Update password test unicode string.
* Add ugettext translation helper function.
* Fix lambda syntax that is not valid in python 3.
* Fix ur raw strings which his not valid in python 3
* Use edx_six.get_gettext instead of ugettext.
* Fix a few other encoding issues.
* Don't use old form of sorted funciton.
This form which uses a 'cmp' method is not available in python 3.
* 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.