If someone cheats in the exam and Allah conceals his sin, does he have to tell anyone?
Question

If someone cheats in the exam and Allah conceals his sin, does he have to tell anyone? My question is: a few days ago, one of the teachers came in, and after she had finished teaching her lesson, and before we received the test papers, she offered supplication asking Allah to expose everyone who cheated or helped any of the students to cheat, and to prevent them from being admitted to the university, and if they were admitted to the university, she prayed that Allah would not bless their time, and she continued to offer supplication regarding everything in their future, and she said that she would never forgive us until the Day of Resurrection. … Is it her right over ne that I should not cheat? Please note that I am in my final year and I have never cheated willfully in this subject before, but on one occasion I heard the answer from one of the other students with whom I have no other connection except that she is merely a classmate, so I wrote the answer. I know that cheating is haram; do I have to admit it? If Allah has concealed my sin, why should I tell anyone? Please note that I am really scared, and it is my ultimate wish to be admitted to the university.
Praise be to Allah.It is haram to cheat in exams and otherwise, because the Prophet (blessings and peace of Allah be upon him) said: “Whoever cheats (or deceives) is not of me.” Narrated by Muslim (101).
The one who commits any such act must repent to Allah, may He be exalted, but he does not have to tell anyone. Rather he should accept the concealment of Allah, may He be exalted, regret his sin and resolve not to go back to it. Muslim (2590) narrated from Abu Hurayrah that the Prophet (blessings and peace of Allah be upon him) said: “Allah does not conceal a person’s sin in this world but He will conceal it on the Day of Resurrection.”
This is glad tidings for the penitent whose sin Allah, may He be exalted, concealed in this world, for Allah will also conceal his sin in the hereafter. The Prophet (blessings and peace of Allah be upon him) confirmed this meaning, according to a report narrated by Ahmad (23968) from ‘A’ishah, according to which the Messenger of Allah (blessings and peace of Allah be upon him) said: “There are three things I swear to: Allah, may He be glorified and exalted, does not regard one who has a share in Islam like one who does not have a share. The shares of Islam are three: prayer, fasting and zakaah. Allah, may He be glorified and exalted, does not take care of anyone in this world then abandon him to someone else on the Day of Resurrection. And no man loves people but Allah, may He be glorified and exalted, will cause him to join them. And there is a fourth thing – if I swear to it, I hope that I will not be sinning: Allah, may He be glorified and exalted, does not conceal a person’s faults in this world but He will also conceal his faults on the Day of Resurrection.”
Al-Albani classed this hadith as sahih in as-Silsilah as-Sahihah, no. 1387.
In fact, the Prophet (blessings and peace of Allah be upon him) enjoined this concealment, as he said: “Avoid this filth that Allah has forbidden. Whoever does any such thing, then let him conceal it with the concealment of Allah.” This hadith was narrated by al-Bayhaqi and classed as sahih by al-Albani in as-Silsilah as-Sahihah, no. 663.
Based on that:
Whoever has cheated in his exams, let him repent from that and not do it again, and let him conceal his action.
If you did not ask your classmate – rather you heard the answer from her without any request for that on your part – this is not regarded as cheating, and there is no blame on you, in sha Allah, for writing down what you heard without asking for it or seeking it.
With regard to the teacher’s supplication against those who cheat, as mentioned in the question, it seems to us that this was a transgression against others, because refraining from cheating has nothing to do with her rights and it has nothing to do with her personally; rather refraining from cheating is something that we owe to Allah, may He be exalted, so it does not matter whether she forgives it or not. If she had limited her supplication to asking Allah to expose the one who cheated, then she may have had a point, but she overstepped the mark in offering supplication by saying more than was appropriate for her to say in such a situation. Perhaps she wanted to scare the students and deter them from cheating.
May Allah forgive us, her, and all the Muslims.
And Allah knows best.