Hello,
I'm making an online survey for the University of Maastricht and just updated the previous version to 1.91+.
I need to know how to edit the files of limesurvey, so we can use the same token multiple times.
The research population will be divided in teams. Our plan is to give every team a token. Then the teamleader will distribute this same token to all their employees.
I already saw the
article
opened by Samba who was asking the same question.
I tried to edit the index.php which was described by the documentation Schnoulle replied, but i guess this new version is a bit different from 1.74
this is my code:
Code:
elseif (bIsTokenCompletedDatestamped($thissurvey))
{
if (isset($usesleft) && $usesleft<=1)
{
$utquery .= "SET usesleft=usesleft-1, completed='$today'\n";
}
else
{
$utquery .= "SET usesleft=usesleft-1\n";
}
}
else
{
if (isset($usesleft) && $usesleft<=1)
{
$utquery .= "SET usesleft=usesleft-1, completed='Y'\n";
}
else
{
$utquery .= "SET usesleft=usesleft-1\n";
}
}
$utquery .= "WHERE token='".db_quote($clienttoken)."'";
$utresult = $connect->Execute($utquery) or safe_die ("Couldn't update tokens table!<br />\n$utquery<br />\n".$connect->ErrorMsg()); //Checked
different from the one in the documentation:
Code:
if (bIsTokenCompletedDatestamped($thissurvey))
{
$utquery .= "SET completed='$today'\n";
}
}
else
{
$utquery .= "SET completed='Y'\n";
greetings,
jeroen