How safe is it (and what precautions should I take) if I want to transport my Macbook from class to class?
Macbooks are designed to be transported around in sleep mode. When the machine enters sleep mode, the hard drive stops spinning, and because the hard drive is basically the only mechanically moving part in the Macbook Pro (aside from the optical drive which shuts off as well), there is no risk of damage to the computer.

Here are some other questions that you may find helpful


Does closing the lid put a MacBook Pro to sleep? Would it hurt the computer if I carry it around without shutting it down?
Transporting from home to work (~10 min by car), should I just make my MacBook Pro sleep, or shut it completely down first?
https://superuser.com/questions/449629/is-sleep-mode-harmful-for-a-computer