def get_choice_text(element, index=None): default_text = paragraph_const.CHOICE_TEXT if base_manager.has_title(element): title = paragraph_const.CHOICE_TEXT_TITLE_FORMAT.format( base_manager.get_title(element) ) default_text = paragraph_const.CHOICE_TEXT_FORMAT.format(title) choice_text = base_manager.get_choice_text(element, None, True) if choice_text is None: choice_text = default_text return choice_text
def get_choice_text(element, index=None): if index is not None: indexed = base_manager.is_indexed(element, book_const) else: indexed = False default_text = book_const.CHOICE_TEXT if base_manager.has_title(element): title = book_const.CHOICE_TEXT_TITLE_FORMAT.format( base_manager.get_title(element) ) if indexed: default_text = book_const.CHOICE_TEXT_INDEXED_FORMAT.format(index, title) else: default_text = book_const.CHOICE_TEXT_FORMAT.format(title) choice_text = base_manager.get_choice_text(element, None, True) if choice_text is None: choice_text = default_text return choice_text
def get_choice_text(elements_list): choice_text = base_manager.get_choice_text(elements_list, list_const ) return choice_text
def get_choice_text(element, index=None): constants = get_constants(element) choice_text = base_manager.get_choice_text(element, constants) return choice_text