Merge pull request #17627 from edx/MLoTurco/learner-3925-model-tweak
Remove reference to reason field, add action field
This commit is contained in:
@@ -58,7 +58,6 @@ class CourseEntitlementSupportDetailAdmin(admin.ModelAdmin):
|
||||
"""
|
||||
list_display = ('entitlement',
|
||||
'support_user',
|
||||
'reason',
|
||||
'comments',
|
||||
'unenrolled_run')
|
||||
raw_id_fields = ('unenrolled_run', 'support_user',)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('entitlements', '0005_courseentitlementsupportdetail'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='courseentitlementsupportdetail',
|
||||
name='action',
|
||||
field=models.CharField(default='CREATE', max_length=15, choices=[(b'REISSUE', b'Re-issue entitlement'), (b'CREATE', b'Create new entitlement')]),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
@@ -420,6 +420,7 @@ class CourseEntitlementSupportDetail(TimeStampedModel):
|
||||
"""
|
||||
Table recording support interactions with an entitlement
|
||||
"""
|
||||
# Reasons deprecated
|
||||
LEAVE_SESSION = 'LEAVE'
|
||||
CHANGE_SESSION = 'CHANGE'
|
||||
LEARNER_REQUEST_NEW = 'LEARNER_NEW'
|
||||
@@ -432,10 +433,21 @@ class CourseEntitlementSupportDetail(TimeStampedModel):
|
||||
(COURSE_TEAM_REQUEST_NEW, u'Course team requested entitlement for learnerg'),
|
||||
(OTHER, u'Other'),
|
||||
)
|
||||
|
||||
REISSUE = 'REISSUE'
|
||||
CREATE = 'CREATE'
|
||||
ENTITLEMENT_SUPPORT_ACTIONS = (
|
||||
(REISSUE, 'Re-issue entitlement'),
|
||||
(CREATE, 'Create new entitlement'),
|
||||
)
|
||||
|
||||
entitlement = models.ForeignKey('entitlements.CourseEntitlement')
|
||||
support_user = models.ForeignKey(settings.AUTH_USER_MODEL)
|
||||
|
||||
#Deprecated: use action instead.
|
||||
reason = models.CharField(max_length=15, choices=ENTITLEMENT_SUPPORT_REASONS)
|
||||
action = models.CharField(max_length=15, choices=ENTITLEMENT_SUPPORT_ACTIONS)
|
||||
|
||||
comments = models.TextField(null=True)
|
||||
|
||||
unenrolled_run = models.ForeignKey(
|
||||
|
||||
Reference in New Issue
Block a user