On re-reading your original post, I realize that you want to share these files with all participants in the course, not individuals. That's the normal case of sharing in Moodle. The teacher of the course creates the resource within the course. The resource will only be visible to people who are enrolled in the course. No one else will be able to access it. You should use an enrollment key for the course.