Many learners exhibit worrisome traits in the presence of their teacher in class. You will see some of them disturbing and causing distractions to others.
The learner ought to be well-behaved in class by remaining silent always among other good ettiquette. This composure in class is what is called as-Samt السمت which very unfortunately is lacking in many learners of today.
Al-Imaam Adh-Dhahabee - rahimahullaah - reported about Al-Imaam Abdurrahman Mahdee - rahimahullaah:
'None would ever speak (unnecessarily) in his class, nor sharpen his pencil, nor rise to go out; they would all sit as if there were birds on their heads, or as if they were in Salah.' (Tadhkiratul Huffaadh 1/331)
Ahmad bn Sinaan - rahimahullaah - said the discipline in Abdurrahman bn Mahdee's class was so intense that if anybody misbehaved in his class, for instance, laughing unnecessarily, he (Abdurrahman) would rise and leave the class. (Siyar: 9/201)
That was how our Salaf were. Their lessons were for all seriousness, not for jokes and comedy.
Exhortations of the Messenger of Allaah, especially on the mimbar on the day of Jumuah, used to be 'tough' such that anger would be felt in this speech while his eyes would become red with his voice raised, sallaLaaahu alayhi wasallam. (Saheeh Muslim)
Scholars may throw some light jokes in class to make it less boring but not to the extent of turning it to a comedy where people laugh hysterically and thus lose its spirit and vigour.
So as a learner, be composed in class, be silent always and don't be a source of disturbance and distractions to others.