Education

It would have to be in the same year.  For example, in order to claim the education credit for your 2015 tax year, your fees must be paid in the same tax year by the loan.