I think the logic of the phone is fine. The volume rockers will only adjust the multimedia volumes. If you want to silence your phone (completely or put it in vibration mode, when you're in class) you can tap on the toggle in the notifications & toggles panel (pic 1). On the settings you can combine both the tone and notifications to a single slide controller (pic 2) so that when you have the phone in vibration mode for example, the notifications don't sound. You just need to make sure to decrease completely the volume with the volume rockers whenever you're going to do something on your phone during class that will reproduce sound.
You could also check the option "Smart Volume" (pic 2) if you want the volume of the tone and multimedia (or tone, notifications and multimedia if you combine the tone and the notifications) to adjust automatically depending on the noise level on your surroundings.
Why do I say it's logic what the phone does? Because on a typical scenario you want your notifications and tone to either sound or don't sound at all. And you want to know when your phone is demanding your attention (because someone's calling you or you've received an important email) so there's no point in changing the volume of those parameters in between 0% to 100%. I always set them to the fullest possible value (100%) since I don't spend my time too often on quiet environments where I don't really need the phone to sound that loud. And if I am it's probably somewhere I'm not expected to use my phone at all (work, class, bank, family reunion etc), in which case I set the phone to vibrate only.
I hope that helped you.