edx/edx-platform — pull request #4237 by iceraj (2014-06-27 17:59:13+00:00)
Title: Fix for empty imsx_messageIdentifier

XML parser dereferences text value as None. This value is later escaped using SAX escape function without checking if value is a string, thus module throws following exception:
...
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/lti_module.py", line 667, in grade_handler
'imsx_messageIdentifier': escape(imsx_messageIdentifier),
File "/usr/lib/python2.7/xml/sax/saxutils.py", line 39, in escape
data = data.replace("&", "&")
AttributeError: 'NoneType' object has no attribute 'replace'
...

This patch ensures value for imsx_messageIdentifier returned from parse_grade_xml_body() is an empty string.