Commit Graph

52 Commits

Author SHA1 Message Date
Usama Sadiq
24272e5caa refactor: ran pyupgrade on openedx/core/djangoapps (#26956)
Ran pyupgrade on openedx/core/djangoapps/{system_wide_roles, theming}
2021-04-01 19:27:38 +05:00
Aarif
98f5a886ba replaced unittest assertions pytest assertions (#26569) 2021-02-22 12:24:59 +05:00
Jawayria
9ecbe15d91 BOM-2329: Applied pylint-amnesty to system_wide_roles, theming, user_api, user_authn 2021-02-04 18:00:51 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -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
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Robert Raposa
2202545aec remove studio signin and signup pages
This completes the work started in https://github.com/edx/edx-platform/pull/19453
to use the LMS login and registration for Studio, rather than Studio
providing its own implementation.

LMS login/registration are being used for the following reasons:
1. LMS logistration properly handles all SSO integrations.
2. A single logistration is simpler to maintain and understand.
3. Allows Studio to work more like all other IDAs that use LMS
logistration.

The original switch to use LMS logistration for Studio also added the
toggle `DISABLE_STUDIO_SSO_OVER_LMS` to provide the community some
additional time for switching. This commit removes this toggle, which
at this point means all deployments will use the LMS logistration.

This change requires sharing cookies across LMS and Studio. Should that
prove to be a problem for certain Open edX instances, there are
discussions of possible alternative solutions.
See https://github.com/edx/edx-platform/pull/19845#issuecomment-559154256

Detailed changes:
* Fix some Studio links that still went to old Studio signin and signup.
* Remove DISABLE_STUDIO_SSO_OVER_LMS feature toggle.
* Remove old studio signin and signup pages and templates.
* Fix url name "login", which had different meanings for Studio and LMS.
* Use the following settings: LOGIN_URL, FRONTEND_LOGIN_URL,
FRONTEND_LOGOUT_URL, and FRONTEND_REGISTER_URL.
* Redirect /signin and /signup to the LMS logistration.
* Add custom metric `uses_pattern_library`.
* Add custom metric `student_activate_account`.
* Add Django Settings to allow /signin, /signup, and /login_post to be
disabled once ready.

This work also relates to ARCH-218 and DEPR-6.

ARCH-1253
2019-12-04 02:36:36 -05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Ayub khan
8a95a8e520 BOM-95
assertItemsEqual with six.assertCountEqual
2019-08-21 17:01:40 +05:00
David Ormsbee
7944e6b418 Override theme with site_theme query param 2019-08-08 20:36:21 -04:00
Diana Huang
0c7ad64350 Clean up theming tests and microsites. 2019-06-14 15:22:33 -04:00
Diana Huang
fe3d33091f More test fixes. 2019-06-14 15:20:50 -04:00
Diana Huang
762f20385e Fix theming test helpers. 2019-06-14 15:20:50 -04:00
Guruprasad Lakshmi Narayanan
2e305964f5 [INCR-180] Compatibility changes - openedx/core/djangoapps/theming/tests 2019-03-28 15:26:31 -07:00
Matthew Piatetsky
444799fb0e fix unicode strings in openedx/ part 2 2019-02-15 10:15:51 -05:00
cclauss
8fca11b85c Use print() function in both Python 2 and Python 3 2019-01-13 17:16:37 +01:00
Nimisha Asthagiri
886bc4b20b Studio login/registration redirects to LMS 2018-12-17 20:50:57 -05:00
Robert Raposa
ba4cc62ff8 Retire deprecated RequestCache (Take 2)
ARCH-223
2018-09-08 15:09:28 -04:00
Nimisha Asthagiri
4ca165f690 Revert "ARCH-223: Retire deprecated RequestCache." 2018-08-30 16:33:03 -04:00
Robert Raposa
3df339a56a Retire deprecated RequestCache.
ARCH-223
2018-08-30 08:55:19 -04:00
Jeremy Bowman
380a24f7ef TE-2689 Remove useless pylint suppressions part 6 2018-08-21 13:54:34 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
Qubad786
64555c60c0 Move request_cache to openedx.core.djangoapps 2018-01-26 15:09:25 +05:00
Chandrakant Gopalan
f6f29ca49e Allow theme template block overrides.
This allows an overridding template from a theme to inherit from the
same corresponding standard template.

This is useful when you only want to override one or more named blocks,
but otherwise make no modifications to the standard template.
2017-12-22 09:41:35 +01:00
Eric Fischer
2e3f871c12 Memoize common lookups during request
Prevents repeated memcached lookups on functions whose values should
remain static for the lifetime of a request.

EDUCATOR-1731
2017-12-04 11:54:50 -05:00
Jesse Zoldak
9c49c10b27 Revert "Allow theme template block override" 2017-11-30 17:09:13 -05:00
Uman Shahzad
37844fd927 Merge pull request #15947 from open-craft/allow-theme-template-block-override
Allow theme template block override
2017-11-29 22:25:27 +05:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00
John Eskew
b866f35620 Remove support for COMPREHENSIVE_THEME_DIR -
all dirs must now go into COMPREHENSIVE_THEME_DIRS.
Move comprehensive theming setup section out of startup.py and into
  settings files using new 'derived' functionality.
Add 'derive_settings' at the end of all top-level Django settings files.
Move validation of comprehensive theming settings into new apps.py
  theming file.
Split theming code into code safe to run before settings are initialized
  -and- after settings are initialized.
2017-10-30 14:36:06 -04:00
Andy Armstrong
ae1c760ea4 Use Bootstrap theme colors and fonts in old stylesheets
LEARNER-2977

Fixes
2017-10-29 22:22:08 -04:00
Chandrakant Gopalan
96e704e47c Allow theme template block override 2017-09-11 21:42:25 -04:00
Andy Armstrong
94add3a49f Provide a first class Open edX theme
LEARNER-2513
2017-09-07 13:44:02 -04:00
Andy Armstrong
0f808cec78 Implement theme admin UI to support previewing
LEARNER-2017
2017-07-27 17:24:31 -04:00
J. Cliff Dyer
f33832a691 scoutrule: dedupe skip_unless_lms 2017-01-18 09:43:46 -05:00
Hasnain
a29a2d4dbb Wl-613 | Removing the example theme. 2016-11-09 06:51:50 +00:00
Asad Iqbal
0b7ec75a3f Merge pull request #13492 from edx/asadiqbal08/WL-603-edx
WL-603 load locale paths for themes directories
2016-09-22 16:28:19 +05:00
asadiqbal
2833d1e9a5 WL-603 load locale paths for themes directories 2016-09-22 13:26:11 +05:00
Saleem Latif
b3def09383 check settings.DEFAULT_SITE_THEME to be not None before applying default theme 2016-09-19 12:57:50 +05:00
Saleem Latif
f974347dcb Update theming to have priority over microsites. 2016-09-01 14:57:52 +05:00
hasnain naveed
72581a08ce WL-474 | theme boilerplate 2016-08-19 09:18:52 -04:00
Ned Batchelder
8b1978ba6c Fix unused-import errors 2016-08-03 12:44:41 -04:00
Saleem Latif
6277bd27e6 Remove all usages of USE_CUSTOM_THEME and THEME_NAME from python files 2016-07-27 14:53:02 +05:00
Saleem Latif
8ae92901ef 1. Merge microsites into Comprehensive Theming
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
2016-07-27 13:55:14 +05:00
unawaz
5f8bb35f9d Account settings page
unawaz/ECOM-4787-account-settings-page-header
2016-07-20 20:18:53 +05:00
Saleem Latif
5ccc80b42f Fix footer test failures 2016-07-03 00:11:45 +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
Michael Frey
6efc461fb6 mjfrey/micro-settings-merge: Override base dictionary keys with microsite configuration keys
* mattdrayer: Add helpers.get_value test
* mattdrayer: Change to simpler implementation, per @douglashall
* mattdrayer: Address quality violations and test failures
2016-06-21 23:28:36 -04:00