Transform the many-to-many relation between User and CourseExecution into two entities, Student and Teacher, which correspond to the many to many relations. For instance, the student dashboard will be in the new Student entity.
Guarantee that a user cannot be simultaneously teacher and student of the same course execution.