Remove the DarkLang middleware from the LMS
Created and basic routing to the update_lang page for the GET Request
TNL-4742
Basic form functionality
Working example in LMS of the form to set the language
Login now required to change the preview language, and corrected some minor bugs
Updates to move the template code to lms and to correct minor defects
TNL-4742
Added template for preview_lang.html to cms
TNL-4742
Changed filename of darklang.py to api.py to match convention
TNL-4742
Updated and refactored the Darklang tests
TNL-4742
Updated comments in tests
TNL-4742
Formating updates
TNL-4742
Updated comments and formatting
TNL-4742
Corrected i18n tests and corrected PEP8 format issues
TNL-4742
Code Lint/PEP-8 corrections and upates
TNL-4742
Removed constant that was not needed (to be squashed)
TNL-4742
Added init method to clear up PEP8 Warnings (will squash)
TNL-4742
PEP-8/Lint issue resolved (squash)
Updated for i18n
TNL-4742
Refactored the preview_lang.html page to use a common included template
Refactoring and changes from PR comments
TNL-4742
Correction for safecommit violation (Squash)
TNL-4742
PR changes and refactoring (Squash)
Updates to reduce changes made in the urls used
TNL-4742
Removed unneeded aria-described by and bug in MAKO Template (squash)
TNK-4742
Updated docstring comments
Clarified form response text
Minor PR request (Squash)
Refactoring of how the responses are generated within the DarkLang views file
A series of refactors in response to PR comments
Method name change for clarity in reponse to PR comments (Squash)
Updates to tests per PR requests (Squash)
Minor comment updates for clarity and PR requests (Squash)
Updated per PR comments and added a test for empty preview_language
Layout and code style updates (Squash)
Updated test to contain method in the request.
Removed the Darklang preview-lang and clear-lang parameters and added the new DarkLang settings form at /update_lang
Refactored tests and added some tests for coverage, corrected defect with empty input codes
Removed unused and obsolete code
Corrected test errors, resolved PR comments, and updated comments to clarify testing
TNL-4742
Updated tests to deal with Pylint quality issue (Squash)
Updated tests to better reflect test case and PR updates (Squash)
2. Add site configuration overrides to theming/helpers.py
3. Move microsite.get_value from theming/helpers to site_configuration/helpers
4. Move microsite_configuration.microsite.get_value usages to site_configuration.helpers.values
rewriting them.
In PERF-341, we adjusted the static_replace middleware to try and
exclude static XBlock resource URLs from being interpreted as the marker
URLs used to signify course assets in course content. Since they both
started with /static, this could, and did, cause issues where linking
directly to the assets of an XBlock within, say, one of its templates,
would lead to that link being rewritten and ultimately being incorrect.
The fix attempted to see if the link started with the prefix that all
static XBlock resource URLs start, and if so, it returned them
unmodified.
We incorrectly assumed that our testing captured all cases, and since
we're here, we know that this was wrong. We weren't accounting for cases
when the URLs being generated had the STATIC_URL configuration value
prefixed -- https://example.com/static/xblock/.... -- and so our direct
check of seeing if such a URL started with "/static/xblock" would always
fail, leading to the erroneous rewriting and nonsensical output.
This fix checks if the link either starts with the prefix OR if it
starts with the STATIC_URL value and contains the prefix overall. There
is a small overlap between the STATIC_URL and the prefix we check for,
so an inconsistency could arise down the line if we changed our
STATIC_URL to use a difference base directory, but our tests will at
least catch the issue now.
This version component reflects the "version" of the StaticContent
objects which we cache server-side. If the layout of those objects
changes between releases, errors occur when loading them from cache.
By using a separate version value, which can be incremented on its own
after a change has been made to the StaticContent class, we can avoid
loading older cached content and in turn take advantage of these changes
faster, without needing to intervene operationally.