'Returns true if the user has access to the discussion tab.'

def discussion_tab_present(self, user):

    request = RequestFactory().request()
    request.user = user
    all_tabs = get_course_tab_list(request, self.course)
    return any(((tab.type == 'discussion') for tab in all_tabs))
