Normalize the representation of Scope.content data in MongoModulestore FieldData
Without this, the new 'items' field in the course_info xmodule caused bizarre behavior. If you added the text 'items' to a course_info section, then the LMS would throw a 500, because the field name isn't 'data', but the stored data is a string, leading to the check of `key.field_name in self._data`, where key.field_name is the string 'items', and self._data is the content string.
Showing
- common/lib/xmodule/xmodule/html_module.py 3 additions, 3 deletionscommon/lib/xmodule/xmodule/html_module.py
- common/lib/xmodule/xmodule/modulestore/mongo/base.py 12 additions, 23 deletionscommon/lib/xmodule/xmodule/modulestore/mongo/base.py
- common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py 2 additions, 2 deletionscommon/lib/xmodule/xmodule/modulestore/tests/test_mongo.py
Please register or sign in to comment