Quantcast
Channel: LTI and Moodle
Viewing all articles
Browse latest Browse all 2848

IIS - Moodle LTI does not work for two way communications with LTI providers on IIS

$
0
0
by Perry Way.  

Hello everyone,

We have a strange situation here we've been attempting to solve over the course of years. We have two LTI providers, Testout and Cengage. They work in respect as it allows communication to the provider but when the provider returns back grades it does not work.

It's taken years but we have finally worked our way to the top of the Cengage technology staff. I myself am a developer and have built Moodle plugins. I understand this technology first hand, so it was a pleasure to finally work with them over the course of the last week to resolve our issues.

We we both determined is that IIS does not operate with the prescribed Moodle LTI implementations. The paths that both of these vendors use when doing the round trip communications back to us (reporting the grades) wind up getting mangled by IIS or by Moodle. Technically IIS doesn't mangle anything but as soon as it's touched by Moodle a "slash arguments" formed URI becomes mangled.

The result is a cryptic message reporting "No handler found for /".  The Moodle service then spits out the following JSON if you attempt to use your browser to hit this path you can view the 400 data returned: https://<site domain>/mod/lti/services.php/file=/8612/lineitems&type_id=2709

{
    "status": 400,
    "reason": "No handler found for / text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 ",
    "request": {
        "method": "GET",
        "url": "/mod/lti/services.php/?file=/file=/8612/lineitems&type_id=2709",
        "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        "contentType": ""
    }
}

It appears that the problem is highly exacerbated by PHP on IIS. If you notice the original path of :

/mod/lti/services.php/file=/8612/lineitems&type_id=2709

becomes

/mod/lti/services.php/?file=/file=/8612/lineitems&type_id=2709

Interestingly this behavior does not happen on IIS for other technologies. Only Moodle is affected and my assumption is that this has to do with how PHP or Moodle interprets "slash arguments". IIS actually seems to work for other technologies without mangling the URI path. 

The debugging that I have managed to do on a test site indicates that due to the mangling of the URI path there is nothing that can be parsed from it so eventually gets interpreted as a path of nothing, or "/" because it cannot find the handler for it because the URI path is mangled.

Other posts I have found related to this problem in the past have gone unanswered. I know IIS is not a widely used web server in the Moodle community. I understand that. My belief is that the only reason why IIS is even an issue is because other technologies haven't fully supported IIS. Unfortunately at this moment I am unable to ascertain if the problem lies with PHP or with Moodle's use of PHP on IIS. 

If anyone has any information on how to solve this issue, I would love to hear it.  Our instructors are tired of reporting grades manually. They would like to make use of the full features of our providers which means reporting back the grades received on tests and whatnot.


Viewing all articles
Browse latest Browse all 2848

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>