- Rename escape_json_dumps to dump_js_escaped_json
- Rename escape_js_string to js_escaped_string
- Update js_escaped_string to output empty string for None
- Introduce dump_html_escaped_json
- Move dump_js_escaped_json after the pipe as new best practice
- Introduce additional uses of helpers
- Introduce new djangolib directory and move js_utils
Make escaping for json simpler and more consistent in Mako templates
- add escape_json_dumps to escape and json.dumps
- add escape_js_str to escape javascript string
- refactor Studio to use escape_json_dumps in Mako templates
TNL-2646: Escape json.dumps
This is a public, versioned, RESTful API for importing and
exporting full course content. The code was initially ripped from the
existing import/export API in the CMS contentstore djangoapp and wrapped
in Django Rest Framework view classes. It's a new djangoapp in
the openedx directory which is largely an abstraction off the CMS
Import/Export views.
This PR includes configuration changes. Most notably, Studio is
configured to serve the OAuth2 provider alongside the LMS.
This is the initial thread on the code list:
https://groups.google.com/forum/#!msg/edx-code/DmnHWmly25A/ZqjD1zb4o7oJ
And this thread contains another description of the changes:
https://groups.google.com/d/msg/edx-code/6dP9SEKsmqQ/Pvyn8fBDx68J
There are a numerous non-covered lines, all of which are missing
coverage in the CMS API this was ported from. They're mostly error
conditions, such as handling of multipart file upload errors.
This commit adds all of cms.
These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).
For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.
Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>
[LMS-2370]
Changed "Status Page" -> "Page".
UX:
support for displaying built-in tabs
restored drag and drop on Studio Pages
additional styling for fixed state on Studio Pages
add a new page action added to bottom of Studio Pages
Dev
changes for viewing tabs in studio,
refactored the tab code,
decoupled the code from django layer.
is_hideable flag on tabs
get_discussion method is needed to continue to support
external_discussion links for now since used by 6.00x course.
override the __eq__ operator to support comparing with
dict-type tabs.
Test
moved test code to common,
added acceptance test for built-in pages
added additional unit tests for tabs.
changed test_split_modulestore test to support serializing objects
that are fields in a Course.
Env:
updated environment configuration settings so they are
consistent for both cms and lms.