The World Federation One Stop Fiqh

Ruling 1750

A muʿtakif can leave the place of iʿtikāf to sit secondary school, university, or ḥawzah (Islamic seminary) examinations in the event that it is commonly considered 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 not a problem.