You may be looking for the short story about the homework.

"What I Did on My Christmas Holidays" was a piece of Christmas homework by Sally Sparrow from 2005. It included her encounters with various messages sent from the Ninth Doctor trying to communicate with her from 1985, after the TARDIS "burped" and jumped ahead in time, stranding him.

Through a video cassette, the Doctor spoke to Sally instructing her about how to return his TARDIS from 2005, explaining that "some sort of spy" gave him this very essay before he was stranded, even though Sally was still in the middle of writing it.

When Sally became the spy, she handed the now-finished homework to the Doctor in Istanbul in preparation for when he would be trapped in 1985. He then made the video recording Sally had already watched, using the homework as a transcript. (PROSE: What I Did on My Christmas Holidays by Sally Sparrow)

Community content is available under CC-BY-SA unless otherwise noted.