Changed the way teacher is edited

Also checked school id in student edit