The suspected gunman, Jason Michael Hamilton, 20, of Manassas, was arrested soon after the shots were fired and charged with attempted murder and discharging a firearm in a school zone. He was being held without bond. It wasn't immediately known if he had an attorney.
Police haven't yet discussed a motive, but they said Hamilton fired the two shots, then stopped without explanation and left the classroom.
"I assume he's upset," Chinn said. "He walked into a classroom and shot at a teacher."
Hamilton cooperated with officers when they found him in the hallway, Chinn said. He didn't have the rifle with him but told police where it was. Chinn said Hamilton owned the rifle.
The report of an "active shooting" on the campus came in at 2:40 p.m. It quickly prompted fears of another mass shooting like the massacre at Virginia Tech that killed 32 people in 2007.
School officials locked down the campus and SWAT units swept the buildings room by room before letting people leave.
"We heard a loud noise, it sounded like a desk fell over and we heard another loud pop, we knew it was a gunshot," said Miriam St. Clair, a 58-year-old biology professor from McLean.
St. Clair said she looked out the window and saw students running outside. The professor then told her students to get inside the classroom and they closed the door, which did not have a lock. They barricaded themselves inside by piling 20 desks against the door, crouching behind other desks when they were done.
One of the students called 911 and the operator told them there had been an incident and to stay where they were. About 2 1/2 hours later, a SWAT team came in and told them it was safe.
"We were very frightened," she said.
More than two hours after the shooting, student Christian Dorn told WRC-TV by telephone that she was still barricaded inside a classroom. She recalled hearing two loud shots in the building and screams to call 911.
"I just thought about Virginia Tech and Columbine and just was praying this was not another one of those situations," she told the television station. "We're just confused right now. We're ready to leave."
By Tuesday night, several police cars and officers were still standing at the entrance to the college, which is in a suburban area across the street from a high school.
The Woodbridge campus is one of six in the Northern Virginia Community College system, which is the largest educational institution in the state. The system enrolls more than 60,000 students, according to its Web site.