It would be an easy choice to give up my life to protect family but I don't know about random classmates.
Why assume that the sights will fall on a random classmate and not you? Would you feel good cowering in the corner and witnessing the folks you sit next to murdered in cold blood?
Your concern about being mistaken for the active shooter is valid, but no more so than any other public circumstance that you may use lethal force in, such as shooting an armed robber who is brandishing and pointing a firearm at yourself or a 3rd party. The advice I have heard, if this horrible event ever occurs, is to make sure that the BG is unable to continue presenting a threat(disarmed and down) , and then apply your safety and reholster your firearm. Do not draw attention to yourself, just blend in with the others at the scene. Call the 911 if possible and state only your location, that you were afraid for your life, and to send an ambulance. Next, call your lawyer. When police arrive, tell them you were afraid for your life. Surrender your weapon to them, but make no other statements until your legal counsel arrives.