Fix for empty imsx_messageIdentifier
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -168,3 +168,4 @@ Juanan Pereira <juanan.pereira@ehu.es>
|
||||
Clinton Blackburn <cblackburn@edx.org>
|
||||
Dennis Jen <djen@edx.org>
|
||||
Filippo Valsorda <hi@filippo.io>
|
||||
Ivica Ceraj <ceraj@mit.edu>
|
||||
|
||||
@@ -694,7 +694,7 @@ oauth_consumer_key="", oauth_signature="frVp4JuvT1mVXlxktiAUjQ7%2F1cw%3D"'}
|
||||
parser = etree.XMLParser(ns_clean=True, recover=True, encoding='utf-8')
|
||||
root = etree.fromstring(data, parser=parser)
|
||||
|
||||
imsx_messageIdentifier = root.xpath("//def:imsx_messageIdentifier", namespaces=namespaces)[0].text
|
||||
imsx_messageIdentifier = root.xpath("//def:imsx_messageIdentifier", namespaces=namespaces)[0].text or ''
|
||||
sourcedId = root.xpath("//def:sourcedId", namespaces=namespaces)[0].text
|
||||
score = root.xpath("//def:textString", namespaces=namespaces)[0].text
|
||||
action = root.xpath("//def:imsx_POXBody", namespaces=namespaces)[0].getchildren()[0].tag.replace('{'+lti_spec_namespace+'}', '')
|
||||
|
||||
Reference in New Issue
Block a user