Centennial, Colorado (CNN) -- A shackled James Holmes, his hair still dyed red, heard prosecutors say Thursday he made threats at the University of Colorado a month before he allegedly opened fire at a Denver-area movie theater.
Prosecutors, without stating the source of their information, also said Holmes, 24, failed to pass oral exams and chose to severe his relationship with the school, where he had been a Ph.D. candidate studying neuroscience.
Holmes withdrew from the program in June, weeks before the shooting in Aurora.
Prosecutors said the threats by Holmes were reported to campus police.
The statements came as defense attorneys and prosecutors wrangled Thursday over access to records and documents.
The main issue was whether the prosecution should receive non-medical documents from the university. These would include admissions forms, grades and transcripts.
Victims and family members sat on one side of the courtroom. One woman was visibly shaking while another teary-eyed woman was comforted by a companion.
Dark roots were visible in Holmes' hair; he now has a mustache and large muttonchop sideburns. While he appeared more lucid than his first appearance, Holmes still had a wide-eyed look. He did not speak at the hearing.
Holmes is accused of opening fire July 20 during a midnight premiere of the latest Batman movie, leaving 12 dead and injuring 58 others.
He has been charged with murder and attempted murder, and faces two weapons charges.
The defense argued that the prosecution's request for records was too broad. Public defender Dan King called the request "nothing more than a fishing expedition" and said matters pertaining to his client's personal life were not relevant.
King also asserted that the state likely has seen school documents.
The judge did not issue an immediate ruling.
The University of Colorado earlier this month said it hired a former U.S. attorney to conduct an independent review into how the school handled Holmes.
A court document revealed that Holmes was a patient of CU psychiatrist Lynne Fenton before the killings.
She was so concerned about his behavior that she mentioned it to her colleagues, saying he could potentially be a danger to others, CNN affiliate KMGH reported earlier this month, citing sources with knowledge of the investigation.
Fenton's concerns surfaced in early June, sources told the Denver station.
They told KMGH that Fenton contacted several members of a "behavioral evaluation and threat assessment" team to say Holmes could potentially be a danger to others, the station reported.
The "BETA" team consists of "key" staff members from various university departments who have specific expertise in dealing with assessing potential threats on campus, the school says on its website.
"Fenton made initial phone calls about engaging the BETA team" in "the first 10 days" of June but it "never came together" because in the period Fenton was having conversations with team members, Holmes began the process of dropping out of school, a source told KMGH.