Commit 8a75e1ad by Julian Arni

Added comment

parent a770e34b
...@@ -633,9 +633,11 @@ class MultipleChoiceResponse(LoncapaResponse): ...@@ -633,9 +633,11 @@ class MultipleChoiceResponse(LoncapaResponse):
# define correct choices (after calling secondary setup) # define correct choices (after calling secondary setup)
xml = self.xml xml = self.xml
cxml = xml.xpath('//*[@id=$id]//choice', id=xml.get('id')) cxml = xml.xpath('//*[@id=$id]//choice', id=xml.get('id'))
self.correct_choices = [contextualize_text(choice.get('name'), # contextualize correct attribute and then select ones for which
self.context) for choice in cxml if # correct = "true"
contextualize_text(choice.get('correct'), self.context) == "true"] self.correct_choices = [contextualize_text(choice.get('name'), self.context)
for choice in cxml
if contextualize_text(choice.get('correct'), self.context) == "true"]
def mc_setup_response(self): def mc_setup_response(self):
''' '''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment