Hope you’re doing well. I’ve seen the problem you’ve been facing currently. Let me try my hands on in solving it.
=> If you wish to make your course visible to users enrolled in that particular course only, you’ve to make a group of enrolled users for that particular course. After performing this, please visit the link given below:
Administration>course administration>edit settings
And then you’ve to visit the “edit course settings”.
After performing this, go to group fields; change the group mode from 'separate' force group mode to 'yes'.
I hope this’ll resolve your issue. It’s a pleasure to help you. Please feel free to get back to us for any further query.
Thanks and Regards