Hello all... We have developed a little local plugin in our moodle (v 3.5) platform. After doing some operations, we need to set a course as completed for a particular user.
I've seen the Activity Completion API (at https://docs.moodle.org/dev/Activity_completion_API) and the code write in lib/completionlib.php and course/completion.php and I've found the way to set an activity as viewed, but I'm not able to find the way to set a course as completed for a student. In this kind of courses we don't have any other activity or resource we can use in course completion criteria, students only see some text in section 0 description.
We have our courses configured to be 'manually' marked as completed by teachers, so I suppose we can do an INSERT query in 'course_completions' table directly in our code, but we prefer to do it better (using Completion API or similar).
What would be the best way to do this?
Thanks in advance for your time...