oops - just realised I can do the same thing by 'allowing guests with the enroment key' in course settings. However - when attempting access in this manner (guest with key) I am being forwarded to the site's login page?
The guest login button is disabled for the site, and auto-login is disabled (though I have tried both, and it doesn't work as 'enabled' either). using 'guest' and the enrolment key as password does not work to login
... ok - further experimenting seems that the guest login button MUST be enabled for 'guest access with enrolment key' to work. The password seems to be retained for the browser session. Once you click on 'login as guest' then you are taken to the 'enrol me in this course' screen where you enter the enrolment password to enter as a guest.
ok - I was hoping to disable guest access and allow a restricted public account just for this course, but I guess this can work.
Thinking it through - I still think that providing a permission/capability that defines whether a person can enrol is more powerful. (To my mind all of the 'special' features of the guest account should be able to be recreated by using roles...) eg: We have parents/mentors that we may want to have access to only pre-determined courses, and in other courses only as a 'parent' role. Ideally we could set an overall role that does not have the 'enrol' capability, but within a certain category (context?) we could set it to allow - providing enrollment capability into those courses within that category...
At least - that is what I envision ;)