- Posts: 13648
- Thank you received: 2491
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Random Question
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
8 years 4 months ago - 8 years 4 months ago #129331
by DenisChenu
It's a system i use before. If it don't work with actual version : it's a regression.
Equation are filled only when :
- Before Shown (before show the page)
- During shown (javascript update in the page)
- After Shown (when subliut the page)
If it's in a previous group (for example : only this hidden question in this group : it luts have a fixed var "After shown"
Denis
PS: Seems to work:
- demonstration.sondages.pro/912442
- But LS core have an issue with : 1st group 'hidden' + hide welcome page + Show previous. Difficult to manage here, but can have a solution
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Random Question
Are you sure ?holch wrote: ...
Denis suggested that an alternative would be to put the rand() question in a different group on a different page and this doesn't work (only if you use is_empty, etc., but as I said, when using this you don't need a different group or different page).
It's a system i use before. If it don't work with actual version : it's a regression.
Equation are filled only when :
- Before Shown (before show the page)
- During shown (javascript update in the page)
- After Shown (when subliut the page)
If it's in a previous group (for example : only this hidden question in this group : it luts have a fixed var "After shown"
Denis
PS: Seems to work:
- demonstration.sondages.pro/912442
- But LS core have an issue with : 1st group 'hidden' + hide welcome page + Show previous. Difficult to manage here, but can have a solution
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Attachments:
Last edit: 8 years 4 months ago by DenisChenu. Reason: Seems to work
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11661
- Thank you received: 2742
8 years 4 months ago #129342
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Random Question
Hmmm, strange. For me it did not work yesterday. Will have a look at it again so we can leave "clean" recommendations here.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11661
- Thank you received: 2742
8 years 4 months ago #129344
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Random Question
I am experimenting and the difference seems to be in using "questioncode.NOAK" or just "questioncode", but I haven't found out exactly how.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
8 years 4 months ago #129349
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Random Question
Hi Holch,
Strange, because in the test survey i use RANDOM==1 directly for relevance.
RANDOM is always shown, then no issue.
I add some information forNAOK on manual : manual.limesurvey.org/Expression_Manager#Usage_of_NAOK
But this surely can be improved.
Denis
Strange, because in the test survey i use RANDOM==1 directly for relevance.
RANDOM is always shown, then no issue.
I add some information forNAOK on manual : manual.limesurvey.org/Expression_Manager#Usage_of_NAOK
But this surely can be improved.
Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11661
- Thank you received: 2742
8 years 4 months ago #129350
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Random Question
By the way: I also don't understand how your code generates the final output shown in the question either. I need a little bit more time to test and check.
What I had done:
Group 1: one question "Q1" with {rand(1,5)} in it.
Group 2: One text display with {Q1} in it. Somehow the numbers shown in both questions can differ.
What I had done:
Group 1: one question "Q1" with {rand(1,5)} in it.
Group 2: One text display with {Q1} in it. Somehow the numbers shown in both questions can differ.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
8 years 4 months ago #129352
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Random Question
Group 1 : one question RANDOM: equation question : equation set to {rand(1,5)}
Group 2+3+4 : 4 question near same expet for the code:
Q1: condition RANDOM==1
Q2: condition RANDOM==2
Q3: condition RANDOM=
Q4: condition RANDOM==4
Look at the logic file
Group 2+3+4 : 4 question near same expet for the code:
Q1: condition RANDOM==1
Q2: condition RANDOM==2
Q3: condition RANDOM=
Q4: condition RANDOM==4
Look at the logic file
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11661
- Thank you received: 2742
8 years 4 months ago #129353
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Random Question
Ohhhh man! I thought the "Random==1" code was generated by a code, but it is basically hardcoded.
I will have a closer look at this when I have a little more time.
I think the problem is that I display the result of question Q1 with {Q1} in the question text. That seems to force the random function to be triggered again. But I will investigate a little further.
I will have a closer look at this when I have a little more time.
I think the problem is that I display the result of question Q1 with {Q1} in the question text. That seems to force the random function to be triggered again. But I will investigate a little further.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
8 years 4 months ago #129355
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Random Question
Maybe because i added it in Group description ?
?
Must give a try ading it in all question text (but still sure it worked before).
Random number his : {RANDOM}
?
Must give a try ading it in all question text (but still sure it worked before).
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.