"It's not that big a deal until it happens to your school," said Joshua Herman, a lawyer who represents schools across Illinois.
"Then it's a nightmare."
Police reports, court filings, witness accounts, emails and other documents obtained by The Associated Press offer an inside look at how Naperville North High School and police responded in the hours before Walgren's death in January.
His parents have sued the school, accusing it in a federal lawsuit of unnecessarily traumatising their son by warning him he could be charged and forced to register as a sex offender.
They are seeking more than US$5 million in damages.
"They scared the hell out of the kid, and that's what drove Corey to kill himself," said Maureen and Doug Walgren's attorney, Terry Ekl.
In the documents, officials at the 2800-student school in an upper middle-class suburb west of Chicago say they conveyed to Walgren the seriousness of the matter while also reassuring him that their goal was to keep it out of court.
A classmate's complaint
It all began around noon on January 11 after the 16-year-old classmate with whom Walgren had sex lodged a complaint at school.
She had learned of the video that day from a friend and was upset Walgren made it without her permission.
At first, she said, she was not sure the sex was consensual but later stated clearly that it was.
The family never blamed the girl and said she was right to report the video, Ekl said. She later attended Walgren's wake.
Facing discipline at school was a new experience for Walgren. As he walked into the office at about 12.40pm, Dean Steve Madden said he had never seen Walgren under these circumstances because the teen had never been in trouble, according to the documents obtained by the AP.
Walgren quickly admitted what he had done. When the two teens were in his car, parked on a secluded street at night, he had turned on the video-recording function and dropped his cellphone by his leg after the pair talked and shared some alcohol.
Neither teen was visible on the two minutes of footage during their sexual encounter. It was the audio Walgren played for four friends, some at a school hockey practice. He never texted or emailed it.
Also in the dean's office was Brett Heun, a Naperville police officer assigned to the school.
The recording was hidden on an app that looked like a calculator. When Walgren opened it for the officer, it revealed photos of other partially nude girls, as well as the video, according to accounts obtained by the AP as early as last spring.
Those images, which Walgren said were sent to him by others, were among contents downloaded by Naperville police.
The department and school district did not respond to requests for comment.
The officer told Walgren the video "concerned child pornography, which is obviously illegal." Walgren nodded.
Heun later said he wanted to impress upon Walgren that the matter was serious. But if Walgren cooperated, Heun told him, the matter could be kept out of court.
When sexual images are shared and discovered, school officials are not in complete agreement about best practices for responding, but there is consensus that a student's cellphone should immediately be confiscated and police alerted. Guidelines from the Illinois Association of School Boards say not reporting explicit images of kids can itself be a crime.
The family's attorney contends a recording with no visible images of sex acts cannot qualify as child pornography.
Some legal experts disagree.
Either way, critics say, child pornography laws should not be invoked to prosecute kids who share sexual images with other kids.
When those laws were passed, lawmakers could not have foreseen how teens, perhaps acting on impulse or under peer pressure, would be able to create or send explicit images at the push of a button.
The laws were aimed at protecting children from adults. Critics say it's a misapplication to use them to prosecute children.
Though the issue can be politically sensitive, at least 20 states have revised their laws to provide alternatives to child porn charges. A 2015 Illinois law aimed at sexting - when images are sent via text or other electronic means - lets courts sentence minors to supervision and community service.
Law enforcement retains discretion about how to handle such matters.
In Walgren's case, the fact the sex was consensual and that he did not distribute the recording would have counted in his favor.
Parents are contacted, student disappears
Walgren was interviewed for at least 20 minutes until his parents were called.
When contacted, mother Maureen Walgren said she could guarantee her son would fulfill any requirements to keep the matter out of court, according to the accounts obtained by the AP.
She also asked if the family should get an attorney. School officials told her that was her decision.
Madden asked Walgren if he understood what he did was wrong.
"He said ... he knew he made a mistake," the dean said in documents.
Walgren did not appear upset by the questioning. "Corey was calm, cooperative and respectful," Madden said. The dean also thanked him for being honest.
Walgren may not have shown it, but what he heard must have caused him "psychological distress ... humiliation and shame," his parents' lawsuit says.
The law has long recognised school officials as stand-in parents during the school day, with the power to investigate reports of wrongdoing and to discipline students without consulting parents.
But the lawsuit accuses the school of violating Walgren's rights by not calling his parents first. The school board association instructs schools to call parents but does not say if that should be the first step.
The custody issue is central to the civil case. Students must be told they have a right to remain silent only if they are in custody. Walgren was never told he was under arrest, but his parents' lawsuit argues he was in custody for all practical purposes, including because he had been told not to leave.
In January emails about Walgren obtained by the AP through an open-records request, Naperville Deputy Police Chief Jason Arres and a prosecutor discussed the issue. They cite a 2012 Illinois appeals court decision that said being in custody does not necessarily mean a formal arrest but may come down to whether a child at school "felt he or she was not at liberty to terminate the interrogation or leave."
However, an internal police report prepared later by Arres concluded that Heun handled the matter correctly and that Walgren had not been in custody because, among other reasons, the dean had initiated the questioning and because Heun made it clear he "had no intention of bringing criminal charges."
In general, courts have not found schools liable for student suicides that happen off campus.
A federal court in Florida in 2012 tossed a lawsuit filed by parents of 13-year-old Hope Witsell. They said her school could have prevented her from hanging herself at home after taunts over a revealing photo texted to a boy.
The court said schools have no duty to "insure against the grim but persistent prospect of a student's suicide."
After meeting school officials, Walgren was told to wait at a student-services office while his mother drove to the school. He sat behind a secretary, and the two chatted casually.
When she looked back minutes later, he was gone.
Surveillance footage later showed him walking up a parking deck ramp less than a mile away.
At the top, he paced for several minutes.
A woman heading to her car glanced up to see someone sitting five floors above. She wasn't alarmed, a police report said, because the person "was calmly sitting on the ledge."
But a minute later, at 2.40 pm, she looked out a third-deck window and saw his body.
She ran down the stairwell and began performing CPR before an ambulance arrived.
His mother was at the school after 3pm when she was told that a person who was injured downtown might be her son.
As Heun drove her to a hospital, Maureen Walgren asked about photos of the injured person sent to Heun's phone.
The picture quality was poor, he answered. But she insisted and he handed her his phone.
She knew instantly it was her son.
She did not see him until after doctors pronounced him dead at 3.27 pm.
Less than three hours had passed since her son was summoned to the dean's office.
WHERE TO GET HELP:
If you are worried about your or someone else's mental health, the best place to get help is your GP or local mental health provider. However, if you or someone else is in danger or endangering others, call police immediately on 111.
OR IF YOU NEED TO TALK TO SOMEONE ELSE:
• LIFELINE: 0800 543 354 (available 24/7)
• SUICIDE CRISIS HELPLINE: 0508 828 865 (0508 TAUTOKO) (available 24/7)
• YOUTHLINE: 0800 376 633
• NEED TO TALK? Free call or text 1737 (available 24/7)
• KIDSLINE: 0800 543 754 (available 24/7)
• WHATSUP: 0800 942 8787 (1pm to 11pm)
• DEPRESSION HELPLINE: 0800 111 757
- AP