The World Federation One Stop Fiqh

Ruling 1750

A muʿtakif can leave the place of iʿtikāf in order to sit secondary school, university, or ḥawzah (Islamic seminary) examinations in the event that it is commonly considered to be necessary. However, he must not stay outside the mosque for a long time such that the form of the iʿtikāf is lost; up to two hours, for example, is no problem.