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
e2470842
Commit
e2470842
authored
Feb 19, 2013
by
Alexander Kryklia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get_module get descr insted of loc
parent
841cfd28
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
common/lib/xmodule/xmodule/conditional_module.py
+3
-4
No files found.
common/lib/xmodule/xmodule/conditional_module.py
View file @
e2470842
...
...
@@ -64,7 +64,7 @@ class ConditionalModule(XModule):
%
xml_attr
)
def
is_condition_satisfied
(
self
):
self
.
required_modules
=
[
self
.
system
.
get_module
(
descriptor
.
location
)
for
self
.
required_modules
=
[
self
.
system
.
get_module
(
descriptor
)
for
descriptor
in
self
.
descriptor
.
get_required_module_descriptors
()]
xml_value
,
attr_name
=
self
.
_get_condition
()
...
...
@@ -112,8 +112,7 @@ class ConditionalModule(XModule):
'message'
:
bool
(
message
)})
if
self
.
contents
is
None
:
self
.
contents
=
[
self
.
system
.
get_module
(
child_descriptor
.
location
)
.
get_html
()
self
.
contents
=
[
self
.
system
.
get_module
(
child_descriptor
)
.
get_html
()
for
child_descriptor
in
self
.
descriptor
.
get_children
()]
html
=
self
.
contents
...
...
@@ -137,7 +136,7 @@ class ConditionalDescriptor(SequenceDescriptor):
def
parse_sources
(
xml_element
,
system
,
return_descriptor
=
False
):
"""Parse xml_element 'sources' attr and:
if return_descriptor=True - return list of descriptors
if return_descriptor=False - return list of l
co
ations
if return_descriptor=False - return list of l
oc
ations
"""
result
=
[]
sources
=
xml_element
.
get
(
'sources'
)
...
...
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