This is an example of "The Hawthorne Effect".
The Hawthorne effect which is likewise alluded to as the observer effect is a sort of reactivity in which people change a part of their conduct in light of their consciousness of being watched. Like in this case the students knew they are going to be observed so they modified their behavior.