Teen can still graduate after bringing gun to school