'Returns True if course has discussion tab and is enabled'

def is_discussion_tab_enabled(self):

    tabs = self.tabs.all()
    for tab in tabs:
        if ((tab.tab_id == 'discussion') and django_comment_client.utils.is_discussion_enabled(self.id)):
            return True
    return False
