Ash-Shaykh Abdur-Rahmaan as-Sa’di, rahimahullah, said:

:” وإذا أخطأ المعلم في شيء فلينبهه برفق ولطف بحسب المقام ، ولا يقول له : أخطأت ، أو ليس الأمر كما تقول ،

“And when the teacher errs in something ,then let him (i.e. the student) bring it to his attention while being gentle and polite (in his words) according to (what suits) the situation. And he shouldn’t say to him (frankly) ‘you are mistaken’ or ‘the matter is not like as you are saying it’

بل يأتي بعبارة لطيفة يدرك بها المعلم خطأه من دون أن يتشوش قلبه ، فإن هذا من الحقوق اللازمة وهو أدعى إلى الوصول إلى الصواب ، فإن الرد الذي يصحبه سوء الأدب وإزعاج القلب يمنع من تصور الصواب ومن قصده ” انتهى

Rather, he should come with polite words which the teacher will realize by it his error without his heart becoming disturbed. (This is) for verily it is from the rights which are necessary and it is more of a reason in reaching to the truth. Indeed a refutation that consists of bad manners and disturbance to the heart prevents from comprehending the correct stance and from intending it

من آداب المعلمين والمتعلمين ، ضمن الفتاوى السعدية

From the pamphlet ‘The Etiquettes of the Teachers and the Students, an Excerpt from the Fataawa of as-Sa’di.

Also some of the shuyookh have suggested when correcting the teacher that it should be in a form of a question similar to the hadeeth :

“When Prophet (ﷺ) shortened one of the even prayers and only prayed it in two raka’aat, so a man who was called Dhul-Yadain by the Prophet (ﷺ) said (to the Prophet), “Has the prayer been reduced or have you forgotten?” He said, “Neither have I forgotten, nor has the prayer been reduced.” He said, “Certainly you have forgotten.” So the Prophet (ﷺ) offered two more rak`at and performed Taslim and then said Takbir and performed a prostration of Sahu”

(Sahih Bukhari Volume 2, Book 22, Hadith #321)