If an activity has been completed by a student but has not been recorded, it can be overridden. This may be caused by a change to the activity completion settings or setting up activity completion after an activity has been completed.
Go to your Moodle course and click Admin > Courseadministration > Reports > Activitycompletion
Click the exclamation mark on the activity column for the student you wish to override the completion for.
Confirm your changes by clicking on Savechanges.
The activity will now be marked as completed with a checkmark on a dotted red box.