Praise be to Allah.
It is not permissible to impose a financial penalty on a student who falls short, regardless of whether this money is given in charity or is given to the students who complete their work, because this is a kind of financial disciplinary punishment (ta‘zeer), and imposing a financial punishment is the right only of the legitimate ruler or those who act on his behalf, such as judges and those in positions of authority. Moreover, there is a difference of opinion among the scholars as to whether it is permissible in the first place to impose financial punishments.
The basic principle is that it is haraam to take the wealth of the Muslims, because the Prophet (blessings and peace of Allah be upon him) said: “Your blood, your wealth and your honour are sacred to one another, as sacred as this day of yours in this month of yours in this land of yours. Let those who are present convey it to those who are absent.” Narrated by al-Bukhaari (67) and Muslim (1679).
The Standing Committee was asked about what some tribes agreed upon of imposing financial penalties on those who do certain things.
Their response was: This penalty is not permissible, because it is a financial disciplinary punishment imposed by people who do not have the shar‘i authority to impose it. Rather the matter should be referred to the courts, and these penalties should not be imposed (by anyone else).
End quote from Fataawa al-Lajnah ad-Daa’imah (19/252)
And Allah knows best.