Enable completion in Moodle

Ensure that the setting enablecompletion is turned on. It is located in Site administration > Advanced features > Enable completion tracking.

Completion setting

You will also need to enable it in your course. Visit your course’s settings page, and locate Completion tracking > Enable completion tracking, it should be set to Yes.

Course completion setting

For more on completion, please refer to Moodle documention.