Student thrashed by school principal