that's really shitty man, just plain bad luck. really bad luck
but look at it this way, according to google, Canada's school year is 190 days usually, 180 in quebec, so it's 190 for you then I believe.
You said you missed 2.5 months (approximately)... or about 75 days total, minus weekends/non-school days, we'll say it comes out to 20 days (30 days a month we'll say, that's 4 weekends or 4x2=8 days x 2.5 months)
75 - 20 days = 55 school days missed out of a total of 180 school days (or whatever it is where you live)
(190-55) / 190 = 71% attendance rate. So basically, you missed just under 1/3 of the school year.
It really really sucks and I know you don't want to hear this, but consider all of the learning you missed out on, learning that will be the foundation for what you do for the rest of school. That's why they're making you re-do it, because they feel you'd be ill-prepared for the next year if they gave you the ok to move on.
tl:dr you missed 1/3 of the school year, it's unfair but that's life