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
2348ed3d
Commit
2348ed3d
authored
Feb 25, 2013
by
Vasyl Nakvasiuk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix empty display_name problem
parent
aa34c9d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
common/lib/xmodule/xmodule/seq_module.py
+4
-2
No files found.
common/lib/xmodule/xmodule/seq_module.py
View file @
2348ed3d
...
...
@@ -17,6 +17,7 @@ log = logging.getLogger(__name__)
# OBSOLETE: This obsoletes 'type'
class_priority
=
[
'video'
,
'problem'
]
def
display_name
(
module
):
if
hasattr
(
module
,
'display_name'
):
return
module
.
display_name
...
...
@@ -24,6 +25,7 @@ def display_name(module):
if
hasattr
(
module
,
'lms'
):
return
module
.
lms
.
display_name
class
SequenceModule
(
XModule
):
''' Layout module which lays out content in a temporal sequence
'''
...
...
@@ -84,14 +86,14 @@ class SequenceModule(XModule):
'title'
:
"
\n
"
.
join
(
display_name
(
grand_child
)
for
grand_child
in
child
.
get_children
()
if
display_name
(
grand_child
)
is
not
None
if
display_name
(
grand_child
)
),
'progress_status'
:
Progress
.
to_js_status_str
(
progress
),
'progress_detail'
:
Progress
.
to_js_detail_str
(
progress
),
'type'
:
child
.
get_icon_class
(),
'id'
:
child
.
id
,
}
if
childinfo
[
'title'
]
==
''
:
if
childinfo
[
'title'
]
==
''
:
childinfo
[
'title'
]
=
display_name
(
child
)
contents
.
append
(
childinfo
)
...
...
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