When we were in class is not a sentence because it lacks a main verb. With this correction, your first line is better:
She didn't look at you the whole time we were in class.
It lacks a verb? Sorry I didn't get it.
"When we were in the class" is obviously not a complete sentence. You make it complete by saying more about what happened.
If you have a question about the English language and would like to ask one of our many English teachers and language experts, please click the button below to let us know: