XML generation for moodle 2.7