The basis for a disciplinary action is that the context is that of discipline. The offence has been committed within specific area/location (a school, an office, a prison) or in relation to a group often regulated specifically (e.g.: doctors) . The sanction aims at maintaining order within that location or within that group. I don't see how comments online outside school hours and outside the school itself can fit than notion of discipline. THen if it is not discipline, only civil law applies and in very rare cases, criminal law.
"Judges Divided On Right Of Schools To Punish Students For Mocking Principals Online" (TechDirt, 9 June 2009)