#14 updated sql for moodle 2.7
Merge pull request #15 from bmbrands/moodle_27

#14 updated sql for moodle 2.7

I've created a maintenance branch for <2.7 and merged this into the main dev branch