How do you assign teachers and sections?

How do you assign teachers and sections?

Teachers are assigned to the sections based on the specific needs of the class students and their expertise and randomly.