I think going to class should override other actions except maybe eating because I don't want sims to throw plates on the ground.
I had this issue again while I was playing two sims at once. I had a sim queued to go to class then went to attend to another playable sim but the first sim ended up being late because she didn't quit doing homework on time while she was just waiting for class to start.
It's annoying but it looks like you basically need to babysit them during the hour before they go to class including while waiting to enter class.