ChazyTheBest/TrinityCore — comment on commit 9a9f1642989d6dc53196a72eddec405c7803430e
File:  line 0
By Faelon:

canLearn = true is in else of if which controls whether you can learn it or not...
so logicly if you CAN learn it(if) then bool canLearn == false because of initialization.