fix Course code generation