As the summary said, if an LTI link is created in a version previous to Moodle 2.8 (lets say 2.5) configured to receive grades and used, the reference to the gradebook created at that point does not work if the server is upgraded.
When using the reference (lis_resource_sourcedid) stored by the Tool Provider, Moodle responds with a 404 error.
I got a report from a customer experiencing this and found that response in the logs. I was able to reproduce it by:
-Installing a Moodle 2.5 stable server
-Create the link, set it up to receive outcomes and launch as student.
-Upgrade Moodle to 2.8 stable
-Execute a replaceResult using the lis_resource_sourcedid stored and the response you'll have will be the 404 error
What I found is that the string in the current resourceId is different than the ones generated in the new version. (the new version includes a "typeid" item that in the migrated links seems to be considered as a null)
The original sourcedId would be like this:
The migrated sourcedId would be like this:
Although my guess is that the problem is more in the way the incoming resourceId is validated, I could not tell if is the reference to the record in the gradebook what is really broken. But either way it should be backward compatible.
The workaround for this is to ask students to use the LTI link again. That seems to be rebuilding the reference so the new lis_result_sourcedid generated works fine.