@carrie_anderson
This is a great question, and something I've been meaning to address in our documentation.
pklove is correct, there is no standardized LTI way of sending a submission time in the XML.
Taking a step back, however, I think I can give a workaround for you.
Our platform team has extended the LTI outcome service to allow you to specify either a score (using resultScore or resultTotalScore), a submission (using resultData), or both. See our external tool grading documentation for details.
In all of these scenarios, Canvas will mark the time it receives the request as the submission time when the FIRST message is received.
What happens if you send another message?
- When only a score is sent: Canvas will not modify the submission time, but instead just update the grade
- When only resultData is sent: Canvas will create a new submission and set the submission time as the current time. The item will appear as ungraded until the instructor applies a grade, or the tool sends a score
- When both score and resultData are sent: Canvas will create a new submission, set the submission time as the current time, AND apply a grade to that submission
Here's the workaround:
When the student first submits to your tool, immediately send the resultData back to Canvas. Ideally, you'll send an LTI launch URL so that the Canvas users can see the actual submission iframed in Canvas (cool!).
When the other students have completed their peer reviews, you can then calculate the score and send the resultScore back to Canvas. Canvas should not modify the submission timestamp, just the grade
Here's and example with some pictures:
First message:
<?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>999999123</imsx_messageIdentifier>
</imsx_POXRequestHeaderInfo>
</imsx_POXHeader>
<imsx_POXBody>
<replaceResultRequest>
<resultRecord>
<sourcedGUID>
<sourcedId>soucedId value</sourcedId>
</sourcedGUID>
<result>
<resultData>
<ltiLaunchUrl>https://your.tool.domain/submission/show?submission_id=77</ltiLaunchUrl>
</resultData>
</result>
</resultRecord>
</replaceResultRequest>
</imsx_POXBody>
</imsx_POXEnvelopeRequest>
How it shows in the UI:
Second message:
<?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>999999123</imsx_messageIdentifier>
</imsx_POXRequestHeaderInfo>
</imsx_POXHeader>
<imsx_POXBody>
<replaceResultRequest>
<resultRecord>
<sourcedGUID>
<sourcedId>soucedId</sourcedId>
</sourcedGUID>
<result>
<resultTotalScore>
<language>en</language>
<textString>score you want to send</textString>
</resultTotalScore>
</result>
</resultRecord>
</replaceResultRequest>
</imsx_POXBody>
</imsx_POXEnvelopeRequest>
How it now shows in the UI:
I hope this helps, please let me know if you've got any questions about this
Jesse Poulos
Partner Integrations Specialist
Instructure