I am trying to use LtiLibrary and post grades to all students under LTI item in the gradebook in Moodle.
For now, I can post only grade for a student that click on the LTI like so,
I am trying to use LtiLibrary and post grades to all students under LTI item in the gradebook in Moodle.
For now, I can post only grade for a student that click on the LTI like so,
You can only send grades to the links that were used. When a LTI link is used and grades are allowed, a gradable object is created and the reference is supposed to be what you get as lis_result_sourcedid. You can not arbitrarily send a grade to an object that doesn't exist. So the users (all) need to make use of the link. This is the case not only for Moodle but for all the LMS I have worked with.
This means that in your tool provider you also need to keep track of the launches storing the lis_result_sourcedid parameter received. I would also recommend you to store the lis_outcome_service_url parameter if you are planning to support different LMS. It is not the case for Moodle but for others the endpoint is what really changes.
Good luck
It makes sense, works now.