We at UCLA developed a solution for this called "Public/Private". It is a patch that you apply to Moodle.
You can find the patch here:
http://moodle.org/mod/data/view.php?d=13&rid=2768
Basically, all students that get enrolled in a course that has Public/Private enabled join a group called "course memebers". That group is part of a grouping called "Private Course Material".
With those two things in place, anyone with teacher privledges or higher can click a lock icon on any resource or activity to either open up that item to guests, and others not enrolled, or lock it down to only members of the course.
General help
Auto-enrol in group?
Müzakirə kilidlənib, beləliklə ona cavab vermək artıq mümkün deyil.