Keith Pridgen, left, and twin brother Steven were reprimanded by a review committee at the University of Calgary for making critical Facebook posts about a professor in 2007. ((CBC))

Alberta's highest court is siding with two University of Calgary students who say their charter rights were violated when the school punished them for criticizing a professor on Facebook.

The Court of Appeal upheld Wednesday a lower court ruling that found the Charter of Rights do apply when universities are handing out discipline to students.

The case involved twin brothers, Keith and Steven Pridgen, who in 2007 posted critical remarks in a Facebook group devoted to complaints about one of their professors.

The university found the brothers guilty of non-academic misconduct and put them on probation, but they appealed to the courts, arguing they had a right to free speech.

When a judge agreed with the brothers, the university took the matter to the next level, arguing that its students don't have the right to freedom of expression because the charter does not apply to universities.

The three judges on the appeals panel all agreed to dismiss the appeal, and each of the judges wrote their own reasons for arriving at their decision.

University responds

The University of Calgary released a statement Wednesday afternoon saying it acknowledges the need to improve its non-academic policy.

The school said it has already revised its disiplinary policy to include centralized non-academic misconduct procedures so they are consistent for all students.

The statement goes on to say it "will be considering the full implications of the Court of Appeal's decision over the coming weeks." 

With files from CBC News