Moodle LTI 1.1 error in user grade update with a "null" grade

Moodle LTI 1.1 error in user grade update with a "null" grade

by Vinodya Bandara -
Number of replies: 2

Hello,

We are trying to send an LTI 1.1 grade update request to moodle 3.8(http://3plcgmoodleprd.prd-prsn.com/moodle38/) instance with a null grade value.

Request Body:

<?xml version = "1.0" encoding = "UTF-8"?>
<imsx_POXEnvelopeRequest xmlns = "http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0">
  <imsx_POXHeader>
    <imsx_POXRequestHeaderInfo>
      <imsx_version>V1.0</imsx_version>
      <imsx_messageIdentifier>637907331</imsx_messageIdentifier>
    </imsx_POXRequestHeaderInfo>
  </imsx_POXHeader>
  <imsx_POXBody>
    <replaceResultRequest>
      <resultRecord>
        <sourcedGUID>
          <sourcedId>SampleSourceId</sourcedId>
        </sourcedGUID>
        <result>
          <resultScore>
            <language>en-US</language>
            <textString>null</textString>
          </resultScore>
        </result>
      </resultRecord>
    </replaceResultRequest>
</imsx_POXBody>
</imsx_POXEnvelopeRequest>


For the above request, we got the following response error.

<?xml version="1.0" encoding="UTF-8"?>

<imsx_POXEnvelopeResponse xmlns="http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0">

<imsx_POXHeader>

<imsx_POXResponseHeaderInfo>

<imsx_version>V1.0</imsx_version>

<imsx_messageIdentifier>1018505128</imsx_messageIdentifier>

<imsx_statusInfo>

<imsx_codeMajor>failure</imsx_codeMajor>

<imsx_severity>status</imsx_severity>

<imsx_description>Score must be numeric</imsx_description>

<imsx_messageRefIdentifier>637907331</imsx_messageRefIdentifier>

<imsx_operationRefIdentifier>replaceResultRequest</imsx_operationRefIdentifier>

</imsx_statusInfo>

</imsx_POXResponseHeaderInfo>

</imsx_POXHeader>

<imsx_POXBody>

<replaceResultResponse/>

</imsx_POXBody>

</imsx_POXEnvelopeResponse>


Can we know whether Moodle does not support a "null" grade update for LTI 1.1 or is there any other method we can follow to send a grade update request with a "null" grade?

Average of ratings: -
In reply to Vinodya Bandara

Re: Moodle LTI 1.1 error in user grade update with a "null" grade

by Jake Dallimore -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Vinodya,

That's right, as per the Basic Outcomes specification (https://www.imsglobal.org/spec/lti-bo/v1p1#basic-outcome-service), "The only type of grade supported by this service is a decimal numeric grade in the range from 0.0 - 1.0". Moodle enforces just that.

Hope that helps.

Cheers,
Jake
In reply to Jake Dallimore

Re: Moodle LTI 1.1 error in user grade update with a "null" grade

by Vinodya Bandara -
Hi Jake,

Thank you so much for the update! It really helps.

Regards,
Vinodya