Sort output by module code when joining semesters