For more info about activity completion in moodle you can refer
http://docs.moodle.org/dev/Activity_completion_API
General developer forum
Set activity completion using PHP
This discussion has been locked so you can no longer reply to it.