Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
462d0c04
Commit
462d0c04
authored
Feb 11, 2016
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11524 from edx/ned/merge-dogwood-to-master
Merge Dogwood to master
parents
794cecec
d8b9dec5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
8 deletions
+26
-8
openedx/core/djangoapps/content/course_overviews/management/commands/generate_course_overview.py
+11
-6
openedx/core/djangoapps/course_groups/management/commands/post_cohort_membership_fix.py
+15
-2
No files found.
openedx/core/djangoapps/content/course_overviews/management/commands/generate_course_overview.py
View file @
462d0c04
...
...
@@ -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
):
...
...
openedx/core/djangoapps/course_groups/management/commands/post_cohort_membership_fix.py
View file @
462d0c04
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment