Rabbi Moshe Feinstein (Russia-New York, 1895-1986) was asked a number of questions concerning the limits of disciplinary measures that a teacher may use in a classroom:
1) The first question is whether or not a teacher may punish students for misconduct. Rabbi Feinstein rules that a teacher is certainly entitled to punish a student, and he notes that the Gemara already sanctions punishing students provided that it is not done out of anger and frustration, but strictly for the purpose of educating the student towards proper behavior. Rabbi Feinstein adds that a teacher must also ascertain the student's guilt beyond a shadow of doubt before punishing him. Just as the Beit Din (Rabbinical court) does not administer punishment on the basis of speculation or hearsay, but rather on the basis of clear evidence, so may a teacher punish a student only once he has ascertained that this student indeed committed the act of which he is suspected.
2) Secondly, Rabbi Feinstein was asked whether a teacher may ask students in the class to inform him which student committed a certain act of mischief, whether this is an acceptable means of finding the guilty student. Rabbi Feinstein does not forbid this practice on Halachic grounds, but writes that it is "Mecho'ar" – a distasteful thing to do, as it trains the children to speak Lashon Ha'ra (negative speech about other people). Although the Gemara in Arachin tells that as a student Rabbi Yochanan would bring negative reports to the teacher about Rabbi Akiva, Rabbi Yochanan did so of his own volition in a sincere effort to help Rabbi Akiva improve. This does not mean that a teacher should solicit negative information about students from other students.
3) Finally, may a teacher administer a punishment that causes Bittul Torah (lost time from Torah study), such as suspending him from class? Rabbi Feinstein rules that a teacher must not resort to such measures, because the damage caused by Bittul Torah far outweighs any benefit yielded by this punishment.
Summary: A teacher is allowed to punish a student for misconduct, provided that he does so with a clear head, rather than out of anger and frustration, and that he has ascertained the student's guilt. He should not administer a punishment that entails losing time from Torah study. A teacher should not ask students to inform him who among the other students committed a given act of mischief.