Added addinstance capability for Moodle 2.4