He told the students to pay money towards classroom renovations and he gives them grades accordingly
Question

                The teacher asked us to pay 30 riyals before the exam for renovating the classroom, and he gave extra marks for participation or extra marks in the exam if the participation mark was already complete… and he claimed that this is permissible because the extra marks were not on the exam paper, rather it was in the final total of the marks and the opportunity was available to all students. It was to be paid before the exam and whoever was not able to pay that money could have had the amount reduced and if he was not able to pay at all, he could have been let off, so he could still have the same advantage as the other students had who did pay. Is what he did correct? Please give a detailed reply, quoting evidence.
Praise be to Allah.The teacher 
    does not have the right to take anything from the students, even if that 
    this for the purpose of renovating the classroom, because that is not the 
    responsibility of the students; rather it is the responsibility of the 
    school. This money in many ways is similar to the haraam maks (customs levy 
    or purchase tax) – see question no.
    39461 
    concerning the prohibition of the maks. 
Marks for 
    participation are only given to students for their efforts and hard work in 
    their studies, not for giving money to the teacher! The same applies to 
    grades in the test, they should be based on what the student has written on 
    his test paper, and have nothing to do with renovation or adornment of the 
    classroom. 
If the 
    teacher gives marks to students in return for them giving him money, this 
    goes against the education system and is also wronging people with regard to 
    their wealth, and exposing the poorer students to embarrassment when they 
    have to tell him that they cannot pay all or some of the money. 
The teacher 
    has to fear Allaah and give each student the grades that he deserves 
    according to the education system that is in place. He should not ask the 
    students for money, no matter how little. 
The teacher 
    should encourage the students to donate money for repairs to the classroom, 
    or for any other charitable cause. That comes under the heading of 
    cooperating in righteousness and piety. It also makes the students get used 
    to spending money on charitable causes. But that should have nothing to do 
    with the grades that the students get. 
And Allaah 
    knows best.