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
4c3b4a59
Commit
4c3b4a59
authored
Sep 15, 2014
by
Don Mitchell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5208 from edx/split/misc_fixups
Split/misc fixups
parents
a08ca415
ad57cbe9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
16 deletions
+0
-16
common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py
+0
-8
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
+0
-8
No files found.
common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py
View file @
4c3b4a59
...
@@ -3,7 +3,6 @@ Segregation of pymongo functions from the data modeling mechanisms for split mod
...
@@ -3,7 +3,6 @@ Segregation of pymongo functions from the data modeling mechanisms for split mod
"""
"""
import
re
import
re
import
pymongo
import
pymongo
from
bson
import
son
from
contracts
import
check
from
contracts
import
check
from
xmodule.exceptions
import
HeartbeatFailure
from
xmodule.exceptions
import
HeartbeatFailure
from
xmodule.modulestore.split_mongo
import
BlockKey
from
xmodule.modulestore.split_mongo
import
BlockKey
...
@@ -60,13 +59,6 @@ def structure_to_mongo(structure):
...
@@ -60,13 +59,6 @@ def structure_to_mongo(structure):
return
new_structure
return
new_structure
def
definition_from_mongo
(
definition
):
"""
Converts 'fields.children' from a list [[block_type, block_id]] to [BlockKey]
"""
new_def
=
dict
(
definition
)
class
MongoConnection
(
object
):
class
MongoConnection
(
object
):
"""
"""
Segregation of pymongo functions from the data modeling mechanisms for split modulestore.
Segregation of pymongo functions from the data modeling mechanisms for split modulestore.
...
...
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
View file @
4c3b4a59
...
@@ -2135,14 +2135,6 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
...
@@ -2135,14 +2135,6 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
# should this recurse down dicts and lists just in case they contain datetime?
# should this recurse down dicts and lists just in case they contain datetime?
elif
not
isinstance
(
value
,
datetime
.
datetime
):
# don't convert datetimes!
elif
not
isinstance
(
value
,
datetime
.
datetime
):
# don't convert datetimes!
fields
[
field_name
]
=
xblock_class
.
fields
[
field_name
]
.
to_json
(
value
)
fields
[
field_name
]
=
xblock_class
.
fields
[
field_name
]
.
to_json
(
value
)
# I think these are obsolete conditions; so, I want to confirm that. Thus the warnings
if
'location'
in
fields
:
log
.
warn
(
'attempt to persist location'
)
del
fields
[
'location'
]
if
'block_type'
in
fields
:
log
.
warn
(
'attempt to persist category'
)
del
fields
[
'block_type'
]
return
fields
return
fields
def
_new_structure
(
self
,
user_id
,
root_block_key
,
block_fields
=
None
,
definition_id
=
None
):
def
_new_structure
(
self
,
user_id
,
root_block_key
,
block_fields
=
None
,
definition_id
=
None
):
...
...
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