You are right, I forgot this was inside multiple choice.


On Thu, Feb 27, 2014 at 12:00 PM, Gabe Mulley <notifications@github.com>wrote:

> In common/lib/capa/capa/inputtypes.py:
>
> > @@ -419,6 +435,28 @@ def extract_choices(element):
> >              choices.append((choice.get("name"), stringify_children(choice)))
> >          return choices
> >
> > +    def _make_choices_map(self):
> > +        """Returns a map of choice names to human readable text."""
> > +        choices_map = {}
> > +
> > +        for name, text in self.choices:
> > +            try:
> > +                choices_map[name] = etree.tostring(etree.fromstring(text), method='text')
> > +            except etree.XMLSyntaxError:
> > +                choices_map[name] = text
> > +
> > +        return choices_map
> > +
> > +    def get_input_text(self, answers):
> > +        if isinstance(answers, basestring):
>
> Not in a multiple choice context. Other answers are just passed through in
> their raw form, so I don't think we have to worry about this. For a choice
> group, the answers will either be: "choice_0" or ["choice_0", "choice_1",
> ...] depending on the display type (checkbox, radio buttons etc).
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/2721/files#r10131599>
> .
>



-- 
Carlos Andrés Rocha
Senior Software Engineer
www.edx.org