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
857431f7
Commit
857431f7
authored
Aug 12, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify comments re behavior
parent
a507ebc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py
+6
-4
No files found.
common/lib/xmodule/xmodule/modulestore/split_mongo/split_mongo_kvs.py
View file @
857431f7
...
...
@@ -46,12 +46,14 @@ class SplitMongoKVS(KeyValueStore):
if
key
.
scope
==
Scope
.
parent
:
return
None
if
key
.
scope
==
Scope
.
children
:
# didn't find children in _fields; so, see if there's a default
raise
KeyError
()
elif
key
.
scope
==
Scope
.
settings
:
# get from inheritance since not locally set
#
didn't find in _fields; so,
get from inheritance since not locally set
if
key
.
field_name
in
self
.
_inherited_settings
:
return
self
.
_inherited_settings
[
key
.
field_name
]
else
:
# or get default
raise
KeyError
()
elif
key
.
scope
==
Scope
.
content
:
if
key
.
field_name
==
'location'
:
...
...
@@ -76,7 +78,7 @@ class SplitMongoKVS(KeyValueStore):
self
.
_location
=
value
# is changing this legal?
return
elif
key
.
field_name
==
'category'
:
# TODO should this raise an exception?
that is, should xblock types be mungable?
# TODO should this raise an exception?
category is not changeable.
return
else
:
self
.
_load_definition
()
...
...
@@ -99,7 +101,7 @@ class SplitMongoKVS(KeyValueStore):
if
key
.
field_name
==
'location'
:
return
# noop
elif
key
.
field_name
==
'category'
:
# TODO should this raise an exception?
that is, should xblock types be mungable?
# TODO should this raise an exception?
category is not deleteable.
return
# noop
else
:
self
.
_load_definition
()
...
...
@@ -159,7 +161,7 @@ class SplitMongoKVS(KeyValueStore):
def
get_inherited_settings
(
self
):
"""
Get the
metadata set by the ancestors (which own metadata
may override or not)
Get the
settings set by the ancestors (which locally set fields
may override or not)
"""
return
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