If create a non-sequential course user can attempt randomly any section. There is a case when course has a few sections and user attempts only last one he can finish whole course without attempting all other sections:
Add additional condition to check if user has started all sections for a non-sequential course:
n/a
n/a
n/a
n/a
Fixed
5.0
Code