Merge pull request #11524 from edx/ned/merge-dogwood-to-master
Merge Dogwood to master
This commit is contained in:
@@ -24,12 +24,17 @@ class Command(BaseCommand):
|
||||
args = '<course_id course_id ...>'
|
||||
help = 'Generates and stores course overview for one or more courses.'
|
||||
|
||||
option_list = BaseCommand.option_list + (
|
||||
make_option('--all',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Generate course overview for all courses.'),
|
||||
)
|
||||
def add_arguments(self, parser):
|
||||
"""
|
||||
Add arguments to the command parser.
|
||||
"""
|
||||
parser.add_argument(
|
||||
'--all',
|
||||
action='store_true',
|
||||
dest='all',
|
||||
default=False,
|
||||
help='Generate course overview for all courses.',
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
|
||||
@@ -15,16 +15,29 @@ class Command(BaseCommand):
|
||||
help = '''
|
||||
Repairs any potential inconsistencies made in the window between running migrations 0005 and 0006, and deploying
|
||||
the code changes to enforce use of CohortMembership that go with said migrations.
|
||||
|commit|: optional argument. If not provided, will dry-run and list number of operations that would be made.
|
||||
|
||||
commit: optional argument. If not provided, will dry-run and list number of operations that would be made.
|
||||
'''
|
||||
|
||||
def add_arguments(self, parser):
|
||||
"""
|
||||
Add arguments to the command parser.
|
||||
"""
|
||||
parser.add_argument(
|
||||
'--commit',
|
||||
action='store_true',
|
||||
dest='commit',
|
||||
default=False,
|
||||
help='Really commit the changes, otherwise, just dry run',
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
"""
|
||||
Execute the command. Since this is designed to fix any issues cause by running pre-CohortMembership code
|
||||
with the database already migrated to post-CohortMembership state, we will use the pre-CohortMembership
|
||||
table CourseUserGroup as the canonical source of truth. This way, changes made in the window are persisted.
|
||||
"""
|
||||
commit = 'commit' in options
|
||||
commit = options['commit']
|
||||
memberships_to_delete = 0
|
||||
memberships_to_add = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user