In my opinion, by putting a foreign key in the table and defining the relation in the model, we lose the sense of modularity, because that creates a hard coupling.
A module should expose an API for interactions, and it would be more appropriate to store simply the course identifier (without enforcing a foreign key). The service you built (the API) should then provide a method that returns a Course DTO given that identifier.
In my opinion, by putting a foreign key in the table and defining the relation in the model, we lose the sense of modularity, because that creates a hard coupling. A module should expose an API for interactions, and it would be more appropriate to store simply the course identifier (without enforcing a foreign key). The service you built (the API) should then provide a method that returns a Course DTO given that identifier.