problems randomising survey using rand().

More
2 years 9 months ago #179404 by tpartner
Yes, the result of rand() should be recognized as a number.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
2 years 8 months ago #179407 by DenisChenu
In fact : not exactly :).

Because you can force it as number :).

BUT Something.NAOK == 1 must work if Something.NAOK === "1" and Something.NAOK === 1


See this old discussion here : bugs.limesurvey.org/view.php?id=8324 (at this time : i think we must compare it as string if === "1")
And old issue here : bugs.limesurvey.org/view.php?id=7805

And new issue here : bugs.limesurvey.org/view.php?id=14337

There are a major issue in Expression for all numeric value in 3.X

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.
More
2 years 8 months ago - 2 years 8 months ago #179412 by tpartner
Yes exactly!

"rand — Generate a random integer" - php.net/manual/en/function.rand.php

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 2 years 8 months ago by tpartner.
The topic has been locked.
More
2 years 8 months ago #179415 by DenisChenu
yes, but i think it must not depend on the way it was saved too :)

@FeCanever : can you test with manual.limesurvey.org/Question_type_-_Eq...y_.28numbers_only.29 to ON ?

And can you report the issue with a simple survey (2 group only)

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.
More
2 years 8 months ago #179449 by FeCanever
Hi,
I tested with manual.limesurvey.org/Question_type_-_Eq...y_.28numbers_only.29 to ON and it now works if I use ((random == 1)) and ((random == 2)), without the quotes. Awsome!

Sorry about my silly question, but what do you mean when you ask If I can report it? Do you mean here to you guys and to support?
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
2 years 8 months ago #179455 by DenisChenu
Support forum : the place to ask free help by LimeSurvey user.
Bug report : www.limesurvey.org/community/bug-tracker the place to report bug.

It's not because i'm on Forum and on Mantis than you don't have to report issue

A bug not reported on mantis is a bug not fixed

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.
More
2 years 8 months ago #179464 by FeCanever
Ok, great. I'll do that!
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
2 years 8 months ago - 2 years 8 months ago #179477 by FeCanever
Denis,

When I was getting ready to report the bug in the support forum, I turned off the "numbers_only" option, and somehow it now works even if I let ((random ==1)) without the quotes. Should I go ahead and report it anyway?
Last edit: 2 years 8 months ago by FeCanever.
The topic has been locked.
More
2 years 8 months ago #179483 by DenisChenu
In my opinion : since we have issue (fixed) with previous release, it's a bug in this new release.

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.

Start now!

Just create your account and start using Limesurvey today.

Register now