Convert courses string into numbers