Commit Graph

53 Commits

Author SHA1 Message Date
Edward Zarecor
c12c5c926d fixing post-release merge conflicts with DKH 2015-06-10 16:56:21 -04:00
Nickersoft
8c1d3ae412 Added includes_expired parameter to enrollment API
- Adding ?include_expired=1 to course detail requests will now include expired course verifications
2015-06-09 17:12:30 -04:00
jsa
445d0dabb6 Correct deactivation logic in enrollment api and test.
XCOM-396
2015-06-08 11:06:52 -04:00
jsa
445a0c938b Add tests for enrollment deactivation under various modes.
A bug with the creation of inactive honor enrollment modes was caught and fixed along the way.

XCOM-388
2015-06-04 09:40:54 -04:00
Bertrand Marron
e8bf151f3d Fix documentation comment for enrollment API 2015-05-25 16:56:25 +02:00
Renzo Lucioni
960b02cf98 Allow enrollment API to deactivate enrollments
Will allow Otto to revoke fulfillment of course seat products. Only server-to-server calls are currently allowed to deactivate or otherwise modify existing enrollments.
2015-05-18 19:44:02 -04:00
Ned Batchelder
78e9445aa1 Add super() calls to setUp/tearDown that are missing them
Also, I replaced a number of tearDown methods with addCleanup instead.
And also remove some unneeded patch.stopall() calls.
2015-05-14 18:14:21 -04:00
Clinton Blackburn
bfb201ec7d Merge pull request #7822 from edx/clintonb/receipt-page-update
Updated Receipt Page for Oscar
2015-05-02 09:32:11 -04:00
Clinton Blackburn
1a1fe56b29 Added Oscar-Compatible Receipt Page 2015-05-02 00:18:05 -04:00
Will Daly
5d16ed46a2 Enrollment API course details include credit modes.
Credit modes are hidden by default, since the user
isn't allowed to select them on the track selection page.
This commit exposes credit modes through the enrollment
API so that consumers can see that a course has a credit
track.
2015-05-01 12:36:30 -04:00
Mark Hoeber
568ed781c6 Updated enrollment api doc for new response fields
And cleaned up one doctoring
2015-04-23 15:17:47 -04:00
Will Daly
fc918fb3d1 Expose course start/end date in the enrollment API 2015-04-21 08:41:42 -04:00
jsa
46b63164a0 Implement profile_image upload and remove endpoints
TNL-1537

Co-Authored-By: Andy Armstrong <andya@edx.org>
Co-Authored-By: cahrens <christina@edx.org>
2015-04-17 17:23:12 -04:00
Clinton Blackburn
cd5039383e Returning complete URL for Enrollment API user messaging
The Enrollment API now returns the complete URL in the user_message_url field. Returning just the path can result in 404s if the consuming code simply redirects to the value of this field without first checking to see if the hostname is included. Using the full URL solves this problem for all clients.
2015-04-15 11:29:54 -04:00
Clinton Blackburn
e18d69a9e9 Fixed Embargo Bug in Enrollment API
This issue was not found sooner because the test helper used only tested for GeoIP embargoes, and neglected the user profile. An additional test has been added to test for embargoes against the country assigned to the user's profile. Additionally, variable names have been cleaned up--user replaced with username--to avoid confusion in the future.
2015-04-14 22:07:25 -04:00
zubair-arbi
a9b13f0e72 log and ignore invlaid/deleted courses in Enrollment API
ECOM-1273
2015-04-01 16:26:24 +05:00
Brian Wilson
243e2660b0 Merge release to master for 20150317 release. 2015-03-18 18:48:56 -04:00
Stephen Sanchez
4acfbbdf21 Reverting the change to add a 201_CREATED status to the enrollment API. 2015-03-18 20:31:58 +00:00
Stephen Sanchez
8c9f6370b8 Allow Enrollment API supports creating and upgrade course modes other than honor.
Fixing tests, cleaning up POST handler to be easier to read.

Wording fixed for unit test comments.
2015-03-18 17:12:02 +00:00
Stephen Sanchez
d901b1d3e3 Allow services to ignore user throttling. 2015-03-18 13:48:32 +00:00
Ned Batchelder
7d799e34f3 Remove unused imports 2015-03-17 07:10:31 -04:00
Andy Armstrong
6976a33a85 Add the preferences endpoint to the User API
TNL-1493

See https://openedx.atlassian.net/wiki/display/TNL/User+API for details
2015-03-16 23:34:35 -04:00
Awais
4bab316bb9 ECOM-911 no-id-professional mode registration flow 2015-03-13 10:03:05 +00:00
Will Daly
cbdc269b47 Cross-domain CSRF cookies
When configured, set an additional cookie with the CSRF
token for use by subdomains.

The cookie can have a different name than the default
CSRF cookie, preventing conflicts between cookies
from different domains (e.g. ".edx.org", "courses.edx.org",
and "edge.edx.org").

The new cookie is included only on the enrollment API
views so that the scope of this change is limited
to the end-points that require cross-domain POST requests.
2015-03-09 12:32:49 -04:00
Will Daly
7bad603978 Merge pull request #7076 from edx/will/deprecate-embargo
Deprecate old embargo implementation.
2015-03-03 15:54:41 -05:00
Diana Huang
1e4f1b5889 Allow the enrollment API to be accessed via API keys.
XCOM-107
2015-03-02 16:07:27 -05:00
Diana Huang
3b0bb11218 Add SKU to Course Modes
XCOM-94
2015-02-27 10:04:36 -05:00
Nimisha Asthagiri
b280e44fe1 Merge pull request #7025 from edx/mobile/oauth2-allow-inactive-user
MA-291 Allow API access without email activation.
2015-02-24 09:12:30 -05:00
Nimisha Asthagiri
83a3adb97b MA-291 Allow API access without email activation 2015-02-24 06:05:18 -05:00
Will Daly
ae8ddc8aee Deprecate old embargo implementation.
The new "country access" implementation replaces the old
implementation.  Middleware and tests have been updated
accordingly, but deprecated models are preserved
for backwards compatibility.
2015-02-23 15:48:04 -05:00
Akiva Leffert
003a9453ac Convert enrollment already exists errors to success.
JIRA: https://openedx.atlassian.net/browse/MA-290
2015-02-20 19:31:21 -05:00
Akiva Leffert
388139778d Add optional email_opt_in parameter to enrollment end point.
JIRA: MA-286
2015-02-12 10:40:27 -05:00
Will Daly
e609f982d7 Country Access: block enrollment
Block users from enrolling in a course if the user
is blocked by country access rules.

1) Enrollment via the login/registration page.
2) Enrollment from the marketing iframe (via student.views.change_enrollment)
3) Enrollment using 100% redeem codes.
4) Enrollment via upgrade.

This does NOT cover enrollment through third party authentication,
which is sufficiently complex to deserve its own commit.
2015-02-10 13:07:51 -05: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
Awais
f3bf66c1c0 ECOM-763 handling InvalidKeyError exception. 2015-01-30 11:41:30 +05:00
Will Daly
305f0c3338 Can disable rate limiting for enrollment API end-points using model-based configuration. 2015-01-26 15:28:04 -05:00
Stephen Sanchez
6616b7b5c9 Merge pull request #6731 from edx/sanchez/cache_course_enrollment_details
Adding caching to the course details endpoint for the Enrollment API.
2015-01-23 08:55:02 -05:00
stephensanchez
896bc1c859 Adding caching to the course details endpoint for the Enrollment API. 2015-01-22 20:58:22 +00:00
stephensanchez
2d1d58225a Allow the enrollment API to be used without knowing the authenticted user name. 2015-01-22 19:50:02 +00:00
Mark Hoeber
a28fd30b09 Enrollment API Doc 2015-01-12 11:15:32 -05:00
stephensanchez
22a18e350d Updating the design of the DRF views for enrollments.
Consolidate PUT and POST on the RESTful Layer.

Change URLs for API

Test cleanup.

Adding a course details URL to the enrollment API.

Change student to user

Change to v1, remove feature flag from API URLs

Updating student to user in tests

Re-ordering redirect urls to be evaluated last.

Adding pagination and testing.

Adding Django REST settings for pagination.

Revert "Re-ordering redirect urls to be evaluated last."

This reverts commit 4c9502daa383e49b46f8abec5456c271e5e24ccb.

Re-ordering redirect urls to be evaluated last.

Conflicts:
	common/djangoapps/enrollment/urls.py

Revert "Adding Django REST settings for pagination."

This reverts commit 9f8a54c41f34caa24818c88f1e75ac59f6ce5259.

Conflicts:
	common/djangoapps/enrollment/urls.py

Revert "Adding pagination and testing."

This reverts commit 0b2d46262abb78f5ad170700205e7fd28b6af942.

Additional testing, logging, and error messages.
2014-12-18 15:39:01 +00:00
stephensanchez
7c78a0999a Code review comments 2014-12-04 16:16:32 +00:00
Sarina Canelake
e0f1d3f3f3 s/pylint: disable=C0111/pylint: disable=missing-docstring/ 2014-12-01 11:22:09 -05:00
stephensanchez
7d36d11b35 Remove enrollment updates from the Enrollment API. 2014-11-20 09:36:30 -05:00
stephensanchez
75e45bc2ee Update the API and Data Layer to get the student from the models. 2014-11-17 15:09:33 +00:00
Will Daly
92d10ebd17 Respond to code review feedback 2014-11-17 08:58:56 -05:00
Renzo Lucioni
8d02efb021 Clean up pep8 and pylint violations
Also fixes failing Python unit tests
2014-11-12 12:55:56 -05:00
Will Daly
b8f5be2cdd Allow inactive users to modify their own enrollments 2014-11-10 08:10:47 -05:00
Will Daly
578c04f62f Put logistration page behind a feature flag 2014-11-07 13:05:17 -05:00
Will Daly
e629ce2ba6 Move redirection/enrollment to AccessView and trigger it using an event.
Ensure window.isExternal is loaded

Don't set a default for terms of service

For paid courses, add the course to the cart and redirect to the shopping cart view.

Don't send form method and url as form data.

Stub window.analytics in the access view test.
2014-11-07 12:59:08 -05:00