I don't know if my problem is strictly linked to role, but I do not see where else to post it, so here we go. The problem arises both with moodle 1.8 and 1.9.
Case 1- Here are my settings for Course A.
- Course enrollable: No (I want to enrol my students myself)
- Availability: Yes
- Enrollment key: *****
- Guest access: Allow guests who have the key (I want to allow "visitors" to my course).
With those settings, when someone tries to log in as guest they get the message "This course is not enrollable at the moment." Which is of course not what I want. I do not want guests to enrol in my course, I just want them to visit it! Maybe this is a misunderstanding on my part of the Moodle terminology or maybe the terminology is wrong. For me, being enrolled in a course means being a real student, with full students rights; visiting a course as guest is different from being enrolled. So the error message is misleading.
Same course settings as Case 1 except for Guest access: Allow guests without the key.
Then, guests can access my course. But this is not what I want, I only want guests with a key to access my course.
My diagnostic is that, as things stand, the Enrolment key is only meant to enable people to enrol in a course. It is a mistake to suggest that this key might also provide guest access. Maybe we should have another key, named "Guest access key", different from "Enrollment key", to do what I want to achieve? Or maybe there is a solution involving roles settings either in the course itself or site-wide?