modifying check_teacher_registration method in school model