^I always figured that the Doctor was called that because he got a doctorate from the Prydonian Academy. So he would've been called that well before he left.
I don't know about that. Romana says in The Ribos Operation
that her triple first is "better than scraping through with fifty one percent at the second attempt." Though I suppose he could have gotten an advanced degree later, the tone of the conversation works against that hypothesis. In The Deadly Assassin
, Runcible thinks the Doctor was expelled, though he's vague on the details, and the Doctor doesn't elaborate ("Oh, it's all been forgotten about now, old boy")-- maybe that was his first attempt?