I am looking for alternatives to avoid manually logging into Moodle and saving grades as an Excel file. Ideally, I would like to find an automated protocol to (i) login, (ii) get grades and (iii) logout.
Thanking in advance for any suggestions,
Look into the Moodle REST API documentation and see if if grades can be obtained. You can do most things using the REST API. The documentation is quite good. Just generate a user, set required capabilities, generate a token, get a client for the API (There is one on GitHub) and use that in your php code. I use this to get users and their information.
Dear Madhu, thank you for the reference. The REpresentation State Transfer (REST) to access Moodle data and the moodle-rest-client available in Github (I found it is in node.js) are very likely do what I am looking for. As soon as I find some time I will do a test and post more information here.