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
9a14af4b
Commit
9a14af4b
authored
Aug 15, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address comment on #412
parent
5d9fad5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
common/lib/xmodule/xmodule/abtest_module.py
+3
-3
common/lib/xmodule/xmodule/x_module.py
+3
-3
No files found.
common/lib/xmodule/xmodule/abtest_module.py
View file @
9a14af4b
...
...
@@ -49,9 +49,9 @@ class ABTestModule(XModule):
return
json
.
dumps
({
'group'
:
self
.
group
})
def
displayable_items
(
self
):
return
filter
(
None
,
[
self
.
system
.
get_module
(
child
)
for
child
in
self
.
definition
[
'data'
][
'group_content'
][
self
.
group
]])
child_locations
=
self
.
definition
[
'data'
][
'group_content'
][
self
.
group
]
children
=
[
self
.
system
.
get_module
(
loc
)
for
loc
in
child_locations
]
return
[
c
for
c
in
children
if
c
is
not
None
]
# TODO (cpennington): Use Groups should be a first class object, rather than being
...
...
common/lib/xmodule/xmodule/x_module.py
View file @
9a14af4b
...
...
@@ -219,11 +219,11 @@ class XModule(HTMLSnippet):
Return module instances for all the children of this module.
'''
if
self
.
_loaded_children
is
None
:
child_locations
=
self
.
definition
.
get
(
'children'
,
[])
children
=
[
self
.
system
.
get_module
(
loc
)
for
loc
in
child_locations
]
# get_module returns None if the current user doesn't have access
# to the location.
self
.
_loaded_children
=
filter
(
None
,
[
self
.
system
.
get_module
(
child
)
for
child
in
self
.
definition
.
get
(
'children'
,
[])])
self
.
_loaded_children
=
[
c
for
c
in
children
if
c
is
not
None
]
return
self
.
_loaded_children
...
...
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