Activity completion on plugin

Activity completion on plugin

by Murilo Baptista -
Number of replies: 2

Hello, I'm making a plugin that is a progress bar in map format and one of the things I'm struggling with is how can I get from the database which sections were completed by the user on the course the plugin was installed so I can pass on to the javascript.

Thanks

Average of ratings: -
In reply to Murilo Baptista

Re: Activity completion on plugin

by Darko Miletić -

Use the available web services in Moodle or write your own and than call them from javascript using the AJAX module.

https://docs.moodle.org/dev/AJAX

List of avaliable web service methods in Moodle can be found here

https://docs.moodle.org/dev/Web_service_API_functions


In reply to Darko Miletić

Re: Activity completion on plugin

by Murilo Baptista -

Hi Darko,

I made my application with AJAX and it worked but I don't want to rely on cron. I remade using the completion library but I don't know how to find the id of the activities that are required to complete the course, so I can ignore activities that won't be a progress on the map I'm making, do you know where I should look?

Thanks, Murilo