You could have a conditional release of an enrollment key (either in the feedback of the quiz or as a label) based on an end of course exam completion.
Enrolment
Enrolment dependent on on previous course completion
This discussion has been locked so you can no longer reply to it.