Deprecating an Enrolment Method
When an enrolment method is disabled or entirely deleted, is prevents new users from enrolling in the course using the method but it also blocks existing users who had enrolled using the method from accessing the course. Some methods however support the ability to only prevent new users from enrolling in the course (and thereby allowing existing learners to continue to access the course.) This is an acceptable method if for example you want to deprecate an enrolment method in favour of a different one.
Step-by-step Guide
To deprecate an enrollment method (e.g. restrict NEW enrollments for a specific enrolment method yet allow EXISTING learners to continue to access the course):
Go to the course in questions
Go to Course administration > Users > Enrolment Methods
Click on the "Edit" button next to the enrolment method in question
Set "Allow new enrolments" to "No"
Note that this setting does not appear on all enrolment methods and is only useful on self-enrolment methods
Click on the "Save changes" button at the bottom of the page
Important Notes
This setting does not appear on all enrolment methods and is only useful on self-enrolment methods.
The setting above it, labeled "Allow existing enrolments", need to remain set to "Yes" if you want existing learners to continue to access the course.