Welcome to the LimeSurvey Community Forum

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

When is equation question calculated

  • aukevann
  • aukevann's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago #193101 by aukevann
When is equation question calculated was created by aukevann
Hi,

I have a number of questions in our survey that have a rather large calculation (to calculate a checksum) and at the same time we have performance issues. The survey is setup to show question by question. Can anybody tell me when a equation question is calculated? Is that done right after clicking on 'next' or when the survey is submitted?

Kind regards,
Auke
The topic has been locked.
More
4 years 2 months ago #193111 by jelo
Replied by jelo on topic When is equation question calculated
LS is doing validation via PHP(serverside) and Javascript (clientside Browser). You might explain the performanceissues a bit more. Perhaps with an example as LSS export to help reproducing issues.

Depending on what calculations are done (equation questions?), they are done directly via Javascript and via PHP on the next button click. They are not done in the beginning or the end of the survey (except if you place expressionmanager code there).

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • aukevann
  • aukevann's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago #193112 by aukevann
Replied by aukevann on topic When is equation question calculated
Thanks Jelo for your response, that is very helpful.

The performance issue is that when the survey is submitted, at times it can take 10 or more seconds for the server to respond. Users than click again on the submit button and then they get an error, thinking their survey is not submitted properly while it is. I wanted to know if the hidden checksum questions I put in could cause it, but because the delay is not always there it was hard to find out by trial.

I have put calculations in an 'equation' question, so I don't think the expression manager is being used.

Cheers,
Auke
The topic has been locked.
More
4 years 2 months ago #193115 by jelo
Replied by jelo on topic When is equation question calculated
ExpressionManager is used in a equation question. The submit performance issue can be caused by many small things. To me this looks more like a server or network issue.
Or the page with the submit button has a critical question (in terms of database items) on it.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • aukevann
  • aukevann's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago #193116 by aukevann
Replied by aukevann on topic When is equation question calculated
Ok, so when in the equation question I make a calculation using the answers of other questions, it is calculated at the time the whole survey is submitted?

I do think there is a server issue, but I like to make sure the various equation questions don't add to the issue.

cheers,
Auke
The topic has been locked.
More
4 years 2 months ago #193118 by jelo
Replied by jelo on topic When is equation question calculated

aukevann wrote: Ok, so when in the equation question I make a calculation using the answers of other questions, it is calculated at the time the whole survey is submitted?

The serverside calculation is done when you leave the page with the equation question. There is no mega burden on the submitpage. A typical delay on the last page is happening when you activate notifications via email for submitted surveys. If the emailserver is not accepting the email quick enough, the survey submission is having a longer delay.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • aukevann
  • aukevann's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago #193119 by aukevann
Replied by aukevann on topic When is equation question calculated
Ah thanks, we do send out three confirmation mails so that may be the issue. Very helpful to know.

cheers,
auke
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 months ago #193154 by DenisChenu
Replied by DenisChenu on topic When is equation question calculated
In page by page mode : Equation is done when it must done during surey (even if hidden)

If you put the equation at last : yes, it was done when submit, but then : button is move next and not move submit :).

Then : if your last button are move submit : it's not the equation question.

Anbd it's easy toi check : test without any expression in equation :)

Sending 3 emails can be the issue : if you use smtp 3 connection to do one by one …

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.
  • aukevann
  • aukevann's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago #193156 by aukevann
Replied by aukevann on topic When is equation question calculated
Thanks Denis, very helpful
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose