Shaykh Ibn Uthaymeen was asked:

Question:

Oh Virtuous Shaikh, May Allah preserve you [this was before the Shaikh’s death, may Allah have mercy upon him]. [What is the ruling] in regards to a teacher leaving early after finishing fifth or sixth period after completing all his scheduled classes for the day, even though period six and seven remain in the school day?

Answer:

“This is according to the system of the school. If the system prevents him from leaving except at the end of the school day, then it is a must for him to stay, even if he does not have work. If the system allows him to leave after he completes his classes, then he can leave”.

[Fataawa Noor ‘ala Darb no. 640]

Translated by

Faisal Ibn Abdul Qaadir Ibn Hassan
Abu Sulaymaan