The twerking did take place in a classroom, just not a Physics classroom.
If this circulating around the web today is any indication, it sure seems that way.
Sotomayor to be a student in a Physics classroom, can be seen half-naked, bent over at the waist twerking as if her life — or passing the class — depended on it.