1) HALACHAH: TEACHING TORAH DURING AVEILUS
OPINIONS: The Beraisa states that although an Avel is not allowed to learn Torah during his Aveilus, if the public needs him ("Rabim Tzerichim Lo") he may teach Torah to them. The Gemara says that Rebbi Yosi indeed taught Torah publicly when he was an Avel, as did Rabah bar bar Chanah and Rebbi Yehudah bar Ila'i.
Is this Halachah still practiced today? May a person who is an Avel teach Torah if the public needs him?
(a) The SHULCHAN ARUCH (YD 384:1) rules that an Avel whom the public needs is permitted to teach Torah. The SHACH adds in the name of the KOLBO and the MAHARSHAL (Teshuvos #66) that "Melamdei Tinokos," teachers of children, are considered to be providers of a public need and therefore may teach even during their period of Aveilus.
(b) The REMA, however, adds two limitations to the allowance for an Avel to teach publicly. He rules, based on the MORDECHAI, that a Talmid Chacham who is an Avel may teach Torah to the public only by whispering to a "Turgeman" who then expounds the Talmid Chacham's words to the public. The Talmid Chacham is not allowed to lecture directly to the public.
The Rema also rules that a Talmid Chacham is permitted to teach only Halachos in public, and only when no one else is capable of issuing a Halachic ruling. He may not expound on non-Halachic matters which the students do not need to know in order to conduct themselves properly in practice.
According to the Rema, why is a Melamed Tinokos who is an Avel permitted to teach children? He fulfills neither of the Rema's requirements: he does not use a "Turgeman," and he does not issue Halachic rulings when he teaches.
Some Acharonim (see BE'ER HA'GOLAH) have a different Girsa in the words of the Rema, according to which he permits an Avel to teach to the public without a "Turgeman." Even according to the Girsa in our texts, this limitation perhaps applied only in the days when it was common to use a "Turgeman," and for the types of learning for which a "Turgeman" was usually used.
The MAHARSHAL explains that although the Melamed Tinokos does not issue Halachic rulings when he teaches the children, he is aware of the significant responsibility that he bears and he does not derive pleasure from the Torah he teaches. Since the prohibition against learning or teaching Torah during Aveilus is because of the pleasure one experiences from Torah, the Melamed Tinokos is permitted to teach.
Another reason for why a Melamed Tinokos is permitted to teach the children is because his teaching is considered a "Davar ha'Aved," and an Avel is permitted to do a Melachah for a Davar ha'Aved after the third day of his Aveilus. Indeed, the TAZ rules that a Melamed Tinokos may teach the children only after the third day of his Aveilus.
If the Melamed Tinokos or Talmid Chacham does not want to teach during his Aveilus, he certainly is not required to teach. The Gemara says only that he "does not have to refrain" from teaching, but not that he is obligated to teach (SHEVET YEHUDAH).

21b----------------------------------------21b

2) HALACHAH: GREETING AN AVEL
OPINIONS: The Gemara concludes that one should not greet an Avel with "Shalom" until thirty days have passed since the beginning of his Aveilus. If the Avel is mourning for the passing of his father or mother, one should not greet him until twelve months have passed.
What is the Halachah in practice today?
(a) The RITVA and CHIDUSHEI HA'RAN write that they have not seen this Halachah observed, but that they do not know why it is not observed.
The SHULCHAN ARUCH (YD 385:1) quotes the Halachah as recorded in the Gemara and writes that greeting an Avel with "Shalom" is prohibited.
(b) The REMA (YD 385:1), however, writes that people are generally lenient and greet a person who is an Avel for a parent after thirty days (and if he is an Avel for a relative other than a parent, after seven days; DARCHEI MOSHE). The Rema suggests that the reason why the prohibition against greeting an Avel as recorded in the Gemara is not practiced today is that the form of greeting common in the times of the Gemara differed from the form of greeting which is common today. The DARCHEI MOSHE (OC 89) explains that in the times of the Gemara, when they greeted each other with "Shalom Aleichem," they also bowed down. The Gemara prohibits extending only that form of greeting to an Avel. Today's form of greeting -- merely saying "Shalom Aleichem" without bowing down -- is permitted.
HALACHAH: The SHACH and MAGEN AVRAHAM (OC 554:21) write that l'Chatchilah a person should be stringent and observe the Halachah as it is recorded in the Gemara, but if someone acts leniently he does not have to be rebuked.

OTHER D.A.F. RESOURCES
ON THIS DAF