Hey Allen,
I have created teacher and student both of them will have separate capabilities.
Next we need to assign any student(user) to Teacher(user) so that teacher can access to students posts and profile and student can only view his teacher info.
For ex: Teacher1, teacher2 and student1, student2, student3
Teacher1 has student1, student2,
Teacher2 has Student3 like wise.
I hope u understand.
thank you