Getting Today Sessions Using API

Re: Getting Today Sessions Using API

by Matteo Scaramuccia -
Number of replies: 0
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Pavol,

Is there any documentation on attendance API , or example that I can look at ? I was not able to find any.

you can access the WS documentation through Moodle via Site administration > Plugins > Web services >  API Documentation (/admin/webservice/documentation.php, slow page) and expanding one among [ mod_wsattendance_get_courses_with_today_sessions, mod_wsattendance_get_session, mod_wsattendance_update_user_status ] in your case.
Otherwise, just jump into the code of the module and look for the web services implementation.

I'd switch the first two calls, getting the token first and using the wstoken when calling core_webservice_get_site_info.
Besides, you can POST username and password to get the token: this will avoid registering the password in your logs.

HTH,
Matteo

Average of ratings: Useful (3)