Commit Graph

34 Commits

Author SHA1 Message Date
Usama Sadiq
55661b441d refactor: ran pyupgrade on openedx/core/djangoapps/credit (#26848) 2021-03-16 15:16:31 +05:00
Aarif
27480cdd2f Removed deprecated future imports 2020-06-23 18:51:43 +05:00
Troy Sankey
1178ad8b8b Rename order in CreditRequirement (3/3)
This stage does the following:

- Includes a migration to delete the old column.
- NO code changes.
2020-01-07 19:17:56 +05:00
Troy Sankey
407c8cb076 Rename order in CreditRequirement (2/3)
This stage does the following:

- Includes a data migration to copy the values from old to new field.
- Changes business logic to switch to using new field.
- Deletes all code references of the old field.
2020-01-03 18:07:28 +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
Troy Sankey
52eae381ac Rename order in CreditRequirement (1/3)
This stage does the following:

- Adds the new field and migration to create the column.
- Makes all* writes go to both old and new field.

(*) Except for writes from the Django Admin for this model.  I confirmed
with Support that CreditRequirements are never edited through the Django
Admin interface.  Additionally, I confirmed via the django_admin_log
that there is no record of anybody changing any CreditRequirements.
2019-12-19 15:42:46 +05:00
Manjinder Singh
6f1be3ed2c BOM-933: Fix type mismatches in various migrations 6 (#22170)
* Fix type mismatches in coursewaqre

* Fix type mismatch in credit migrations

* Fix type mismatch in status migrations

* Fix type mismatch in user_api migrations

* Review Fixes
2019-10-29 10:36:10 -04:00
Michael Youngstrom
ef6e03f32b INCR-182 2019-03-29 09:47:35 -04: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
Jeremy Bowman
bf86b3da98 PLAT-1942 Handle xmodule_django field deprecations 2018-02-05 15:05:54 -05:00
John Eskew
194413cdf9 Add migrations which remove HistoricalRecord tables. 2017-10-12 11:20:25 -04:00
John Eskew
3614eb2800 Move xmodule_django app to openedx.core.djangoapps 2016-10-06 14:50:40 -04:00
Clinton Blackburn
28d4e2e8f4 Updated credit admin
ECOM-4379
2016-05-11 22:28:12 -04:00
Awais
a154e7f1c3 Adding the ecom api functionality for the credentials.
ECOM-2931
2016-03-22 14:01:54 +05:00
Clinton Blackburn
c6bfac720f Updated credit migration for CreditProvider.provider_id
There is no need for a separate migration for the validation. Updated the regex in the initial migration to appease Django.

ECOM-2609
2015-11-25 14:52:34 -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
Awais
1d2bc6fd67 ECOM-1807 Adding provider thumbnail url. 2015-07-27 20:04:05 +05:00
Ahsan Ulhaq
06b085f8b4 credit eligibility and payment receipt email
ECOM-1796
ECOM-1525
2015-07-22 12:34:38 +05:00
zubair-arbi
71ce4d071b add 'provider_description' field for CreditProvider model
ECOM-1842
2015-07-09 13:13:37 +05:00
zubair-arbi
8a65167d79 Merge pull request #8795 from edx/zub/story/ecom-1815-update-creditprovider-model
add 'fulfillment_instructions' for 'CreditProvider' model
2015-07-09 12:04:53 +05:00
Will Daly
4b64df74b1 Fix migrations 0012 and 0013 in the credit app
Adds the "order" field that was introduced in 0011 to the "models"
dictionary of migrations 0012 and 0013 so South knows that
the field should exist after 0011 is run.
2015-07-08 16:55:37 -04:00
zubair-arbi
66e18eda56 add 'fulfillment_instructions' for 'CreditProvider' model + add api method to get credit provider data
ECOM-1815
2015-07-08 15:12:36 +05:00
Will Daly
e2acf3ab87 Credit eligibility/provider refactor
* Remove m2m relation between credit course and credit providers.
* Separate eligibility and provider APIs into different modules.
* Add API call for retrieving a user's eligibilities.
* Cache credit course list.
* Style the dashboard purchase button.
* Display a link for the credit provider on the dashboard.
* Add analytics events for clicks on the purchase button.
* Expose more credit models to Django admin and add search functionality.
2015-07-02 10:03:52 -07:00
Ahsan Ulhaq
7787974dd5 Order of Credit Eligibility line items
Displayed eligibility line items on the Progress page of a Credit course
in the order of appearance in the courseware.

ECOM-1782
2015-07-01 13:40:39 +05:00
Will Daly
75d194e279 Update credit eligibility
* Update credit eligibility when a user satisfies an eligibility requirement.
* Refactor set_credit_requirement_status arguments.
* Use django-simple-history to track requirement status changes.
* Refactor progress page by moving credit into a helper function and adding comments.
2015-06-24 15:19:27 -07:00
aamir-khan
987889fc37 ECOM-1524: Display credit availability on the dashboard 2015-06-24 16:50:38 +05:00
Will Daly
c426f5506b Respond to code review feedback. 2015-06-22 10:11:28 -07:00
Will Daly
8988aa1c9e Credit provider integration Python API
* Add end-point for initiating a request for credit from a provider.
* Add an end-point for a provider to update the status of a request (approved / denied).
2015-06-11 11:34:25 -04:00
Will Daly
e5a62aaaba Credit provider integration Python API
* Add Python API functions for creating and updating requests for credit.
* Add Django models and migrations for tracking credit requests and status.
2015-06-08 13:30:32 -04:00
Ahsan Ulhaq
5f74a1406e Set up Credit Provider Model
Update credit Provider model and register in admin

ECOM-1555
2015-06-05 12:25:02 +05:00
zubair-arbi
38b859fd40 use 'name' field in 'CreditRequirement' model to save the location of xblocks 2015-06-03 18:54:33 +05:00
Will Daly
58d24111f5 Add additional "reason" field to CreditRequirementStatus
* Add "reason" JSON-encoded field to CreditRequirementStatus.
* Add a "failed" status to CreditRequirementStatus.status choices.
2015-06-02 11:17:11 -04:00
Will Daly
05ea62fb78 Fix credit requirement "criteria" name
The CreditRequirement "configuration" field was renamed in Django
code without updating the migration.  This commit adds a second
migration to delete the incorrect field and add a new field.
The credit feature is currently disabled in production, so
the model isn't currently used by application code.
2015-05-29 08:22:45 -04:00
Awais
2599445190 ECOM-1590 adding models for credit eligibility. 2015-05-20 14:18:37 +05:00