The answer is a clear maybe.
The school has a set of rules and by not attending you have broken those rules. The rules may (probably do) allow for consideration of extenuating circumstances but, in general, it doesn't have to. There is probably an appeals process, you need to investigate this.
That said, if there are no provisions for extenuating circumstances and/or no appeals process then this may make the contract "unconscionable"; in many jurisdictions this makes the contract void. That doesn't mean you get the marks; it means you get your money back.
The circumstances of your court appearance matter: the school may grant special consideration if you are called as a juror or witness; they might not if you are a defendant.
Ultimately you had a choice, to follow the rules of the court or the school; there are consequences either way.