We only assign the certificate if the user has finished the course, and the user can finish the course only by first marking all the units as complete.
-----------------
There are 2 settings in LMS settings which you can use:
- Auto mark units complete.
- Auto trigger finish course button.
Refer:
http://prntscr.com/epv5za
Using these settings you can hide the mark unit complete button and auto trigger finish course button, but still the user will have to open each unit atleast once.