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
75d61b6f
Commit
75d61b6f
authored
Apr 14, 2015
by
E. Kolpakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed course_key to structure_key to reflect the fact it might be a library key as well.
parent
9bbad954
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
common/lib/xmodule/xmodule/modulestore/__init__.py
+6
-6
common/lib/xmodule/xmodule/modulestore/mongo/base.py
+5
-5
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
+4
-4
No files found.
common/lib/xmodule/xmodule/modulestore/__init__.py
View file @
75d61b6f
...
...
@@ -249,7 +249,7 @@ class BulkOperationsMixin(object):
if
bulk_ops_record
.
is_root
:
self
.
_start_outermost_bulk_operation
(
bulk_ops_record
,
course_key
)
def
_end_outermost_bulk_operation
(
self
,
bulk_ops_record
,
cours
e_key
,
emit_signals
=
True
):
def
_end_outermost_bulk_operation
(
self
,
bulk_ops_record
,
structur
e_key
,
emit_signals
=
True
):
"""
The outermost nested bulk_operation call: do the actual end of the bulk operation.
...
...
@@ -257,12 +257,12 @@ class BulkOperationsMixin(object):
"""
pass
def
_end_bulk_operation
(
self
,
cours
e_key
,
emit_signals
=
True
):
def
_end_bulk_operation
(
self
,
structur
e_key
,
emit_signals
=
True
):
"""
End the active bulk operation on
course_key
.
End the active bulk operation on
structure_key (course or library key)
.
"""
# If no bulk op is active, return
bulk_ops_record
=
self
.
_get_bulk_ops_record
(
cours
e_key
)
bulk_ops_record
=
self
.
_get_bulk_ops_record
(
structur
e_key
)
if
not
bulk_ops_record
.
active
:
return
...
...
@@ -273,9 +273,9 @@ class BulkOperationsMixin(object):
if
bulk_ops_record
.
active
:
return
self
.
_end_outermost_bulk_operation
(
bulk_ops_record
,
cours
e_key
,
emit_signals
)
self
.
_end_outermost_bulk_operation
(
bulk_ops_record
,
structur
e_key
,
emit_signals
)
self
.
_clear_bulk_ops_record
(
cours
e_key
)
self
.
_clear_bulk_ops_record
(
structur
e_key
)
def
_is_in_bulk_operation
(
self
,
course_key
,
ignore_case
=
False
):
"""
...
...
common/lib/xmodule/xmodule/modulestore/mongo/base.py
View file @
75d61b6f
...
...
@@ -466,17 +466,17 @@ class MongoBulkOpsMixin(BulkOperationsMixin):
# ensure it starts clean
bulk_ops_record
.
dirty
=
False
def
_end_outermost_bulk_operation
(
self
,
bulk_ops_record
,
course_id
,
emit_signals
=
True
):
def
_end_outermost_bulk_operation
(
self
,
bulk_ops_record
,
structure_key
,
emit_signals
=
True
):
"""
Restart updating the meta-data inheritance cache for the given course.
Restart updating the meta-data inheritance cache for the given course
or library
.
Refresh the meta-data inheritance cache now since it was temporarily disabled.
"""
if
bulk_ops_record
.
dirty
:
self
.
refresh_cached_metadata_inheritance_tree
(
course_id
)
self
.
refresh_cached_metadata_inheritance_tree
(
structure_key
)
if
emit_signals
:
self
.
send_bulk_published_signal
(
bulk_ops_record
,
course_id
)
self
.
send_bulk_library_updated_signal
(
bulk_ops_record
,
course_id
)
self
.
send_bulk_published_signal
(
bulk_ops_record
,
structure_key
)
self
.
send_bulk_library_updated_signal
(
bulk_ops_record
,
structure_key
)
bulk_ops_record
.
dirty
=
False
# brand spanking clean now
...
...
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
View file @
75d61b6f
...
...
@@ -229,9 +229,9 @@ class SplitBulkWriteMixin(BulkOperationsMixin):
# Ensure that any edits to the index don't pollute the initial_index
bulk_write_record
.
index
=
copy
.
deepcopy
(
bulk_write_record
.
initial_index
)
def
_end_outermost_bulk_operation
(
self
,
bulk_write_record
,
cours
e_key
,
emit_signals
=
True
):
def
_end_outermost_bulk_operation
(
self
,
bulk_write_record
,
structur
e_key
,
emit_signals
=
True
):
"""
End the active bulk write operation on
course_key
.
End the active bulk write operation on
structure_key (course or library key)
.
"""
dirty
=
False
...
...
@@ -268,8 +268,8 @@ class SplitBulkWriteMixin(BulkOperationsMixin):
self
.
db_connection
.
update_course_index
(
bulk_write_record
.
index
,
from_index
=
bulk_write_record
.
initial_index
)
if
dirty
and
emit_signals
:
self
.
send_bulk_published_signal
(
bulk_write_record
,
cours
e_key
)
self
.
send_bulk_library_updated_signal
(
bulk_write_record
,
cours
e_key
)
self
.
send_bulk_published_signal
(
bulk_write_record
,
structur
e_key
)
self
.
send_bulk_library_updated_signal
(
bulk_write_record
,
structur
e_key
)
def
get_course_index
(
self
,
course_key
,
ignore_case
=
False
):
"""
...
...
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