cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
stephen_donohue
Community Participant

Error 400 when reporting grades from LTI tool

I am curious if any other tool providers have started experiencing this issue. We first became aware of it several days ago (4/6/19). Whenever our LTI tool attempts to report to Canvas, we receive the following error:

400 The plain HTTP request was sent to HTTPS port

This is the first time I've encountered this error with our tool in two years. It was working two weeks ago, and we have not updated anything since then. All requests to and from Canvas are over HTTPS as well, which is why this is extra confusing. We have verified that the tool continues to work with other LTI tool consumers.

If anyone has an insight, it would be greatly appreciated. Thank you.

Labels (1)
Tags (2)
0 Kudos
10 Replies
pklove
Community Champion

What do you mean by "attempts to report to Canvas"?  What is the tool doing at this stage?

stephen_donohue
Community Participant

The tool is POSTing the following XML to Canvas at the URL provided in the "lis_outcome_service_url" parameter when launching the tool. The last time I opened the tool this was the provided value:  https://canvas.instructure.com/api/lti/v1/tools/155700/grade_passback 

<?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>MESSAGE</imsx_messageIdentifier>
</imsx_POXRequestHeaderInfo>
</imsx_POXHeader>
<imsx_POXBody>
<OPERATION>
<resultRecord>
<sourcedGUID>
<sourcedId>SOURCEDID</sourcedId>
</sourcedGUID>
<result>
<resultScore>
<language>en-us</language>
<textString>GRADE</textString>
</resultScore>
<resultData>
<url>REPLACEURL</url>
<duration>DURATION</duration>
<detailed_results>DETAILED_RESULTS</detailed_results>
</resultData>
<dataSource>REPLACEURL</dataSource>
</result>
</resultRecord>
</OPERATION>
</imsx_POXBody>
</imsx_POXEnvelopeRequest>

Ah, I see now, you are doing grade passback. 

We have a tool with grade passback and its working fine in a course at  https://canvas.instructure.com, so the problem isn't specifically Canvas.

Probably not related, but what is the dataSource element for?  I haven't seen this in the Canvas or IMS docs.  

Also haven't seen duration or detailed_results in the basic outcomes service.

stephen_donohue
Community Participant

The dataSource element is used for the Submission Details when viewing a grade in Canvas. In our case it is a link back to our tool that displays more information on the assignment.

The duration and detailed_results are used by our own tool consumer we created. They haven't caused any issues with grade passback previously.

Just found a weird problem with our test tool with some browsers if its launched in the same window.  Works fine if we use "Load This Tool In A New Tab".  I'm sure it used to work in both.  It seems to do with a cookie our tool sets.  Works fine in other LMS.

Does changing the "Load This Tool In A New Tab" make any difference to your issue?

I'm till intrigued by this.  Where does the dataSource URL show up?

In your example, you are also setting the resultData/url element, which also shows in Submission Details, and based on the template would have the same value as the dataSource element.  Does it show in a different place?

stephen_donohue
Community Participant

Unfortunately it isn't making a difference if we are loading in a new tab or not.

stephen_donohue
Community Participant

I was mistaken as to the purpose of dataSource, I was confusing it with the resultData. I'm not sure what, if anything it is being used for. 

stephen_donohue
Community Participant

I tried using the tool in the our sandbox environment (still under the instructure.com domain) instead of canvas.instructure.com and the grade passback is functioning properly. I've spent very little time in the sandbox environment, but I haven't found anything that sticks out as different between this and the standard Canvas environment.