I was walking down the hallway at my school and caught a quick glimpse of what the students were doing in one of the classrooms.
この場合、次のような言い方ができますよ。
ーI was walking down the hallway at my school and caught a quick glimpse of what the students were doing in one of the classrooms.
「学校の廊下を歩いていたら、ある教室の生徒の様子がちらっと見えた」
to catch a quick glimpse「ちらっと見る」
what the students were doing「生徒がしていること」=「生徒の様子」と言えます。
ご参考まで!