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
a9695828
Commit
a9695828
authored
Jul 14, 2014
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove LocMapperStore
LMS-2918
parent
a71919ef
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
4 additions
and
52 deletions
+4
-52
common/lib/xmodule/xmodule/modulestore/django.py
+1
-30
common/lib/xmodule/xmodule/modulestore/loc_mapper_store.py
+0
-0
common/lib/xmodule/xmodule/modulestore/split_migrator.py
+2
-2
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
+1
-8
common/lib/xmodule/xmodule/modulestore/tests/test_location_mapper.py
+0
-0
docs/en_us/developers/source/modulestore.rst
+0
-4
mongo_indexes.md
+0
-8
No files found.
common/lib/xmodule/xmodule/modulestore/django.py
View file @
a9695828
...
...
@@ -14,7 +14,6 @@ import django.utils
import
re
import
threading
from
xmodule.modulestore.loc_mapper_store
import
LocMapperStore
from
xmodule.util.django
import
get_current_request_hostname
import
xmodule.modulestore
# pylint: disable=unused-import
from
xmodule.contentstore.django
import
contentstore
...
...
@@ -102,36 +101,8 @@ def clear_existing_modulestores():
This is useful for flushing state between unit tests.
"""
global
_MIXED_MODULESTORE
,
_loc_singleton
# pylint: disable=global-statement
global
_MIXED_MODULESTORE
# pylint: disable=global-statement
_MIXED_MODULESTORE
=
None
# pylint: disable=W0603
cache
=
getattr
(
_loc_singleton
,
"cache"
,
None
)
if
cache
:
cache
.
clear
()
_loc_singleton
=
None
# singleton instance of the loc_mapper
_loc_singleton
=
None
def
loc_mapper
():
"""
Get the loc mapper which bidirectionally maps Locations to Locators. Used like modulestore() as
a singleton accessor.
"""
# pylint: disable=W0603
global
_loc_singleton
# pylint: disable=W0212
if
_loc_singleton
is
None
:
try
:
loc_cache
=
get_cache
(
'loc_cache'
)
except
InvalidCacheBackendError
:
loc_cache
=
get_cache
(
'default'
)
# instantiate
_loc_singleton
=
LocMapperStore
(
loc_cache
,
**
settings
.
DOC_STORE_CONFIG
)
return
_loc_singleton
class
ModuleI18nService
(
object
):
...
...
common/lib/xmodule/xmodule/modulestore/loc_mapper_store.py
deleted
100644 → 0
View file @
a71919ef
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/modulestore/split_migrator.py
View file @
a9695828
...
...
@@ -173,7 +173,7 @@ class SplitMigrator(object):
"""
def
get_translation
(
location
):
"""
Convert the location
and add to loc mapper
Convert the location
"""
return
new_course_key
.
make_usage_key
(
location
.
category
,
...
...
@@ -207,7 +207,7 @@ class SplitMigrator(object):
"""
def
get_translation
(
location
):
"""
Convert the location
and add to loc mapper
Convert the location
"""
return
new_course_key
.
make_usage_key
(
location
.
category
,
...
...
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
View file @
a9695828
...
...
@@ -5,10 +5,8 @@ Modulestore configuration for test cases.
from
uuid
import
uuid4
from
django.test
import
TestCase
from
django.contrib.auth.models
import
User
from
xmodule.modulestore.django
import
(
modulestore
,
clear_existing_modulestores
,
loc_mapper
)
from
xmodule.contentstore.django
import
_CONTENTSTORE
from
xmodule.modulestore.django
import
modulestore
,
clear_existing_modulestores
from
xmodule.modulestore
import
ModuleStoreEnum
...
...
@@ -197,11 +195,6 @@ class ModuleStoreTestCase(TestCase):
module_store
.
_drop_database
()
# pylint: disable=protected-access
_CONTENTSTORE
.
clear
()
location_mapper
=
loc_mapper
()
if
location_mapper
.
db
:
location_mapper
.
location_map
.
drop
()
location_mapper
.
db
.
connection
.
close
()
@classmethod
def
setUpClass
(
cls
):
"""
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_location_mapper.py
deleted
100644 → 0
View file @
a71919ef
This diff is collapsed.
Click to expand it.
docs/en_us/developers/source/modulestore.rst
View file @
a9695828
...
...
@@ -33,10 +33,6 @@ Modulestore Helpers
These packages provide utilities for easier use of modulestores,
and migrating data between modulestores.
.. automodule:: xmodule.modulestore.loc_mapper_store
:members:
:show-inheritance:
.. automodule:: xmodule.modulestore.search
:members:
:show-inheritance:
...
...
mongo_indexes.md
View file @
a9695828
...
...
@@ -12,14 +12,6 @@ db.collection_name
```
as in
```db.location_map.ensureIndex({'course_id': 1}{background: true})```
location_map:
=============
```
ensureIndex({'org': 1, 'offering': 1})
ensureIndex({'schema': 1})
```
fs.files:
=========
...
...
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