As has been explained regarding laborers, when the work was canceled due to an unavoidable accident, he is not obligated to pay the laborer unless the employer should have known of this and the laborer did not; so too is the law regarding a melamed. Therefore, one who hired a melamed for his son and the son became ill and the melamed's work was canceled, if the son is not accustomed to that illness and the father should not have known of this more than the melamed, and similarly even if he is accustomed to that illness but the melamed is a resident of the city and knows of this son that he is accustomed to illness, it is the loss of the melamed, just as with a laborer. And so too if the son died. But if he is accustomed to illness and the melamed is not familiar with him, such as when he is from another city, or even if he is a resident of the city but did not know him until now, it is the loss of the employer, and he gives him his full wage. And it is more stringent than a laborer, to whom he only gives as an idle laborer, for the reason that it is more pleasant for those who study Torah to study than to go idle. And it is obvious that if even during the cancellation of the student the melamed studied by himself or with others, behold he did not profit from this, and this is not comparable to all other labors. However, even this depends on the diligence of the melamed: if it is known that it is more pleasant for him to go idle than to study and he went idle, or if his study was easier than when he studied with the son, he only takes as an idle laborer, as I wrote in siman 335. And if there is a denial between them regarding the familiarity with the youth, if he has not yet taken the money, the father of the son shall swear and be exempt, and if he already took it, he shall swear and be exempt. And it has already been explained in siman 333, section 25, that the opinion of our teacher, the Rema, is that whenever it was canceled in the middle of the time and afterwards he returned to his work and the employer did not speak of deducting for him what he canceled, that he does not deduct for him in any case, and that there are those who disagree on this; see there.
כמו שנתבאר בפועלים כשנתבטלה המלאכה מחמת אונס אינו חייב לשלם להפועל רק אם הבעה"ב היה לו לידע מזה ולא הפועל כמו כן הדין במלמד ולכן מי ששכר מלמד לבנו וחלה הבן ונתבטלה מלאכתו של המלמד אם אין הבן רגיל באותו חולי ולא היה לו להאב לידע מזה יותר מהמלמד וכן אף אם רגיל באותו חולי רק שהמלמד הוא בן עיר ויודע בו בהבן הזה שרגיל הוא בחולי הוה פסידא דמלמד כמו בפועל וכן אם מת הבן אבל אם רגיל בחולי ואין המלמד מכיר בו כגון שהוא מעיר אחרת או אפילו הוא בן עיר רק לא הכירו עד עתה הוה פסידא דבעה"ב ונותן לו שכרו משלם וחמיר מפועל שאינו נותן לו אלא כפועל בטל מטעם דלומדי תורה נוח להם יותר ללמוד מלילך בטל ופשיטא שאם גם בביטול התלמיד למד המלמד בעצמו או עם אחרים הרי לא הרויח מזה ואין זה דמיון לכל המלאכות מיהו גם זה תלוי בהתמדתו של המלמד אם ידוע שנוח לו יותר לילך בטל מללמוד והלך בטל או שלימודו היה קל יותר מכשלמד עם הבן אינו נוטל אלא כפועל בטל כמ"ש בסי' של"ה ואם יש ביניהם הכחשה בהכרת הנער אם לא נטל עדיין מעות ישבע אבי הבן ויפטר ואם כבר נטל ישבע הוא ויפטר וכבר נתבאר בסי' של"ג סעיף כ"ה דדעת רבינו הרמ"א דכל שנתבטל באמצע הזמן ואח"כ חזר למלאכתו ולא דיבר הבעה"ב שינכה לו מה שביטל דאינו מנכה לו בכל ענין ושיש חולקים בזה ע"ש: