Merge pull request #2754 from edx/dcs/a11y-shorter-titles
Display only the first component name in the page (and nav) title.
This commit is contained in:
@@ -88,20 +88,20 @@ class SequenceModule(SequenceFields, XModule):
|
||||
rendered_child = child.render('student_view', context)
|
||||
fragment.add_frag_resources(rendered_child)
|
||||
|
||||
for grand_child in child.get_children():
|
||||
title = grand_child.display_name
|
||||
if title:
|
||||
break
|
||||
else:
|
||||
title = child.display_name_with_default
|
||||
childinfo = {
|
||||
'content': rendered_child.content,
|
||||
'title': "\n".join(
|
||||
grand_child.display_name
|
||||
for grand_child in child.get_children()
|
||||
if grand_child.display_name is not None
|
||||
),
|
||||
'title': title,
|
||||
'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'] == '':
|
||||
childinfo['title'] = child.display_name_with_default
|
||||
contents.append(childinfo)
|
||||
|
||||
params = {'items': contents,
|
||||
|
||||
Reference in New Issue
Block a user