A judge reviewing the legality of Otago University's code of conduct for students has reserved his decision at the High Court in Dunedin.
The Otago University Students' Association believes the university's discipline of students for behaviour off-campus and unrelated to their studies is unlawful.
The association's counsel, Bridget Ross, said the university suspended two students for their role in disorder during the association-organised Toga Parade through central Dunedin in February this year.
Ms Ross said the event had nothing to do with the university or academic studies, so it should not legally have been allowed to punish anyone involved.
Ms Ross told the court the code of conduct cannot legally apply to any behaviour outside of university property, or not directly related to academic discipline.
She said the code cannot be justified by a desire to preserve the university's reputation, or to reflect community concern about anti-social behaviour.
But the university's lawyer, Diccon Sim, said the university has a legal right to enact its own discipline where the institution or its members are brought into disrepute.
Mr Sim said when students enrol, they sign a declaration agreeing to abide by the university's regulations.
The code was established in 2006, following rioting related to the Undie 500 car rally that year, organised by Canterbury University's Engineers Society.
Justice Gendall reserved his decision.