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
1122cdb2
Commit
1122cdb2
authored
Jan 08, 2013
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more comments in response to code review.
parent
051339af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
common/lib/xmodule/xmodule/modulestore/__init__.py
+2
-2
common/lib/xmodule/xmodule/modulestore/mongo.py
+2
-2
common/lib/xmodule/xmodule/modulestore/xml.py
+5
-3
No files found.
common/lib/xmodule/xmodule/modulestore/__init__.py
View file @
1122cdb2
...
...
@@ -346,8 +346,8 @@ class ModuleStore(object):
raise
NotImplementedError
def
get_parent_locations
(
self
,
location
,
course_id
):
'''Find all locations that are the parents of this location
. Needed
for path_to_location().
'''Find all locations that are the parents of this location
in this
course. Needed
for path_to_location().
returns an iterable of things that can be passed to Location.
'''
...
...
common/lib/xmodule/xmodule/modulestore/mongo.py
View file @
1122cdb2
...
...
@@ -310,8 +310,8 @@ class MongoModuleStore(ModuleStoreBase):
self
.
_update_single_item
(
location
,
{
'metadata'
:
metadata
})
def
get_parent_locations
(
self
,
location
,
course_id
):
'''Find all locations that are the parents of this location
. Needed
for path_to_location().
'''Find all locations that are the parents of this location
in this
course. Needed
for path_to_location().
If there is no data at location in this modulestore, raise
ItemNotFoundError.
...
...
common/lib/xmodule/xmodule/modulestore/xml.py
View file @
1122cdb2
...
...
@@ -279,7 +279,9 @@ class XMLModuleStore(ModuleStoreBase):
# If we are specifically asked for missing courses, that should
# be an error. If we are asked for "all" courses, find the ones
# that have a course.xml
# that have a course.xml. We sort the dirs in alpha order so we always
# read things in the same order (OS differences in load order have
# bitten us in the past.)
if
course_dirs
is
None
:
course_dirs
=
sorted
([
d
for
d
in
os
.
listdir
(
self
.
data_dir
)
if
os
.
path
.
exists
(
self
.
data_dir
/
d
/
"course.xml"
)])
...
...
@@ -542,8 +544,8 @@ class XMLModuleStore(ModuleStoreBase):
raise
NotImplementedError
(
"XMLModuleStores are read-only"
)
def
get_parent_locations
(
self
,
location
,
course_id
):
'''Find all locations that are the parents of this location
. Needed
for path_to_location().
'''Find all locations that are the parents of this location
in this
course. Needed
for path_to_location().
If there is no data at location in this modulestore, raise
ItemNotFoundError.
...
...
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