I would say these: When Atina got to class, she was horrified to be discovered she had forgotten to study for the test. (not been discovered yet, then) When Atina got to class, she was horrified at being discovered she had forgotten to study for the test.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.