Sorting questions method to export them to Moodle Quiz XML