Adding moodle queries