This one was so basic I'm flabbergasted it had never been asked before.
Can you change Moodle- of whatever version- so that it only shows a student the courses they're enrolled in, once they're logged in?
I don't know why I never thought of this before.