#14 updated sql for moodle 2.7

Fix for mdl 2.7 (guess it should be in a separate branch for mdl 2.7 users since these fields are new)