Commit Graph

124 Commits

Author SHA1 Message Date
zubair-arbi
4040c45f06 update enterprise api support for request users and enterprise service user
ENT-624
2017-09-27 18:04:44 +05:00
Douglas Hall
610a4100af Revert "Initialize enterprise api client with provided user" 2017-09-20 09:55:02 -04:00
zubair-arbi
16120efaeb Initialize enterprise api client with provided user
ENT-624
2017-09-19 14:56:43 +05:00
Brittney Exline
ba597331d7 ENT-496 Set consent_granted to None when calling enterprise-course-enrollment endpoint
Since we have a separate call to grant consent, we shouldn't try to set that value on
the enterprise course enrollment anymore, because it causes errors.
2017-09-05 13:32:24 -04:00
Uman Shahzad
197c06a1e4 Bump edx-enterprise to 0.41.0.
This incorporates a migration that copies data
from certain models to another.
2017-08-31 10:41:45 -04:00
Michael Frey
8604a11c1f increase staff rate limit on enrollment API. 2017-08-29 08:52:27 -04:00
Calen Pennington
6c9b38dcfd Merge pull request #15877 from edx/ret/course-mode-factory
Use a consistent CourseModeFactory from the course_modes module, rath…
2017-08-23 14:16:54 -04:00
Calen Pennington
63244b514d Use a consistent CourseModeFactory from the course_modes module, rather than using one from student 2017-08-23 12:15:46 -04:00
Michael Frey
fb7b98da0b increase staff user rate limit 2017-08-17 16:23:10 -04:00
Jesse Shapiro
7a31441ebc Move to new consent API 2017-08-16 22:58:09 -04:00
Michael Frey
e35b35f6c2 Increase rate-limit staff or superusers for enrollment API. 2017-08-15 10:21:30 -04:00
Marko Jevtic
2a7b41673b [LEARNER-1104] Allow staff members to view enrollment for any user 2017-07-19 12:45:24 +00:00
Simon Chen
a3d511926f Allow enrollment into expired seats if the api is called by ecom service 2017-07-12 16:04:52 -04:00
Ivan Ivic
6e45f00041 Created new embargo check api
LEARNER-1523
LEARNER-1524
2017-06-26 15:02:04 -04:00
Clinton Blackburn
ab52966fdb Updated Enrollment API to always store enrollment attributes
Enrollment attributes are now always stored, regardless of whether an enrollment is being created or updated. This will ensure that learners who purchase paid modes, without first enrolling in a non-paid mode, can request refunds if they choose to un-enroll from a course run within the refund window.

LEARNER-1282
2017-06-05 11:04:57 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Andy Armstrong
0325425c8c Add data sharing consent redirect for more course tabs
LEARNER-394
2017-03-31 19:12:13 -04:00
Brandon DeRosier
cb85ef1f5b ENT-162 Create an enterprise enrollment during the enrollment flow 2017-02-23 19:15:20 -05:00
Clinton Blackburn
9d9cf1a84b Added support for JWT authentication to the Enrollment API
ECOM-7099
2017-02-23 18:20:36 -05:00
David Ormsbee
2051c90924 Test Speedup: Isolate Modulestore Signals
There are a number of Django Signals that are on the modulestore's
SignalHandler class, such as SignalHandler.course_published. These
signals can trigger very expensive processes to occur, such as course
overview or block structures generation. Most of the time, the test
author doesn't care about these side-effects.

This commit does a few things:

* Converts the signals on SignalHandler to be instances of a new
  SwitchedSignal class, that allows signal sending to be disabled.

* Creates a SignalIsolationMixin helper similar in spirit to the
  CacheIsolationMixin, and adds it to the ModuleStoreIsolationMixin
  (and thus to ModuleStoreTestCase and SharedModuleStoreTestCase).

* Converts our various tests to use this new mechanism. In some cases,
  this means adjusting query counts downwards because they no longer
  have to account for publishing listener actions.

Modulestore generated signals are now muted by default during test runs.
Calls to send() them will result in no-ops. You can choose to enable
specific signals for a given subclass of ModuleStoreTestCase or
SharedModuleStoreTestCase by specifying an ENABLED_SIGNALS class
attribute, like the following example:

    from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase

    class MyPublishTestCase(ModuleStoreTestCase):
        ENABLED_SIGNALS = ['course_published', 'pre_publish']

You should take great care when disabling signals outside of a
ModuleStoreTestCase or SharedModuleStoreTestCase, since they can leak
out into other tests. Be sure to always clean up, and never disable
signals outside of testing. Because signals are essentially process
globals, it can have a lot of unpleasant side-effects if we start
mucking around with them during live requests.

Overall, this change has cut the total test execution time for
edx-platform by a bit over a third, though we still spend a lot in
pre-test setup during our test builds.

[PERF-413]
2017-02-23 10:31:16 -05:00
Eric Fischer
4b794372cd Add registration tracks as valid bulk_email targets
Hackathon XV project
2017-01-12 15:05:49 -05:00
Anthony Mangano
0fd91f0739 add course_name to enrollment api reponse
ECOM-5936
2017-01-05 08:50:31 -05:00
Ahsan Ulhaq
2157202aaf Add log info for course enrollment
ECOM-4763
2016-11-16 12:00:28 +05:00
John Eskew
e3cb462d18 Move embargo from common to openedx/core/djangoapps. 2016-11-07 08:47:36 -05:00
tasawernawaz
84314e7a14 Revert "update error messages in enrollment API"
This reverts commit 21746f1e93.
2016-10-28 10:12:17 +05:00
Ayub khan
d3fcb44631 Merge pull request #13782 from edx/ECOM-5846
ECOM-5846 Add more logs for enrollment api
2016-10-19 11:51:04 +05:00
Ayub-Khan
d9e5c9e9ee added logs 2016-10-18 07:29:17 +00:00
Ahsan Ulhaq
21746f1e93 update error messages in enrollment API
ECOM-4763
2016-10-17 13:15:24 +05:00
Andy Armstrong
03c3ee53e5 Move cors_crsf to openedx/core 2016-10-14 13:59:01 -04:00
Nimisha Asthagiri
6793c8f6ab Move audit_log utility function to openedx/core 2016-10-07 13:25:08 -04:00
Calen Pennington
bc20a37c2b Simplify how shards are selected in CI 2016-08-03 16:23:02 -04:00
Ned Batchelder
eef964f5f6 Fix unused-variable errors 2016-08-03 12:44:41 -04:00
Ned Batchelder
8aae7bcee7 Fix redefined-function errors 2016-08-03 12:44:41 -04:00
Ned Batchelder
8b1978ba6c Fix unused-import errors 2016-08-03 12:44:41 -04:00
Tasawer
c6a6cdd72d Quality fixes.
ECOM-4214
2016-06-06 16:50:16 +05:00
Matt Drayer
a9b7e4c63d mattdrayer/course-mode-bulk-sku: Add new CourseMode field
* mattdrayer: Add bulk checkout link to course views
* asadiqbal08: MAYN-225 replace the "Verify Now" button by the "Go to Dashboard" button in case of themed sites.
* mattdrayer: Add bulk_sku check in courseware.views
2016-05-11 10:57:24 -04:00
Calen Pennington
853bfe7a36 Add a TestCase mixin for enabling caches in tests
By default, disable all caching in tests, to preserve test independence.
In order to enable caching, inherit from CacheSetupMixin, and specify
which cache configuration is needed.

[EV-32]
2016-05-04 14:51:30 -04:00
Calen Pennington
39ff841d1f Don't pass arguments to setUp (for UrlResetMixin)
The TestCase API doesn't accept arguments, so passing arguments for some
TestCase subclasses makes adding new inheritance/mixins tricky. Instead,
prefer configuration via class attributes for TestCases.
2016-05-04 11:34:51 -04:00
Ben Patterson
b9558a90f1 Create a 3rd explicit shard for unit tests.
More accurately, this creates a 4th shard because the
last shard is always the default.
2016-04-28 10:09:32 -04:00
Ben Patterson
551eaaf706 Enroll already-existing user to a course via management command.
Our current sandbox provisioning uses a create_user management command,
which creates and enrolls a user into a course. However, for TE-1128, we
will need a way to enroll the same user to multiple courses (which are
dynamic at time of provisioning). Using the existing management
command is no longer feasible for that, so we are using one that accesses
the enrollment API, which is the new standard for new enrollment capabilities.
2016-01-27 11:49:31 -05:00
Peter Fogg
17a69a30e4 Revert "Add options trailing slashes to the Enrollment API."
This reverts commit 3149aaa319.
2016-01-08 09:47:39 -05:00
Peter Fogg
3149aaa319 Add options trailing slashes to the Enrollment API.
This allows the edX REST API Client to perform a sucessful GET against
this API, since Slumber (which our client is based off of) appends the
trailing slash by default.
2015-12-22 14:52:27 -05:00
muzaffaryousaf
1616de5051 Bookmarks API.
TNL-2180
2015-12-17 22:07:30 +05:00
wajeeha-khalid
588833ff43 MA-1051: DiscussionAPI - Removed http errors from api.py and refactored to more specific errors 2015-12-16 21:23:51 +05:00
Nimisha Asthagiri
c14c146d0e Merge pull request #10841 from edx/mobile/optimize-course-api
Optimize Course Catalog using CourseOverview
2015-12-11 10:03:35 -05:00
Nimisha Asthagiri
2b8441a072 Update Course Catalog to use CourseOverview 2015-12-10 20:37:50 -05:00
Bill DeRusha
005e07cb95 Remove default course mode setting in enrollment api 2015-12-09 19:46:04 -05:00
Bill DeRusha
cdb3e99f39 Enrollment API determines best default enrollment if none passed 2015-12-09 14:50:49 -05:00
Peter Fogg
497622d4b4 Switch default course mode to 'audit'.
ECOM-2972
2015-11-25 11:22:29 -05:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00