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
95202900
Commit
95202900
authored
Jan 22, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add optional course_id parameter to DraftMongoStore.get_items()
parent
381ede20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
common/lib/xmodule/xmodule/modulestore/draft.py
+3
-3
No files found.
common/lib/xmodule/xmodule/modulestore/draft.py
View file @
95202900
...
...
@@ -73,7 +73,7 @@ class DraftModuleStore(ModuleStoreBase):
except
ItemNotFoundError
:
return
wrap_draft
(
super
(
DraftModuleStore
,
self
)
.
get_instance
(
course_id
,
location
,
depth
=
0
))
def
get_items
(
self
,
location
,
depth
=
0
):
def
get_items
(
self
,
location
,
course_id
=
None
,
depth
=
0
):
"""
Returns a list of XModuleDescriptor instances for the items
that match location. Any element of location that is None is treated
...
...
@@ -89,8 +89,8 @@ class DraftModuleStore(ModuleStoreBase):
draft_loc
=
as_draft
(
location
)
# cdodge: we're forcing depth=0 here as the Draft store is not handling caching well
draft_items
=
super
(
DraftModuleStore
,
self
)
.
get_items
(
draft_loc
,
depth
=
0
)
items
=
super
(
DraftModuleStore
,
self
)
.
get_items
(
location
,
depth
=
0
)
draft_items
=
super
(
DraftModuleStore
,
self
)
.
get_items
(
draft_loc
,
course_id
=
course_id
,
depth
=
0
)
items
=
super
(
DraftModuleStore
,
self
)
.
get_items
(
location
,
course_id
=
course_id
,
depth
=
0
)
draft_locs_found
=
set
(
item
.
location
.
_replace
(
revision
=
None
)
for
item
in
draft_items
)
non_draft_items
=
[
...
...
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