Need some suggestion/help with custom post types project

Now your outline is pretty brief, so I’ll make a guess at what you’re trying to accomplish.

My approach would be to use the Advanced Custom Fields plugin with the repeater field add-on (you’ll have to pay a small amount for that) and attach a repeater field to your courses custom post type. The repeater field is where you would place your student data…something like a user ID, name, etc. ACF gives you a “user” field where you can select existing users, and this could be how your instructors add students to a class.

If you give your instructor custom role limited access to the backend they will be able to manage the courses and assign the students and you won’t have to build a user interface for that. Even so, there will be several tricky details to get the UI right, this will only sketch in the outlines of what you will need to do.