Not quite sure why calling a function belonging to a student assignment is relevant to marking a lesson complete.
If you have a look at the code on /local/mobile/db/services.php you can find a list of web services that the mobile app can call for example.
There are 4 web services that might be more relevant:
In particular the update activity completion status manually looks interesting.
If you call that web service the code in /completion/classes/external.php function you might have better results
If you aren't trying to complete an activity manually, sorry, please explain what you are trying to achieve.