Merge pull request #13587 from edx/alisan/bookmark-btn-TNl-5625-unit-title-TNL-5623
add new unit title and renew bookmark button
This commit is contained in:
@@ -65,6 +65,7 @@ class VerticalBlock(SequenceFields, XModuleFields, StudioEditableBlock, XmlParse
|
||||
fragment.add_content(self.system.render_template('vert_module.html', {
|
||||
'items': contents,
|
||||
'xblock_context': context,
|
||||
'unit_title': self.display_name_with_default,
|
||||
'show_bookmark_button': True,
|
||||
'bookmarked': child_context['bookmarked'],
|
||||
'bookmark_id': "{},{}".format(child_context['username'], unicode(self.location))
|
||||
|
||||
@@ -267,6 +267,10 @@ class CoursewarePage(CoursePage):
|
||||
""" Return the course tree breadcrumb shown above the sequential bar """
|
||||
return [part.strip() for part in self.q(css='.path').text[0].split('>')]
|
||||
|
||||
def unit_title_visible(self):
|
||||
""" Check if unit title is visible """
|
||||
return self.q(css='.unit-title').visible
|
||||
|
||||
def bookmark_button_visible(self):
|
||||
""" Check if bookmark button is visible """
|
||||
EmptyPromise(lambda: self.q(css='.bookmark-button').visible, "Bookmark button visible").fulfill()
|
||||
|
||||
Reference in New Issue
Block a user