Fixed wrong variable name 'cname' -> 'courseCode'.