Consider user entitlements and use entitlement products in bundle one-click purchase

This commit is contained in:
Anthony Mangano
2017-11-17 17:08:32 -05:00
committed by McKenzie Welter
parent c25e4ba045
commit f72cf800e1
5 changed files with 274 additions and 64 deletions

View File

@@ -136,10 +136,10 @@ class CourseMode(models.Model):
HONOR = 'honor'
PROFESSIONAL = 'professional'
VERIFIED = "verified"
AUDIT = "audit"
NO_ID_PROFESSIONAL_MODE = "no-id-professional"
CREDIT_MODE = "credit"
VERIFIED = 'verified'
AUDIT = 'audit'
NO_ID_PROFESSIONAL_MODE = 'no-id-professional'
CREDIT_MODE = 'credit'
DEFAULT_MODE = Mode(
settings.COURSE_MODE_DEFAULTS['slug'],

View File

@@ -24,3 +24,10 @@ class CourseEntitlement(TimeStampedModel):
help_text='The current Course enrollment for this entitlement. If NULL the Learner has not enrolled.'
)
order_number = models.CharField(max_length=128, null=True)
@property
def expired_at_datetime(self):
"""
Getter to be used instead of expired_at because of the conditional check and update
"""
return self.expired_at