If a student is more attentive because the teacher is looking, this is called the front stage behavior.
This term is what is used to show what is the internal norms and also the kind of behaviors that are expected.
The student knows that the teacher expects him to be attentive when in a class.
Read more Erving Goffman here:
https://brainly.com/question/4661703