Japanese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Japanese language. It only takes a minute to sign up.Sign up to join this community
This sentence is grammatically correct but semantically weird. This sentence has the subsidiary verb くれる, which indicates the teacher did something good for you. In this case, you were negatively affected by the teacher, so くれる is not an option.
so you should use the passive form rather than くれる. This type of passive form is particularly called "suffering passive". Here is the corrected version:
(Note for more advanced learners: In fact, the sentence in question is not absolutely incorrect because くれる is sometimes used when someone did something bad for you. See Using くれる for doing something bad for details. This type of くれる sounds arrogant and derogatory. Beginners should not use くれる in this situation even when the teacher is not present.)