Adding migration to store purchased mode in PaidCourseRegistration
This commit is contained in:
@@ -33,6 +33,7 @@ class CourseMode(models.Model):
|
||||
currency = models.CharField(default="usd", max_length=8)
|
||||
|
||||
DEFAULT_MODE = Mode('honor', _('Honor Code Certificate'), 0, '', 'usd')
|
||||
DEFAULT_MODE_SLUG = 'honor'
|
||||
|
||||
class Meta:
|
||||
""" meta attributes of this model """
|
||||
|
||||
@@ -827,9 +827,6 @@ class CourseEnrollment(models.Model):
|
||||
@classmethod
|
||||
def is_enrolled(cls, user, course_id):
|
||||
"""
|
||||
Remove the user from a given course. If the relevant `CourseEnrollment`
|
||||
object doesn't exist, we log an error but don't throw an exception.
|
||||
|
||||
Returns True if the user is enrolled in the course (the entry must exist
|
||||
and it must have `is_active=True`). Otherwise, returns False.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user