Commit Graph

12 Commits

Author SHA1 Message Date
Maxim Beder
ec1e3b6e74 fix: fix side-wide language for legacy UI
When side-wide language is set via LANGUAGE_CODE site configuration,
some elements of legacy UI still use the language set in user
preferences (or None, which fallsback to 'en' if nothing is set in
preferences). The expectation is that everything should be translated to
the language which is set in the site configuration.

In legacy UI (i.e. templates) the code of the current language sometimes
is needed, and in these cases `user_language` variable from the context
is used. The value for that variable is inserted via context processor,
which takes the value from the user preferences.

The solution modifies the context processor to check if there is a
language set in site configuration, and if there is, send that value,
instead of whatever value there was in user peferences.
2021-11-09 00:37:43 +01:00
Matthew Piatetsky
449d5c7a2d feat: only email users about their goal in the morning in their timezone (#28922) 2021-10-06 15:02:03 -04:00
Usama Sadiq
859df03049 refactor: ran pyupgrade on lms/djangoapps/courseware (#26737) 2021-03-12 12:15:58 +05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Ayub khan
7ca32f9197 INCR-433 python3 compatibility 2019-07-30 12:21:56 +05:00
Nimisha Asthagiri
700a902b68 Cleanup and remove deprecated RequestCache Django app
ARCH-223
2018-09-12 14:39:11 -04:00
Eric Fischer
e18448e27d Silence deprecation warnings
https://docs.djangoproject.com/en/1.11/releases/1.10/#using-user-is-authenticated-and-user-is-anonymous-as-methods
2018-05-02 10:03:50 -04:00
Qubad786
64555c60c0 Move request_cache to openedx.core.djangoapps 2018-01-26 15:09:25 +05:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Gregory Martin
f0cd29f02a Revert "Merge pull request #13915 from edx/revert-13794-yro_implement-dateutil"
This reverts commit d59ab18b27, reversing
changes made to 0ebab35e89.
2016-11-07 17:04:13 -05:00
Jesse Zoldak
ec880138d2 Revert "Implement DateUtils in LMS" 2016-11-04 07:50:26 -04:00
Gregory Martin
3fd16eb6be Implement DateUtils in LMS 2016-11-03 10:06:10 -04:00