A judge in Virginia ruled Tuesday that a former University of Virginia student whose account of a gang rape on campus was the basis of a retracted Rolling Stone article must give a deposition on Thursday in a defamation lawsuit against the magazine.

Lawyers for the former student, identified in the magazine only as Jackie, argued that having to relive the ordeal could traumatize her again. But the woman is a key figure in the lawsuit by Nicole P. Eramo, an associate dean, who says she was portrayed as the “chief villain” in the 2014 article.

The ruling, by Chief Judge Glen Conrad of the Western District of Virginia, will require Jackie to be available for questioning by lawyers for Rolling Stone and Ms. Eramo, according to the Washington radio station WTOP. Recordings and transcripts will be made confidential.

Ms. Eramo is seeking nearly $8 million in damages from Rolling Stone, its parent company and Sabrina Rubin Erdely, the author of the article. A review of the article by the Columbia School of Journalism found a sweeping series of missteps, including a failure to verify Jackie’s account independently.