Quote:
Originally Posted by ivps-Samuel
Hello,
I added usergroup 1 (Guest/Not Logged In) to answer survey questions but it still seems to require login when the survey is clicked on.
Any ideas?
|
Please remember the point of a survey is to compile data across a given site to a set of people, however allowing guests the oppurtunity to take the survey would surely make for different results as they could retake the survey many times, therefore throwing your results out. That said here is what you need.
Find this code in survey.php
Code:
if ($vbulletin->userinfo['userid']==0) { // override permissions for guests, since userid zero is messy
// They can only see the results, if allowed in the admincp settings
$vbulletin->userinfo['can_admin_surveys'] = 0;
$vbulletin->userinfo['can_take_surveys'] = 0;
$vbulletin->userinfo['can_create_surveys'] = 0;
$vbulletin->userinfo['can_edit_surveys'] = 0;
You will need to change it to some like this:
Code:
if ($vbulletin->userinfo['userid']==1) { // override permissions for guests, since userid zero is messy
// They can only see the results, if allowed in the admincp settings
$vbulletin->userinfo['can_admin_surveys'] = 0;
$vbulletin->userinfo['can_take_surveys'] = 1;
$vbulletin->userinfo['can_create_surveys'] = 0;
$vbulletin->userinfo['can_edit_surveys'] = 0;
Once you have changed that you will need to allow guests to take survey more than once, otherwise guests will be informed that they have already taken the survey, so
Find this line in survey/classes/survey.class.php around line 127 either delete or comment the line out.
Code:
if($check === ALREADY_COMPLETED) eval(print_standard_error("You have already completed the requested survey.", 0));
That should do it.