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
9479ef3c
Commit
9479ef3c
authored
Jan 11, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix up call signatures for get_parent_locations()
parent
08adf9c0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
cms/djangoapps/contentstore/views.py
+3
-3
common/lib/xmodule/xmodule/course_module.py
+0
-1
common/lib/xmodule/xmodule/modulestore/draft.py
+2
-2
No files found.
cms/djangoapps/contentstore/views.py
View file @
9479ef3c
...
...
@@ -202,7 +202,7 @@ def edit_subsection(request, location):
if
item
.
location
.
category
!=
'sequential'
:
return
HttpResponseBadRequest
()
parent_locs
=
modulestore
()
.
get_parent_locations
(
location
)
parent_locs
=
modulestore
()
.
get_parent_locations
(
location
,
None
)
# we're for now assuming a single parent
if
len
(
parent_locs
)
!=
1
:
...
...
@@ -285,10 +285,10 @@ def edit_unit(request, location):
# this will need to change to check permissions correctly so as
# to pick the correct parent subsection
containing_subsection_locs
=
modulestore
()
.
get_parent_locations
(
location
)
containing_subsection_locs
=
modulestore
()
.
get_parent_locations
(
location
,
None
)
containing_subsection
=
modulestore
()
.
get_item
(
containing_subsection_locs
[
0
])
containing_section_locs
=
modulestore
()
.
get_parent_locations
(
containing_subsection
.
location
)
containing_section_locs
=
modulestore
()
.
get_parent_locations
(
containing_subsection
.
location
,
None
)
containing_section
=
modulestore
()
.
get_item
(
containing_section_locs
[
0
])
# cdodge hack. We're having trouble previewing drafts via jump_to redirect
...
...
common/lib/xmodule/xmodule/course_module.py
View file @
9479ef3c
...
...
@@ -6,7 +6,6 @@ import requests
import
time
from
datetime
import
datetime
from
xmodule.graders
import
load_grading_policy
from
xmodule.modulestore
import
Location
from
xmodule.seq_module
import
SequenceDescriptor
,
SequenceModule
from
xmodule.timeparse
import
parse_time
,
stringify_time
...
...
common/lib/xmodule/xmodule/modulestore/draft.py
View file @
9479ef3c
...
...
@@ -160,13 +160,13 @@ class DraftModuleStore(ModuleStoreBase):
return
super
(
DraftModuleStore
,
self
)
.
delete_item
(
as_draft
(
location
))
def
get_parent_locations
(
self
,
location
):
def
get_parent_locations
(
self
,
location
,
course_id
):
'''Find all locations that are the parents of this location. Needed
for path_to_location().
returns an iterable of things that can be passed to Location.
'''
return
super
(
DraftModuleStore
,
self
)
.
get_parent_locations
(
location
)
return
super
(
DraftModuleStore
,
self
)
.
get_parent_locations
(
location
,
course_id
)
def
publish
(
self
,
location
,
published_by_id
):
"""
...
...
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