Commit Graph

54 Commits

Author SHA1 Message Date
iamsobanjaved
82dd040382 fixed deprecated django-filter features 2020-02-06 18:32:36 +05:00
Zainab Amir
4b458099cf Add unique_together to CourseEntitlement (#22948)
Add unique_together on course_uuid and order_number to avoid
duplicate records

PROD-1064
2020-02-03 13:21:44 +05:00
Awais Qureshi
8b3b045803 BOM-1084
Bump django-filter.
Rename the name to field-name.
2020-01-13 20:25:44 +05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -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
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Ned Batchelder
b3a731550c Fix problems that drf-yasg uncovered.
These were originally fixed individually, but had to be reverted, and
are now combined in one commit.  The originals were:

7b9040f6b0 This enum was backwards
8774ff1f9b Use ref_name to disambiguate serializers that drf-yasg would otherwise assume are the same.
8a44397139 Is this field missing because it is None?
4a1154a7ca Give a safer buffer for clearing the rate limiting
64c47856dd DRF 3.7.4 changed how you delegate to another view, so don't
7359ca4fb2 Is this right? It fixes two tests
fdd66e5390 Adjust the expected error message for DRF 3.7.7
9257f68fd8 The default TIME_ZONE should be UTC
2019-06-21 18:04:15 -04:00
Ned Batchelder
39c7a2db7c Revert "Use drf-yasg for Open API documentation" 2019-06-11 16:05:00 -04:00
Ned Batchelder
8a44397139 Is this field missing because it is None? 2019-06-10 15:27:39 -04:00
Anthony Wee
2ab8794c78 INCR-131: Run python-modernize on common/djangoapps/entitlements/api (#20448)
* INCR-131: Run python-modernize on common/djangoapps/entitlements/api

* isort
2019-05-07 13:05:21 -04:00
Ned Batchelder
046fe60913 Remove unused imports 2018-11-07 10:31:51 -05:00
Dillon Dumesnil
ac43d5faac Adding email opt in to create entitlement 2018-10-23 17:33:30 -04:00
Robert Raposa
fbc59231fc Update edx-drf-extensions to 2.0.0.
Note: this version update is backward incompatible.

ARCH-255
2018-10-17 01:00:34 -04:00
Waheed Ahmed
e3dbfe9c0f Fix refund entitlement on audit course un-enroll.
LEARNER-6247
2018-08-27 17:47:59 +05:00
Waheed Ahmed
2849d8f572 Fix unenroll entitlement from instructor dashboard.
LEARNER-5620
2018-07-19 14:52:23 +05: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
J Eskew
edbdae9fb8 Merge pull request #18124 from edx/jeskew/fix_some_django20_deprecation_warnings
Fix more Django 2.0 deprecation warnings around URLconfs.
2018-05-08 16:29:12 -04:00
Douglas Hall
c6ec5edbf7 Add API documentation with django-rest-swagger. 2018-05-08 14:38:33 -04:00
John Eskew
e5ee0fc91f Remove more unneeded 'namespace=' params. 2018-05-07 18:25:36 -04:00
John Eskew
ffb1f9fe2a Fix more Django 2.0 deprecation warnings around URLconfs. 2018-05-03 13:50:08 -04:00
McKenzie Welter
435c3c6338 mark support (re)issued entitlements as unrefundable 2018-04-12 12:16:37 -04:00
Albert St. Aubin
1d9b3842ef Corrects issue with Entitlement Auto upgrade and Soft Upgrade deadline
issues

[LEARNER-4493]
2018-03-29 12:27:28 -04:00
McKenzie Welter
cc19e50590 add mode field to entitlement policy model and set custom policy on entitlement create 2018-03-28 12:53:20 -04:00
McKenzie Welter
a6ac6781c3 include created datetime in entitlement support detail serializer 2018-03-23 11:19:38 -04:00
McKenzie Welter
e5d1f04a89 move support actions to existing entitlement api 2018-03-22 16:11:46 -04:00
Albert St. Aubin
bd9fedb27b corrected another enrollment edge case 2018-03-09 09:48:33 -05:00
George Babey
3e840ff268 Merge pull request #17497 from edx/gbabey/move_paginators
Moved pagination to edx_rest_framework_extensions package
2018-02-23 15:24:40 -05:00
George Babey
1c7720a561 Bump drf-extensions for pagination move 2018-02-23 14:20:00 -05:00
Albert St. Aubin
b56fdcc652 Changes to auto enroll users using their entitlement if they have one
available.

[LEARNER-3898]
2018-02-21 11:17:02 -05:00
Michael LoTurco
449c6903a6 Add Support endpoint for Course Entitlements 2018-02-20 13:20:47 -05:00
George Babey
26bac9f611 Moved paginators to edx_rest_framework_extensions package
Pagination should be standard and easy to adopt so moved the paginators
into the edx_rest_framework_extensions package so they can be easily
installed into other app/projects
2018-02-16 09:46:01 -05:00
Albert St. Aubin
ddab8123c1 Updates to the Course Entitlement API to block Learners from enrolling
in runs that are not available.

[LEARNER-3800]
2018-01-30 09:52:06 -05:00
Albert (AJ) St. Aubin
01553ff1bc Revert "Aj/learner 3800" 2018-01-30 09:45:05 -05:00
Albert St. Aubin
12e77b27e4 PR updates 2018-01-29 12:22:56 -05:00
Albert St. Aubin
3876a823f8 pr 2018-01-29 11:15:33 -05:00
Albert St. Aubin
1bd4bde9a4 PR and quality updates 2018-01-29 09:07:29 -05:00
Albert St. Aubin
cac22680e2 Updates to the Course Entitlement API to block Learners from enrolling
in runs that are not available.

[LEARNER-3800]
2018-01-25 14:53:03 -05:00
Albert St. Aubin
f0436aa832 Refactor of the CourseEntitlement Refund API to handle refund failures
[LEARNER-3629]

The CourseEntitlement Refund API will not respond with ERROR codes when
the attempted refund call to Ecommerce fails.
2018-01-24 14:46:58 -05:00
Albert St. Aubin
e23def673b Increased the page size for the entitlements API 2018-01-18 10:19:55 -05:00
Jeremy Bowman
1a7753d775 PLAT-1881 Fix datetimes lacking timezone information 2018-01-10 14:33:01 -05:00
Albert (AJ) St. Aubin
e53013ec70 Revert "Refactor of the CourseEntitlement Refund API to handle refund failures" 2018-01-04 14:28:12 -05:00
Albert St. Aubin
417ef0583b Refactor of the CourseEntitlement Refund API to handle refund failures
[LEARNER-3629]

The CourseEntitlement Refund API will not respond with ERROR codes when
the attempted refund call to Ecommerce fails.
2018-01-04 11:02:13 -05:00
Michael LoTurco
2807d9915e Add enrollment_course_run to entitlementserializer
The marketing site currently cannot use the entitlement
api to determine whether a user has an unfilled entitlement.
Including the entitlement enrollment_course_run makes this
information accessible to consumers of the entitlement API.

Learner-3731
2018-01-03 11:28:53 -05:00
Michael LoTurco
f5bc89f1b5 Only upgrade active enrollments for entitlements 2017-12-22 10:25:07 -05:00
Michael LoTurco
f0ab07a154 Upgrade audit enrollments on entitlement purchase
Adds check for existing upgradeable enrollment on user entitlement
creation, if single upgradeable enrollment is present, upgrades enrollment
to entitlement mode and links the entitlement to the upgraded enrollment

LEARNER-3579
2017-12-19 14:54:10 -05:00
Albert St. Aubin
d6feff0ade Minor fixes and code changes to the Entitlement Refund API
[LEARNER-2668]
2017-12-14 09:46:47 -05:00
Albert St. Aubin
1d7443221d Entitlement API Changes to support User Revoke and Refund
[LEARNER-2668]

These changes will support a user intiated Revoke and Refund of
an Entitlement. This includes unenrolling the User from
any related Course Runs they are currently enrolled in.
2017-12-13 13:37:14 -05:00
Albert St. Aubin
0ea3753d94 Added Entitlement enroll and unenroll logic to the Enrollment API
[LEARNER-3136]

This commit containts the logic and API endpoint for a user to Enroll,
Unenroll, and switch-session on a Course Entitlement.
2017-12-07 10:54:59 -05:00
Jeff LaJoie
a567719236 LEARNER-2983: Adding of helper functions and modification of DRF to use SiteConfiguration policy 2017-12-06 08:36:21 -05:00
Albert St. Aubin
dfa7b73a61 Updates to the API Endpoint to remove the Staff users ability to get all
Entitlements
2017-12-04 08:37:15 -05:00