Update for moodle 27

These are the updates the bock needs for Moodle 2.4+ and Moodle 2.7+