Hi ‘doch’ is used here to emphasize (together with ‘sicher’) that the speaker assumes that the other person was good at school, in other words making sure it’s not an open question but the speaker is expecting an affirmation.
Other uses of ‘doch’:
‘anyway’: Das Wetter war schlecht, aber ich bin doch die Runde durch den Park gelaufen.’
‘yes’ as in giving a positive answer to a negative statement: 'Sie dürfen hier nicht parken. ’ ‘Doch, ich habe eine Genehmigung, sehen Sie hier…’
And others.