If you manually assign the students, or if you enable self enrolment with an enrolment key and you only tell the students you want to be in the course what the enrolment key is, then other students won't be able to get into the course. They might still see it in your list but they won't be able to access it.
Enrolment
Available of a course only for the assigned students
This discussion has been locked so you can no longer reply to it.