'Check if new post button present and visible on course tab page'

def has_new_post_button_visible_on_tab(self):

    new_post_btn = self.q(css='ol.course-tabs    .new-post-btn')
    return (new_post_btn.present and new_post_btn.visible)
