forcing login as guest

forcing login as guest

by Francesco Caviglia -
Number of replies: 2
I have a questionnarie on the main page of my Moodle and I would like that everybody can fill it in (it is defined as anonymous/everybody can fill/multiple answers).
If the user is already logged in with a username or as "guest", everything works, otherwise s/he is sent to the login page (a behaviour I wish to avoid in this case).
If the questionnaire is located within a course and linked to from the main page, there is no problem, since the user is automatically logged into that course as guest. But I would prefer to keep the questionnaire on the main page.
How can I get the user automatically logged in as guest? Is this something I have to define within the questionnaire code or elsewhere?

Thank you for your help

Francesco
Average of ratings: -
In reply to Francesco Caviglia

Re: forcing login as guest

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
There's a site setting, "autologinguests", that should do it for you.

mike
In reply to Mike Churchward

Re: forcing login as guest

by Francesco Caviglia -
Thanks, Mike, but I cannot find out how to set the "autologinguests" variable on the main page.
I have set "autologinguests" on in a course I use now as holder for questionnaires. I put then a link from the main page to that questionnaire (with a retour link in the "thank you for filling..." page) and everything works, but it would be cleaner to keep the questionnaire on the main page.

All the best
Francesco