Commit Graph

51 Commits

Author SHA1 Message Date
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00
Awais Qureshi
922c25f154 BOM-2374
Run Pyupgrade on entitlement.
2021-02-23 16:08:26 +05:00
usamasadiq
e1ed3211c1 Applied pylint-amnesty to common/djangoapps/entitlements 2021-02-04 15:33:25 +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
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Calen Pennington
4901dde748 Clean up pylint errors to get diff-quality to pass 2020-02-06 09:18:30 -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
Calen Pennington
675b8c0d71 CourseOverviews may be deleted, but we don't want to delete related objects 2020-01-15 15:23:51 -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
Hassan Javeed
596cbbdf6c Add history to CourseEntitlementSupportDetail 2019-12-17 19:10:45 +05:00
Awais Qureshi
2cf8341189 Merge pull request #22138 from edx/awais786/BOM-968
BOM-968
2019-10-25 14:55:27 +05:00
Jason Myatt
c30865cce6 Allow empty order numbers in django admin for Entitlements 2019-10-24 12:52:41 -04:00
Awais Qureshi
6abaf893f1 BOM-968
Fixing migrations.
2019-10-24 15:21:13 +05:00
Ayub khan
5c47a3b425 BOM Project
Updated __unicode__ to __str__
2019-09-25 18:31:54 +05:00
Troy Sankey
df8f581d36 Add history to CourseEntitlement
DE-1510
2019-06-04 13:52:17 -04:00
Amit
a10fbd682c INCR-231: Run python-modernize and isort at common/djangoapps/entitlements (#20515) 2019-05-10 11:14:18 -04:00
Julia Eskew
368f221f0a Initial start on annotations. 2019-02-19 11:24:21 -05:00
Matthew Piatetsky
9681ca36b8 fix unicode strings in common/ 2019-02-05 10:57:00 -05:00
Waheed Ahmed
711343a7c7 Fix entitlement expiring on switching session.
LEARNER-6313
2018-09-04 11:38:58 +05: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
Tyler Hallada
1540f9ec72 Add on_delete kwarg to ForeignKey & OneToOneFields
Django 2.0 will make this field required for `ForeignKey` and `OneToOneFields`.
In previous versions the option defaulted to `models.CASCADE` when not
specified. This change should make the deprecation warnings in the current
Django version go away.

The migrations where also modified, but the changes should not cause a change in
the database schema since `models.CASCADE` was already the old default.
2018-06-05 17:05:12 -04:00
McKenzie Welter
435c3c6338 mark support (re)issued entitlements as unrefundable 2018-04-12 12:16:37 -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
e5d1f04a89 move support actions to existing entitlement api 2018-03-22 16:11:46 -04:00
Albert St. Aubin
7a02324bf1 Updating the default long term expiration to be 730 days for entitlements
[LEARNER-4494]
2018-03-21 15:45:38 -04:00
Waheed Ahmed
7128370666 Fix None type entitlement passing.
LEARNER-4513
2018-03-16 16:41:49 +05:00
Michael LoTurco
a4f294b441 Add convenience functions for Entitlement Support Tool
Adds getter for ecommerce order dashboard url and for getting
the entitlement support details reasons.

Learner-3925
2018-03-06 17:49:08 -05:00
Michael LoTurco
d6f910d5da Remove reference to reason field, add action field
As work progressed on entitlement support tool,
additional clarity around the entitlement support
detail fields was needed, this adds the action field
at a later point the reason field will be removed

Learner-3925
2018-03-06 13:35:17 -05:00
Albert St. Aubin
8c5e37ba20 Added entitlement redeemability method to the check for fulfillable
entitlements

[LEARNER-3898]
2018-02-22 15:00:19 -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
Michael LoTurco
82f4ce4252 Add CourseEntitlementSupportDetail model and related admin model
Learner-3919
2018-02-12 11:43:44 -05:00
Nimisha Asthagiri
2e9efe6472 Fix Certificates import and signals code 2018-01-19 15:12:28 -05:00
Albert St. Aubin
2e99ee0d7f Changes the Program Details page to show the most recently purchased
entitlement data

[LEARNER-3708]
2018-01-12 15:03:25 -05:00
Jeremy Bowman
1a7753d775 PLAT-1881 Fix datetimes lacking timezone information 2018-01-10 14:33:01 -05:00
Harry Rein
b404173046 Show more sessions coming soon on course dashboard.
LEARNER-3808

Ensures that users can see their entitlement purchase whether there
are available sessions or not. Notifies them with a message stating that
more sessions are coming soon, as is currently implemented on the programs
dashboard.
2018-01-09 13:04:36 -05:00
Jeff LaJoie
14986264d9 LEARNER-3638: Fixes expiration issues for learners who upgrade late into a course 2017-12-21 10:44:02 -05:00
Harry Rein
75aa736dcf Do not show expired, unfulfilled entitlements on course/programs dashboard.
LEARNER-3636
2017-12-18 15:16:35 -05:00
Albert (AJ) St. Aubin
365b4fb312 Merge pull request #16920 from edx/aj/add_is_expired_check_to_policy
Aj/add is expired check to policy
2017-12-15 12:42:45 -05:00
Albert St. Aubin
3fbb1571df Update to policy check utilities for Course Entitlements 2017-12-15 11:32:33 -05:00
Harry Rein
610c255bb6 Display the expired at logic for entitlements.
LEARNER-3304

Displays the expired out status for the course dashboard and the programs pages.
2017-12-15 08:25:38 -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
Harry Rein
2711fb521a Allowing a user to fulfill their entitlement on the programs dashboard.
LEARNER-3438

The user can now enroll in a session, unenroll from a session or change session
from a new course enrollment card on the programs dashboard.
2017-12-12 10:35:26 -05:00
McKenzie Welter
853cd9a0a7 show programs in which user holds a course entitlement on programs listing page 2017-12-11 12:22:36 -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
Anthony Mangano
f72cf800e1 Consider user entitlements and use entitlement products in bundle one-click purchase 2017-11-30 13:59:46 -05:00
Albert St. Aubin
113e0af104 Added Entitlement API
The Entitlement API will allow for GET, POST, DELETE(Revoke), and
variations of these methods of managing and retrieving data about
Learner Entitlements.
[LEARNER-2661]
2017-11-08 10:03:38 -05:00