'How to read / fetch result from the tool provider ( Moodle )?

I am creating a tool consumer platform where our students can do courses in one of the tool providers (they are providing different courses). To access the tool provider courses we are using LTI version 1.1. Now after completing the course and test by our students, then the tool provider can generate student results In terms of 0 and 1 so I need to fetch that result from the Tool provider and save this result in our system for future use. so how a tool consumer can access his grade book from the tool provider?

We are passing below two parameters with Lunch Request:

$parms["lis_outcome_service_url"] = " http://localhost/LtiDemo/public/outcome-response?b64=a2V5Ojo6c2VjcmV0";
$parms["lis_result_sourcedid"] = "38c5b312c8f47f30c2bbbc8b9969229226";

As per conversion with third party they are sending result in our lis_outcome_service_url once the test will completed by student but In tool consumer side we did not received any result from that url so can you please guide me how we get the result or grade from tool provider?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source