If I were in the position of one of the teachers I would just break the law and keep the student’s confidence. Conscientious objection. It is possible that you could lose your job, but I’m also pretty sure it’s unconstitutional. Also, your job is worth protecting the safety of one of your students.