Commit Graph

18 Commits

Author SHA1 Message Date
Kyle McCormick
4aedeb8988 refactor: remove XModule JS from Django Pipeline (#32530)
`module-js` and `module-descriptor-js` are old JavaScript group
indicators, left over from when we managed XModule assets via Django
Pipeline. We would like to get rid of them in order to make it easier to
build XModule JS without using Python.

There is one single usage of `module-js` in the entire platform (the
rest have been replaced with Webpack references, which is the
less-outdated way of managing XModule assets :). The lone `module-js`
reference was added in 2013 [1] so that circuit diagrams would display
in the course wiki. However, the ability to render circuits in the wiki
was removed in 2015 [2], so it is safe to remove the reference.

There is also one single usage of `module-descriptor-js`. It's in the
legacy bulk email editor, which hackily cribs from the old HtmlBlock
editor. Fortunately, we are able to simply replace the Django Pipeline
reference with the equivalent XModule JS Webpack bundle. (Note: The old
email editor is currently still supported, but is currently being
replaced by frontend-app-communications, so this hack will be gone
eventually).

Finally, this commit also sneaks in one styling fix: it adds the
HtmlBlockEditor CSS back to the aforementioned legacy bulk email page.
The missing CSS was causing a read-only 1-line codemirror editor to
appear below the HTML editor [3]. This bug was introduced during the
original XModule SCSS decoupling [4], which removed builtin block CSS
from the LMS-wide bundle, thus removing the HTML editor CSS from the
bulk email page. We imagine that nobody noticed because the bug only
exists in master (not Palm) and frontend-app-communications seems to be
globally enabled on edx.org. As a simple fix, we add the new CSS link to
the legacy bulk email page, and it renders fine again [5].

References:

1. 3fc59b3da5
2. https://github.com/openedx/edx-platform/pull/10324
3. Before fix: https://github.com/openedx/edx-platform/assets/3628148/25fc41b2-403d-4339-8c49-0b04664dfa02
4. https://github.com/openedx/edx-platform/pull/32018
5. After fix: https://github.com/openedx/edx-platform/assets/3628148/9a5d74f1-cc83-4ebe-8f0c-ee270f7721b8

Part of: https://github.com/openedx/edx-platform/issues/32481
2023-07-18 09:32:12 -04:00
Adeel Khan
298d3554fe Fix templates for XSS code injection via translations
This would patch all templates (django/mako)
for a possible XSS code injection via
translation files by html escaping them..

LEARNER-4632
2019-06-25 14:22:42 +05:00
Matt Drayer
68312bdd2d Revert "Revert "saleem-latif/WL-328: Multi-Site Comprehensive Theming""
2. Update COMPREHNSIVE_THEME_DIR to COMPREHENSIVE_THEME_DIRS
3. Update paver commands to support multi theme dirs
4. Updating template loaders
5. Add ENABLE_COMPREHENSIVE_THEMING flag to enable or disable theming via settings
6. Update tests
7. Add backward compatibility for COMPREHEHNSIVE_THEME_DIR
2016-06-30 15:19:51 +05:00
Usman Khalid
4c608077d7 Use new django-pipeline tags. 2015-11-16 20:57:13 +05:00
stv
a8d30c5de2 Remove circuit-schematic integration from wiki 2015-10-26 15:51:12 -07:00
Usman Khalid
130bbd7993 Upgrade to django-pipeline v1.5.3.
TNL-3137
2015-10-06 19:52:38 +05:00
Brian Beggs
c26bb9188a Revert "Upgrade django-pipeline and staticfiles" 2015-09-23 15:52:24 -04:00
Usman Khalid
1e799eb508 Upgrade to django-pipeline v.1.5.3.
TNL-3137
2015-09-22 20:39:43 +05:00
Ned Batchelder
aff3c47754 i18n fixes for wiki templates. 2014-02-10 15:23:13 -05:00
Dave St.Germain
6d50ff7b61 Set the html language to the browser's specified language 2014-01-28 16:43:29 -05:00
Adam Palay
18a979bb4d put wiki templates back into Django templating 2013-08-12 16:42:07 -04:00
Calen Pennington
0d3c44996a LMS i18n from Tsinghua 2013-07-31 19:39:15 -04:00
Bridger Maxwell
a3760d484d Added call to load schematics on wiki pages. 2012-09-13 12:38:28 -04:00
Bridger Maxwell
a285d1a60e Updated wiki preview template and django-wiki version. 2012-08-22 00:07:37 -04:00
Bridger Maxwell
1e08164db5 Added MathJax to wiki pages. 2012-08-18 13:12:04 -04:00
Bridger Maxwell
3fc59b3da5 Added javascript groups to wiki preview modal so circuits show up. 2012-08-18 00:17:20 -04:00
Tom Giannattasio
bb6d6d9ac8 edit page styles 2012-08-16 16:41:41 -04:00
Bridger Maxwell
2b29c95266 Added template for inline preview. 2012-08-15 21:47:26 -04:00