Sheriff: School officer never went inside to confront gunman