Stunned this feature doesn't already exist.
We shouldn't need to change enrolment windows on individual students or use an external script.
Once a quiz is completed (successfully) or a page reached, we should be able to set a flag in Canvas to mark the course as complete.
This could trigger a certificate, mark the course as complete in the dashboard and provide a flag for the API to recognize the user has completed the course (and attained the relevant qualification). It could/should also email the course admin/facilitators to say the student has completed the course.
This feature would enable self-subscribed/self-paced certificates. An example would be the “responsible service of alcohol” (RSA) certificate here in Australia. RTOs are charging $25-$65 pp. , once the course is built it just churns away making them money. Students register themselves (making payment), study the course, attain the qualification and receive the certificate, all without a Canvas admin having to do anything.