'Generates Choice Group CAPA problem XML'

def _get_problem_choice_group_text(self, name, items):

    items_text = '\n'.join(["<choice    correct='{correct}'>{item}</choice>".format(correct=correct, item=item) for (item, correct) in items])
    return textwrap.dedent('\n                                <problem>\n                                                <p>{name}</p>\n                                                <multiplechoiceresponse>\n                                                                <choicegroup    label="{name}"    type="MultipleChoice">{items}</choicegroup>\n                                                </multiplechoiceresponse>\n                                </problem>').format(name=name, items=items_text)
