service.php returning 404 when trying to submit grades

service.php returning 404 when trying to submit grades

by Eric Ellis -
Number of replies: 10

I'm implementing a LTI provider service for our moodle 2.2 instance.  I have the oauth interchange working from moodle to the tool, but when attempting to post a grade back to moodle, I'm getting a 404 from CURL.  I can access the php in question and it gives me the error "Exception - Consumer key is missing". 

I suspect I have a configuration issue that I'm not aware of yet, as I'm just starting to work with moodle.  Any help appreciated. 

Average of ratings: -
In reply to Eric Ellis

Re: service.php returning 404 when trying to submit grades

by Eric Ellis -

Nevermind, I discovered that my submit was borked.  Can anyone provide me a spec for how this is implemented?  The only thing I've found is that "everything's supposed to be encoded in a post". 

In reply to Eric Ellis

Re: service.php returning 404 when trying to submit grades

by Eric Ellis -

After some serious grinding, I got my external tool to work using the simple harness on IMS' website (http://www.imsglobal.org/developers/LTI/test/v1p1/lms.php) and it indicates that I'm submitting the grade properly.  I'm still getting a 404 when I try to use it on my moodle instance.  Any assistance would be appreciated. smile

In reply to Eric Ellis

Re: service.php returning 404 when trying to submit grades

by Eric Ellis -

There is something very wrong here...  Out of the box it appears that he latest 2.2.1+ doesn't accept grades via LTI. 

I was using this to test, supplied by http://www.imsglobal.org/developers/LTI/test/v1p1/tool.php

Using my site secret it returns the following:  Exception - Message signature not valid

This indicates to me that there may be something wrong with the OAuth implementation on either side.  I'm not certain how to approach this problem anymore. 

I've attached a screenshot of the external tool configuration in my moodle instance. 

Attachment external_tool_setup.png
In reply to Eric Ellis

Re: service.php returning 404 when trying to submit grades

by John Andrewartha -

If you want you can use this game to test against my site.

It will return grades that show in the gradebook. Keep in mind that I have experienced upload issues to a LTI provider. IE assignments. I will leave the tool open until Sunday late after noon, East Australian Time (UTC +11).

Shared Secret   fae405cd4e1d47f48c363f49428d0395

Launch URL  http://beasty.dorset.org.au:5050/moodle/local/ltiprovider/tool.php?id=14

Its a game of hangman in Afrikaans it should report back to your gradebook.

John

In reply to John Andrewartha

Re: service.php returning 404 when trying to submit grades

by Eric Ellis -

It doesn't appear to be working as stated in my moodle instance. 

Turning on debugging I'm not seeing any data coming into my moodle instance either. 

Data is identical, aside from the secret being changed to reflect the one you supplied. 

Thank you for your assistance. smile 

In reply to Eric Ellis

Re: service.php returning 404 when trying to submit grades

by Dwayne Towell -

I have been having exactly the same problem and we are using version 2.3.1+. Did you ever figure out what was going on? This really holding us up.

In reply to Eric Ellis

Re: service.php returning 404 when trying to submit grades

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I've just been discussing this with someone on IRC. It looks like Moodle doesn't currently support OAuth message signing with x-www-form-urlencoded. It currently only supports application/xml style messages.

See http://www.imsglobal.org/lti/v1p1pd/ltiIMGv1p1pd.html#_Toc309649688 for more info on the specification. There's an example in http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html#anchor15

Andrew

In reply to Eric Ellis

Re: service.php returning 404 when trying to submit grades

by Sam Youtsey -

Hi there, I'm seeing this same error, a 404 when trying to access the service.php. Did anyone ever get a resolution to this problem? Thanks!

In reply to Sam Youtsey

Re: service.php returning 404 when trying to submit grades

by Eric Ellis -

I wound up flipping my infrastructure over due to other constraints that the business has put on me:  I built my own consumer that moodle submits to, so I've moved away from trying to fix this problem for the time being.  If I grind on this problem any more, I'll post here.  

In reply to Eric Ellis

Re: service.php returning 404 when trying to submit grades

by moodle user -

Is there a solution for this problem? I am facing the exact same issue. We are trying to send messages in application/xml format only. Thanks in advance!