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
0bc4f4e0
Commit
0bc4f4e0
authored
Sep 05, 2016
by
Awais Jibran
Committed by
GitHub
Sep 05, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13357 from edx/aj/ECOM-5405-update-bulk-enroll-mgm
Update each enrollment in atomic transaction not all
parents
79085fff
896b3cb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
common/djangoapps/student/management/commands/bulk_change_enrollment.py
+4
-3
No files found.
common/djangoapps/student/management/commands/bulk_change_enrollment.py
View file @
0bc4f4e0
...
...
@@ -91,9 +91,10 @@ class Command(BaseCommand):
if
not
commit
:
logger
.
info
(
'Dry run, changes have not been saved. Run again with "commit" argument to save changes'
)
raise
Exception
(
'The --commit flag was not given; forcing rollback.'
)
with
transaction
.
atomic
():
# call `change_mode` which will change the mode and also emit tracking event
for
enrollment
in
course_enrollments
:
# call `change_mode` which will change the mode and also emit tracking event
for
enrollment
in
course_enrollments
:
with
transaction
.
atomic
():
enrollment
.
change_mode
(
mode
=
to_mode
)
logger
.
info
(
'Finished moving users from
%
s to
%
s in course
%
s.'
,
from_mode
,
to_mode
,
course_key_str
)
...
...
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