Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

problem with a workournd : multiple completed with only one token

  • startx25
  • startx25's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 6 months ago #99872 by startx25
I follow this workaround: manual.limesurvey.org/Workarounds:_Surve..._with_only_one_token


I have LM1.9.2 and this workaround writed for LM1.7.1

My submitoken fucntion definition is not same (in index.php)

LM 1.7.1 :

if (bIsTokenCompletedDatestamped($thissurvey))
{
$utquery .= "SET completed='$today'\n";
}
}
else
{
$utquery .= "SET completed='Y'\n";
....


anh here is my 1.9.2

....
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";
}
}

can some one help me to adapte this workaround for 1.9.2 ?

Regards
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose