A teacher in Senegal has been given a five-year prison sentence and another has been fined $32,000 (Â£24,300) for selling exam papers.
French, English, history and geography baccalaureate tests had to be scrapped last year after the question sheets circulated on social media and WhatsApp.
Several other teachers and dozens of pupils have also been punished.
Their sentences range from two-month suspended terms to two years in jail.
The headmaster of LycÃ©e de Kahone in Senegalâ€™s capital city, Dakar, admitted selling exam papers but said he was not motivated by the money.
â€œI wanted to help someone vulnerable who was struggling to get their baccalaureate,â€ Mamadou Djibril Dia is quoted by news site La Vie Senegalaise as telling Dakarâ€™s Correctional Court.
â€œ[She] asked me to help her because she had already failed twiceâ€¦ If I had wanted to make money I would have sold the tests to wealthier people,â€ he added.
In addition to his five-year prison sentence, Dia was fined 500,000 CFA francs ($886; Â£676).
â€˜A lesson for teachersâ€™
Teachers from at least two secondary schools have also been sentenced for â€œcriminal conspiracy, fraud and fraudulently obtaining undue material benefitsâ€.
The heaviest of these was a fine of $32,000 and a two-year prison sentence handed to French teacher Abdoulaye Ndour of LycÃ©e Yalla Suren.
Senegalese news site Le Soleil says the court heard evidence that Ndour had placed $12,000 of proceeds from exam paper sales in his bank account.
A total of 32 pupils received suspended sentences for their involvement, ranging from six months to two years in jail.
â€œWe were shocked by the magnitude of the fraud,â€ said Saourou SÃ¨ne, of Senegalâ€™s national union of middle and secondary school teachers (SAEMS).
â€œThis verdict should serve as a lesson to anyone who might be tempted to sabotage or scuttle the baccalaureate in Senegal.â€