If he smoked weed before he went to class, then yes, cannabis can do that.

If he smoked something, then a few hours later, or days went by, it isn't the result from any drug. Any drug induced sezuires happen within 30 minutes of taking any drug. If he had a sezuire many hours after smoking, it's the result of something else, not drugs.

He could have Epilepsy, but I would suggest he gets a full body screening, mainly his brain. Sezuires happen sometimes due to loss of blood flow to the brain, or lack of air to the brain, so guessing what medical problem he has could be hundreds of things, so that's why he should get some tests done just to be sure.