With regards to the student of knowledge not behaving deceptively, and what to do if he persists upon this despite being advised, the Noble Shaykh Muhammad ibn Saalih al Uthaymeen rahimahullaah stated:
And I advise you also to stay away from behaving deceptively in the duroos (lessons), especially at the times of examinations. For indeed, behaving deceptively is from the characteristics of the hypocrites, and Allaah forbade it in His statement:
O you who believe, do not betray Allaahand the Messenger and do not knowingly betray your trusts. And know that your possessions and your children are but a trial and that with Allaah there surely is a tremendous reward.
Soorah al Anfaal (8)aayaat 27 to 28
So if you know of someone that they carry out this repulsive action, then it is upon you to advise him. So if he desists from it, then this is what is desired. If not then you tell on him. And this is from sincerity and sincere advice to him before every single thing – with the proof that the Messenger sall Allaahu ‘alaihi wa sallam said:
Help your brother, be he the oppressor or the oppressed. They said: O Messenger of Allaah,this is (regarding) the oppressed one, but how do we help the oppressor? He said: You prevent him from the oppression, so that is your help for him.
Reported by al Bukhaaree (2443, 2444, 6952) from the hadeeth of Anas
Quoted in Wasaayaa wa tawjeehaat li tullaab il ‘ilm pages 144 to 145, translated by Nasser ibn Najam