Updated block to work with Moodle 2.6