from @rocha: "Maybe refactor to get a reusable function to extract `course_id` from the request or the `uri`?"