Students and staff were told to run for their lives when witnesses reported hearing shots as Dreimanis roamed the college car park.
Simon Wilson and Peter Davidson were assaulted by Dreimanis as they tried to disarm him.
They were praised by police for the bravery they showed in subduing him.
Firearms incident at Crawley College: in pictures
Cameraphone video captured the drama as they wrestled him to the ground.
Dreimanis was arrested just after 3.20pm on April 26.
Wearing a grey sweatshirt and blue facemask, he confirmed his name before pleading guilty to possessing a firearm with the intent to cause fear of violence.
Dozens of armed police, including counterterrorism officers from nearby Gatwick Airport, stormed the campus and searched classrooms, while a helicopter flew overhead.
They called in support from police in Surrey, Kent and the Metropolitan Police force who attended, alongside dogs units.
Her Honour Judge Christine Laing QC asked for a background report.
“All I am interested in the widest possible picture of what led up to this young man doing what he did on the day,” the judge said.”
At an earlier hearing, Dreimanis pleaded guilty to assaulting Simon Wilson and Peter Davidson and had a knife on school premises.
He will be sentenced in March.