Commit 9a015272 by Sarina Canelake

Merge pull request #9846 from edx/sarina/tooltips

Make LMS courseware tooltips better
parents 58488eaa 94b73dc9
......@@ -179,7 +179,9 @@ class SequenceModule(SequenceFields, ProctoringFields, XModule):
rendered_child = child.render(STUDENT_VIEW, context)
fragment.add_frag_resources(rendered_child)
titles = child.get_content_titles()
# `titles` is a list of titles to inject into the sequential tooltip display.
# We omit any blank titles to avoid blank lines in the tooltip display.
titles = [title.strip() for title in child.get_content_titles() if title.strip()]
childinfo = {
'content': rendered_child.content,
'title': "\n".join(titles),
......@@ -193,7 +195,8 @@ class SequenceModule(SequenceFields, ProctoringFields, XModule):
childinfo['title'] = child.display_name_with_default
contents.append(childinfo)
params = {'items': contents,
params = {
'items': contents,
'element_id': self.location.html_id(),
'item_id': self.location.to_deprecated_string(),
'position': self.position,
......
......@@ -17,7 +17,6 @@
data-id="${item['id']}"
data-element="${idx+1}"
href="javascript:void(0);"
title="${item['title']|h}"
data-page-title="${item['page_title']|h}"
aria-controls="seq_contents_${idx}"
id="tab_${idx}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment