Before opening fire in a university classroom, the gunman asked people if they were there for a Reserve Officers Training Corps event, court documents said.