Implemented hook_node_validate to avoid courses with duplicate codes.