Short Answer: Basically, yes. A very lengthy exam is an extenuating, rare circumstance wherein the dispensation to delay and combine prayers, usually reserved for traveling, would apply, much like it applies when one is sick.
Thank you for contacting About Islam with your question. Dr. Shabir Ally from Quranspeaks.com addresses this question in the video below.
Aisha Khaja: Dr. Shabir, the question today is about making up prayers.
If a prayer time falls when someone is taking an exam, for example–a maghrib prayer–can that prayer be offered together with isha?
Dr. Shabir Ally: The simple answer is yes.
And the elaboration of that, if I’m allowed, is that generally the prayers have to be offered within specific times and the times are well-known, and they’re printed on prayer charts and so on.
But some flexibility is allowed for certain circumstances. And the most popular and known circumstances is traveling.
According to most schools of Islamic law, when a person is traveling a far distance away from home, these are defined very specifically in our classical books.
Some say 48 miles and more, and then you are allowed to combine the two afternoon prayers and two night prayers.
So, you pray the morning prayer separately by itself, and the early afternoon [dhuhr] and late afternoon [asr] prayer are lumped together.
The night prayer [maaghrib] and the late-night prayer [isha] are also likewise lumped together.
So, for a student, it may be possible that you pray two prayers early. Then you have your exam, and then the last two prayers you pray them [normally].
Aisha Khaja: So, you’re applying the traveling ruling to exams.
Dr. Shabir Ally: Similar condition because of extenuating circumstances.
So, you’re not traveling, but you’re not very well and you can apply the same sort of permission as well.
I hope this helps answer your question. Please keep in touch.
(From AboutIslam’s archives)