Check out the LimeSurvey source code on GitHub!

Large "spreadsheet" survey with many numeric arrays and many expressions

More
4 years 2 months ago #90196 by Fred01
For now I'm trying single numerics and/or equations for all questions.

1) For each of the calculations we need a relevance expression to make sure all the inputs are there. So a numeric lets you have a unique relevance for each calculation vs. a multi-numeric where you have one for all the subquestions

2) There is some metadata about the calculations that we are storing in question attributes and so, again, using numerics lets us set the attributes for each one separately, rather than a multinumeric where the subquestions share most of the same attributes.

3) We want to save all the calculations to the DB and I prefer having the formula themselves saved in the question record for posterity (rather than in javascript).

4) We are going to be moving everything around with javascript anyway, so the presentation structure of multinumerics and arrays isn't necessary and can even be a hindrance.

5) There WILL be a lot of questions to create, but there is a lot of repetition in the structure and I'm trying to us Excel as a kind of "question factory" to build the codes, relevance expressions, and equations, etc.

Please Log in to join the conversation.

More
4 years 2 months ago #90199 by Mazi

Fred wrote: 5) There WILL be a lot of questions to create, but there is a lot of repetition in the structure and I'm trying to us Excel as a kind of "question factory" to build the codes, relevance expressions, and equations, etc.

For an easy way to add lots of questions into Limesurvey, have a look at the Excel import: docs.limesurvey.org/Excel+Survey+Structu...tions+for+LimeSurvey

If you are relying on certain question IDs when using JavaScript to customize the question alignment, doing several imports of the Excel survey might cause problems though.
In this case, try using Em placholderhers within the JS code, assuming that the code is put at the question source text or the like (template.js does not get parsed by EM.

This way, you can let EM add the QID dynamically:
var question = {questioncode.qid};


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

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