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?
That is not haraam, but it is better not to take it. And Allaah knows best.