Commit Graph

142 Commits

Author SHA1 Message Date
Sarina Canelake
e53b9c83d9 Use Django 1.4 @ensure_csrf_cookie method PLAT-664 2015-06-06 08:48:36 -04:00
Carson Gee
681b9a5ea7 Remove anonymous caching when SSL is enabled 2015-04-30 10:50:19 -04:00
Ned Batchelder
425b766965 Remove TEST_DATA_MOCK_MODULESTORE 2015-03-17 17:21:52 -04:00
Ned Batchelder
7d799e34f3 Remove unused imports 2015-03-17 07:10:31 -04:00
Calen Pennington
b353ed2ea2 Better support specifying of modulestore configuration in test cases
The existing pattern of using `override_settings(MODULESTORE=...)` prevented
us from having more than one layer of subclassing in modulestore tests.

In a structure like:

    @override_settings(MODULESTORE=store_a)
    class BaseTestCase(ModuleStoreTestCase):
        def setUp(self):
            # use store

    @override_settings(MODULESTORE=store_b)
    class ChildTestCase(BaseTestCase):
        def setUp(self):
            # use store

In this case, the store actions performed in `BaseTestCase` on behalf of
`ChildTestCase` would still use `store_a`, even though the `ChildTestCase`
had specified to use `store_b`. This is because the `override_settings`
decorator would be the innermost wrapper around the `BaseTestCase.setUp` method,
no matter what `ChildTestCase` does.

To remedy this, we move the call to `override_settings` into the
`ModuleStoreTestCase.setUp` method, and use a cleanup to remove the override.
Subclasses can just defined the `MODULESTORE` class attribute to specify which
modulestore to use _for the entire `setUp` chain_.

[PLAT-419]
2015-02-04 09:09:14 -05:00
Renzo Lucioni
a8bed5ce98 Make logistration generally available if feature flag is active
Makes logistration available at /login and /register as well as /accounts/login/ and /accounts/register/. In addition:

- Adds support for redirect URLs in third party auth for combined login/registration page
- Adds support for external auth on the combined login/registration page
- Removes old login and registration acceptance tests
- Adds deprecation warnings to old login and register views
- Moves third party auth util to student_account
- Adds exception for microsites (theming)
2015-01-30 13:28:30 -05:00
Jason Bau
0ba1828f93 Fix shib code to handle course.enrollment_domain=None 2015-01-14 14:36:33 -08:00
Will Daly
8580620b52 Revert "If feature flag is enabled, replace the old login/registration pages with the new combined login/registration page."
This reverts commit f40447b3c8.

Conflicts:
	lms/urls.py

Revert "Add support for external auth on the combined login/registration page"

This reverts commit 988753395f.

Conflicts:
	lms/templates/courseware/mktg_course_about.html
	lms/urls.py
2014-12-05 10:41:42 -05:00
Will Daly
988753395f Add support for external auth on the combined login/registration page
Add support for redirect URLs in third party auth for combined login/registration page

Remove old login/registration acceptance tests

Add deprecation warnings to old login and register views

Move third party auth util to student_account

Add exception for microsites
2014-12-04 09:34:51 -05:00
Jesse Zoldak
121b31309d Small fixes to modulestore test refactoring 2014-12-02 07:09:37 -05:00
Jesse Zoldak
bf3b87bc64 Clean up all modulestore testcases
Move modulestore config for tests to an importable location
Disable pylnt warning for lms imports in common tests
Refactor all testcases that loaded all xml courses
TE-610
TE-489
2014-12-02 07:09:36 -05:00
Sarina Canelake
520935209d s/pylint: disable=W0402/pylint: disable=deprecated-module/ 2014-12-01 11:22:12 -05:00
Sarina Canelake
b127d2844b s/pylint: disable=C0103/pylint: disable=invalid-name/ 2014-12-01 11:22:09 -05:00
Sarina Canelake
0dad9da5e4 s/pylint: disable=W0621/pylint: disable=redefined-outer-name/ 2014-12-01 11:22:08 -05:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
Diana Huang
0c6cba73ac Handle OpenID errors for POST requests.
ECOM-441
2014-10-15 16:33:31 -04:00
Renzo Lucioni
bd7715a393 Clean up after track selection experiment 2014-10-14 13:56:49 -04:00
David Baumgold
9c81004fc7 Remove test cleanups
Since `ddt` should make them unnecessary
2014-10-02 12:18:16 -04:00
David Baumgold
62fcc6f23a Use ddt for shib tests 2014-10-02 12:18:15 -04:00
Waheed Ahmed
a1e911ae39 Fixed InvalidKeyError in course handler in studio.
LMS-11141
2014-09-12 15:16:36 +05:00
Jason Bau
4d5a2380f1 external_auth: handle request.META values as str, not unicode 2014-09-03 12:07:35 -07:00
Will Daly
714f9bb69f Auto enroll students even if there are multiple course modes
Add session middleware to an external auth test to fix a test failure with the auto-registration AB-test changes
2014-08-15 10:26:27 -04:00
Waheed Ahmed
05b87fd99b Implemented process_response method to clear requestcontext global variable in mako middleware.
LMS-6622
2014-08-06 19:58:20 +05:00
Jason Bau
e1fcac93c5 fix shib reg from course about page 2014-07-17 10:51:32 -04:00
Jason Bau
e9022e74a8 Hotfix course_specific_reg/login for OpaqueKeys 2014-07-16 10:18:21 -04:00
Don Mitchell
639658913d Refactor split migrator
LMS-2936

Also, a bunch of ancillary cleanups.

Conflicts:
	common/lib/xmodule/xmodule/modulestore/tests/test_publish.py

Conflicts:
	cms/djangoapps/contentstore/management/commands/migrate_to_split.py
	cms/djangoapps/contentstore/management/commands/tests/test_rollback_split_course.py
	common/lib/xmodule/xmodule/modulestore/__init__.py
	common/lib/xmodule/xmodule/modulestore/mixed.py
	common/lib/xmodule/xmodule/modulestore/mongo/draft.py
	common/lib/xmodule/xmodule/modulestore/split_migrator.py
	common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
	common/lib/xmodule/xmodule/modulestore/tests/test_split_migrator.py
	common/lib/xmodule/xmodule/modulestore/tests/test_split_w_old_mongo.py
2014-07-14 11:20:29 -04:00
Nimisha Asthagiri
8855b12b76 Update tests to allow LMS tests to use published branch setting.
Conflicts:
	cms/djangoapps/contentstore/views/tests/test_container_page.py
	common/djangoapps/external_auth/tests/test_shib.py
	common/djangoapps/student/tests/test_login.py
	common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
	common/lib/xmodule/xmodule/modulestore/tests/factories.py
	common/lib/xmodule/xmodule/modulestore/xml_importer.py
	lms/djangoapps/branding/tests.py
	lms/djangoapps/courseware/tests/test_submitting_problems.py
	lms/djangoapps/courseware/tests/test_video_handlers.py
	lms/djangoapps/instructor_task/tests/test_base.py
	lms/djangoapps/instructor_task/tests/test_integration.py
2014-07-09 21:10:12 -04:00
Nimisha Asthagiri
ea32529866 Fix all modulestore calls to pass in user ids. 2014-07-09 21:10:12 -04:00
Nimisha Asthagiri
a9213509c3 Enable Mixed Modulestore STUD-1540
Refactor get_parent_locations STUD-1663
2014-06-26 18:00:11 -04:00
Sarina Canelake
2aea261d48 Merge branch 'release'
Conflicts:
	common/djangoapps/course_modes/views.py
	common/djangoapps/student/tests/test_roles.py
	common/djangoapps/student/views.py
	common/lib/opaque_keys/opaque_keys/__init__.py
	common/lib/opaque_keys/opaque_keys/tests/test_opaque_keys.py
	common/lib/xmodule/xmodule/contentstore/mongo.py
	lms/djangoapps/certificates/management/commands/gen_cert_report.py
	lms/djangoapps/notes/views.py
2014-06-10 16:59:23 -04:00
Don Mitchell
2c6437a279 Fix performance regression
Remove course_from_id
don't fetch whole course when the root will do
don't fetch even the root if the id will do
check for definition.data == null
2014-06-09 15:10:47 -04:00
Julia Hansbrough
6ccb11f03e Change Location, CourseLocator, etc to reference opaque-keys library 2014-05-30 20:32:38 +00:00
Calen Pennington
cfcbdc0145 Move to OpaqueKey implementations from the external library
[LMS-2757]
2014-05-29 17:03:35 -04:00
Calen Pennington
cd862b3253 Merge remote-tracking branch 'edx/master' into opaque-keys
Conflicts:
	cms/djangoapps/contentstore/tests/test_contentstore.py
	cms/djangoapps/contentstore/views/component.py
	cms/djangoapps/contentstore/views/item.py
	cms/djangoapps/contentstore/views/preview.py
	cms/djangoapps/contentstore/views/tests/test_container.py
	cms/static/js/spec/views/unit_spec.js
	cms/static/js/utils/module.js
	cms/templates/container.html
	cms/templates/studio_vertical_wrapper.html
	cms/templates/studio_xblock_wrapper.html
	common/djangoapps/student/views.py
	lms/templates/notes.html
	lms/templates/textannotation.html
	lms/templates/videoannotation.html
2014-05-22 10:52:00 -04:00
Jason Bau
411dc09af7 Autoactivate inactive users on external_auth login
Conditional on existing flag BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH
2014-05-19 13:35:35 -07:00
Calen Pennington
16faafded9 Fix ssl redirection test 2014-05-13 14:13:45 -04:00
Calen Pennington
37b1a2f738 Remove calls to loc_mapper 2014-05-12 16:34:53 -04:00
Calen Pennington
a4df0e1515 Fix failing tests 2014-05-12 14:45:38 -04:00
Calen Pennington
85ca7db7a6 Fix merge conflicts relative to master 2014-05-12 11:42:21 -04:00
Calen Pennington
19acdd31e8 Merge remote-tracking branch 'edx/master' into opaque-keys-merge-master
Conflicts:
	cms/djangoapps/contentstore/views/public.py
	common/djangoapps/external_auth/tests/test_ssl.py
	common/djangoapps/student/views.py
	lms/djangoapps/dashboard/sysadmin.py
	lms/templates/notes.html
2014-05-12 11:35:03 -04:00
Carson Gee
cbf525f6cf Fix infinite redirect loop on logout caused by django caching 2014-05-09 14:22:11 -04:00
Carson Gee
5452de20d8 Modified ssl certificate authentication to handle next redirection
Makes small changes in lms and cms both so that user's go to the
original page they intended to if they weren't already logged in
2014-05-09 14:22:10 -04:00
Calen Pennington
e2bfcf2a36 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit updates common/djangoapps.

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]
2014-05-07 12:54:49 -04:00
Chris Dodge
fe3ebca1c5 add new feature to make sure we aren't writing PII into the application logs. So far we're aware of doing so regarding Auth use-cases 2014-02-25 00:14:19 -05:00
Carson Gee
3303fb120b Review fixes 2014-02-21 16:01:01 -05:00
Carson Gee
082f20db60 Remove SSL Certifcate auth reliance on internal password 2014-02-21 12:19:59 -05:00
Don Mitchell
b8ea7f3c43 update_item and other refactorings continued 2014-02-05 10:24:24 -05:00
Don Mitchell
c601b75675 MixedModulestore wraps most getters, update_item, delete_item
with code to translate between addressing schemes based on app
and persistence layer addressing scheme specification.

STUD-1206
2014-02-05 09:34:30 -05:00
Carson Gee
8cbe263ca0 Rename of feature AUTH_USE_MIT_CERTIFICATES to AUTH_USE_CERTIFICATES across platform.
Caution! This is backwards incompatible
2014-02-04 10:50:48 -05:00
Carson Gee
2bf6df23c8 More fully integrate and test ssl external auth in CMS 2014-02-03 14:00:40 -05:00