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
OpenEdx
edx-platform
Commits
50296593
Commit
50296593
authored
Aug 12, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better explain behavior and todo's
parent
438bbffb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py
+11
-6
No files found.
common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py
View file @
50296593
...
...
@@ -44,6 +44,7 @@ class SplitMongoKVS(KeyValueStore):
# parent undefined in editing runtime (I think)
if
key
.
scope
==
Scope
.
parent
:
# see STUD-624. Right now copies MongoKeyValueStore.get's behavior of returning None
return
None
if
key
.
scope
==
Scope
.
children
:
# didn't find children in _fields; so, see if there's a default
...
...
@@ -86,12 +87,12 @@ class SplitMongoKVS(KeyValueStore):
# set the field
self
.
_fields
[
key
.
field_name
]
=
value
# handle any side effects
# handle any side effects
-- story STUD-624
# if key.scope == Scope.children:
#
TODO
remove inheritance from any exchildren
#
TODO
add inheritance to any new children
#
STUD-624
remove inheritance from any exchildren
#
STUD-624
add inheritance to any new children
# if key.scope == Scope.settings:
#
TODO
if inheritable, push down to children
#
STUD-624
if inheritable, push down to children
def
delete
(
self
,
key
):
# handle any special cases
...
...
@@ -112,11 +113,14 @@ class SplitMongoKVS(KeyValueStore):
# handle any side effects
# if key.scope == Scope.children:
#
TODO
remove inheritance from any exchildren
#
STUD-624
remove inheritance from any exchildren
# if key.scope == Scope.settings:
#
TODO
if inheritable, push down _inherited_settings value to children
#
STUD-624
if inheritable, push down _inherited_settings value to children
def
has
(
self
,
key
):
"""
Is the given field explicitly set in this kvs (not inherited nor default)
"""
# handle any special cases
if
key
.
scope
==
Scope
.
content
:
if
key
.
field_name
==
'location'
:
...
...
@@ -152,6 +156,7 @@ class SplitMongoKVS(KeyValueStore):
return
PROVENANCE_DEFAULT
elif
key_scope
==
Scope
.
parent
:
return
PROVENANCE_DEFAULT
# catch the locally set state
elif
key_name
in
self
.
_fields
:
return
PROVENANCE_LOCAL
elif
key_scope
==
Scope
.
settings
and
key_name
in
self
.
_inherited_settings
:
...
...
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