Hello.
I am trying to figure out how the grades are supposed to be passed from Tool Provider to Modole Platform. I found one wirking instruction instruction but I am not sure if this instruction is complete or even the one supposed to be used. According to it one must make a POST request to eg http://example-moodle-instant.com/mod/lti/services.php/{courseid}/lineitems/{gradeitemid}/lineitem/scores/?type_id=19} with access token in headers and some grade info in the body.
I had no problem in retrieving token (aka authentification with JWT). But I want to understand how Provider is supposed to get course id and grade item id parameters (which are more or less internal Moodle data) used in the request link.
I figured, that using standard Moodle API it is possible to get both course id and grade item id for userid and cmid, which Provider recieves among other parameters when Moodle user opens External tool. But this way seems to be too hard? as there must also be a user for api for each tool provider and in total it takes 4 requests to set a grade.
What am I missing? Is there some more adequate way?