In March 2014, five boys used the drug one of them had acquired. Three were excluded from class, which the International Education Appeal Authority criticised.
Jessice Dickson, counsel for the school board of trustees, said the authority wrongly characterised the school's actions as a suspension on disciplinary grounds, which was not allowed. Instead, it was a breach-of-contract matter between the school and the pupils, whose names were suppressed, and the authority was wrong to say education law overrode that.
The contracts signed by the boys' parents said the youngsters must abide by New Zealand laws, not take non-prescribed drugs and abide by Tauranga Boys' College rules.
Jason McHerron, a lawyer appointed to help the court, said while Tauranga Boys' College might have wanted the matter to be a contract dispute, it suspended the pupils for disciplinary actions, which Ms Dickson agreed was unlawful.
Justice Ellis said there was no error in the International Education Appeal Authority's findings and said the college "acted unlawfully in expelling [student] L and excluding [student] E on the grounds of gross misconduct".
The contracts between the school and the boys' parents could not "override the act or give Tauranga Boys' College the right to terminate (and effectively to expel and exclude) on grounds that were inconsistent with the act", she wrote.
She conceded the authority did breach natural justice by failing to give the school the chance to respond before releasing its decision but said there was no merit in any of the other grounds of review.
She dismissed the application and confirmed the authority's ruling and said the school now needed to comply with the authority's remedial directions.
The authority directed the school revoke the expulsion and exclusion and tell Immigration New Zealand and that the school should refund the students' fees and accommodation costs.
Principal Robert Mangan said the college would continue to maintain a firm line and zero tolerance on the use of illegal drugs within the college environment, and would give a clear message to its boys and community on the school's view on their use in the wider community.
"We will use all means legally available to manage this very significant societal issue."
Mr Mangan said this judgment provided clarity to the jurisdiction issue under the Education Act and the school would use it to guide future actions should something similar occur again.
"It appears that firstly the Education Act does not apply as schools do not have jurisdiction over these students outside school hours unless they are involved in school activities. Tauranga Boys' College initially applied a breach of contract in responding to the use of illegal drugs outside school hours then on legal advice including that from the IEAA applied provision of the Education Act. The provisions of Act have now been viewed as not applicable."
Mr Mangan said schools would need a clear and robust contract with international students and parents outlining contractual obligations and the consequences should these obligations not be met.
He said there needed to be an industry response from Schools International Education Business Association of New Zealand and the NZ Qualifications Authority which administered the "Code of Practice Guidelines for Pastoral Care of International Students" - an essential step as the international student industry was the fifth largest export earner worth $2.85 billion to the New Zealand economy.
"Parents of international students will want clarity of who is responsible for the pastoral care, health and safety and management of behaviour of their children."