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
43df25d4
Commit
43df25d4
authored
Feb 27, 2014
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Point to prefer_xmodules new locn
parent
f371c4f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
common/lib/xmodule/xmodule/modulestore/mixed.py
+7
-3
lms/envs/bok_choy.py
+1
-1
lms/envs/common.py
+1
-1
No files found.
common/lib/xmodule/xmodule/modulestore/mixed.py
View file @
43df25d4
...
...
@@ -122,10 +122,14 @@ class MixedModuleStore(ModuleStoreWriteBase):
Returns a list containing the top level XModuleDescriptors of the courses
in this modulestore.
'''
courses
=
{}
courses
=
{}
# a dictionary of stringified course locations to course objects
# order the modulestores and ensure no dupes: an awkward bit of hardcoding to ensure precedence
# xml is in here because mappings trump discovery
stores
=
[
self
.
modulestores
[
'default'
],
self
.
modulestores
[
'xml'
]]
if
self
.
modulestores
.
has_key
(
'xml'
):
stores
=
[
self
.
modulestores
[
'default'
],
self
.
modulestores
[
'xml'
]]
else
:
stores
=
[
self
.
modulestores
[
'default'
]]
for
key
,
store
in
self
.
modulestores
.
iteritems
():
# awkward hardcoding of knowledge that 'draft' is a dupe of 'direct'
if
key
!=
'draft'
and
store
not
in
stores
:
...
...
@@ -194,7 +198,7 @@ class MixedModuleStore(ModuleStoreWriteBase):
usually orphaned. NOTE: may include xblocks which still have references via xblocks which don't
use children to point to their dependents.
"""
course_id
=
getattr
(
course_location
,
'course_id'
,
getattr
(
course_location
,
'package_id'
,
None
)
)
course_id
=
self
.
_get_course_id_from_course_location
(
course_location
)
store
=
self
.
_get_modulestore_for_courseid
(
course_id
)
return
store
.
get_orphans
(
course_location
,
branch
)
...
...
lms/envs/bok_choy.py
View file @
43df25d4
...
...
@@ -4,7 +4,7 @@ Settings for bok choy tests
import
os
from
path
import
path
from
xmodule.
x_modul
e
import
prefer_xmodules
from
xmodule.
modulestor
e
import
prefer_xmodules
CONFIG_ROOT
=
path
(
__file__
)
.
abspath
()
.
dirname
()
#pylint: disable=E1120
...
...
lms/envs/common.py
View file @
43df25d4
...
...
@@ -438,7 +438,7 @@ XBLOCK_SELECT_FUNCTION = only_xmodules
# Use the following lines to allow any xblock in the LMS,
# either by uncommenting them here, or adding them to your private.py
# from xmodule.
x_modul
e import prefer_xmodules
# from xmodule.
modulestor
e import prefer_xmodules
# XBLOCK_SELECT_FUNCTION = prefer_xmodules
#################### Python sandbox ############################################
...
...
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