Use moodle data api for LIMIT