diff --git a/common/lib/xmodule/xmodule/poll_module.py b/common/lib/xmodule/xmodule/poll_module.py index f7e76760006d..7ae6e2174a20 100644 --- a/common/lib/xmodule/xmodule/poll_module.py +++ b/common/lib/xmodule/xmodule/poll_module.py @@ -182,13 +182,13 @@ def definition_from_xml(cls, xml_object, system): def definition_to_xml(self, resource_fs): """Return an xml element representing to this definition.""" - poll_str = '<{tag_name}>{text}'.format( + poll_str = u'<{tag_name}>{text}'.format( tag_name=self._tag_name, text=self.question) xml_object = etree.fromstring(poll_str) xml_object.set('display_name', self.display_name) def add_child(xml_obj, answer): - child_str = '<{tag_name} id="{id}">{text}'.format( + child_str = u'<{tag_name} id="{id}">{text}'.format( tag_name=self._child_tag_name, id=answer['id'], text=answer['text']) child_node = etree.fromstring(child_str) diff --git a/common/lib/xmodule/xmodule/xml_module.py b/common/lib/xmodule/xmodule/xml_module.py index e692dfb21ca4..47682b8ea200 100644 --- a/common/lib/xmodule/xmodule/xml_module.py +++ b/common/lib/xmodule/xmodule/xml_module.py @@ -387,7 +387,10 @@ def export_to_xml(self, resource_fs): try: xml_object.set(attr, val) except Exception, e: - logging.exception('Failed to serialize metadata attribute {0} with value {1}. This could mean data loss!!! Exception: {2}'.format(attr, val, e)) + logging.exception( + u'Failed to serialize metadata attribute %s with value %s in module %s. This could mean data loss!!! Exception: %s', + attr, val, self.url_name, e + ) pass for key, value in self.xml_attributes.items(): diff --git a/common/test/data/toy/chapter/poll_test.xml b/common/test/data/toy/chapter/poll_test.xml index bbb340e9363b..678feff9da62 100644 --- a/common/test/data/toy/chapter/poll_test.xml +++ b/common/test/data/toy/chapter/poll_test.xml @@ -1,6 +1,6 @@ -

Have you changed your mind?

+

Have you changed your mind? ’

Yes No