by Howard Miller.
It's not 2.2 code, or it's not complete, or you overwrote the code you had before (1.9? It would help if you have the full information). Something like that.
Remove the Moodle code completely and replace with 'clean' 2.2 code and you should be ok.