Mark course completed with WS API call

Mark course completed with WS API call

by Vojtech Pajer -
Number of replies: 0

Hello everyone, 

I am working on a mobile app that communicates with Moodle via Web Service API. App downloads the Moodle course scorm package and presents it in a web view for users to interact with. 

Once the user finishes the course, however, the completion status for that particular user is not saved to the Moodle DB. I've tried using the following ws functions to force marking the course as "completed":

  • mod_scorm_insert_scorm_tracks
  • core_completion_mark_course_self_completed
  • core_completion_override_activity_completion_status
  • core_completion_update_activity_completion_status_manually

neither of them did what I wanted (I am checking the course completion with core_completion_get_course_completion_status, I hope that is correct).

So now I am wondering - is there actually a way to mark the course as completed for a specific user via WS API? And if there is, what ws function should I call to achieve this? 

Thanks in advance for any response and help. 

Average of ratings: -