Check out the LimeSurvey source code on GitHub!

How can I make Lime remember scores previous questions and assess during survey?

4 years 4 months ago #86076 by Timo123
I have a survey, that runs over 7 days. Everyday people fill in questions.

So for a certain question, people can get scores ranging from 0 to 3. During these 7 days, their scores will be visible with an "experience bar". The higher the score, the further along the experience bar is.

How can I do this with assessments? The problem with assessments seems to me right now, that It will only show an assessment at the end of a survey, but I need assessments at everyday of my survey, so I can tell limesurvey which experience bar to show.

Please Log in to join the conversation.

4 years 4 months ago #86080 by Timo123
Right , so I found some code that sort of does what I need:

{if(sum(Dag2Volkoren.value,Dag2Fruit.value,Dag2Groente.value,Dag2Vis.value)<8, 'Low risk' if(sum(Dag2Volkoren.value,Dag2Fruit.value,Dag2Groente.value,Dag2Vis.value)<16, 'Increasing risk', 'Top risk' ))}

But then I went and adjusted it to this:

{if(Dag2Volkoren.value)==0, 'Slecht' if(Dag2Volkoren.value)==1, 'Matig', 'Voldoende'}

But now Limesurvey just shows the code when I load the question and doesn't do anything?
What mistake did i make?

Please Log in to join the conversation.

4 years 4 months ago #86084 by Timo123
Ok, so after even more digging I found a snippet of code that I think I could use.

if(PFTotals >= -5 && PFTotals <= -4,
'Very Soft',
if(PFTotals >= -3 && PFTotals <= -2,
if(PFTotals == -1,
'Somewhat Soft',
if(PFTotals == 0,
if(PFTotals == 1,
'Somewhat Hard',
if(PFTotals >= 2 && PFTotals <= 3,
if(PFTotals >= 4 && PFTotals <= 5,
'Very Hard',

However, instead of text, I need it to show images. What is the syntax for that? Everytime I try something Limesurvey complains that img is an undefined variabele?!

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form