If a person gives a gift to his teacher (of Qur’aan) or to a person from whom he is learning, and if it were not for the fact that he is learning from him he would not have given him a gift, is it permissible for the teacher to accept that gift?
Praise be to Allaah.
That is not haraam, but it is better not to take it. And Allaah knows best.
Fataawa al-Imaam al-Nawawi, p. 152