It is definitely not insulting in this context. It might be insulting if addressed by a teenager to his or her teacher, or it might be affectionate. The latter is more likely in my opinion.
I don't know how common it is these days. It used to be heard when I was at school, and that was a very long time ago, so my guess would be that it is uncommon today.
Student or Learner