Welcome to the LimeSurvey Community Forum

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

Having 4 different scorings at the end?!

  • Reveb
  • Reveb's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 1 month ago #147914 by Reveb
I have been trying to find out more about limesurvey.
For school i have to make a survey with 4 different scores.

I made a survey including the questions already with answers.
They are build up like this:

Question code : B1 - O2 - P3. ( the letters representing the score group).
With the answers being B1A1 - B1A2 etc. (the answers given the right Assesment with them)

They are all in the same group since i can't change the question order otherwise, since the question groups have to be in a specific order. B1 O2 P3 P4 B5 etc.

I made them an array question since that fits the idea perfect.
My question is how can i make it so at the end screen it shows the score.

Let's say the score algoritme is : B1(assesment) + B4(assesment) + B4(assesment) - 10 / 45 * 8 = SCORE

And then after that another one for the P group.
I don't know if this is possible and i couldn't find an answer anywhere.
I'm not that experienced so any help would be great!

Reveb
The topic has been locked.
  • Reveb
  • Reveb's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 1 month ago #147917 by Reveb
Replied by Reveb on topic Having 4 different scorings at the end?!
I forgot to add that i got this but it's not working.
I've put this as the end message.

Chest scoring:
{sum(P3_SQ001.value+P5_SQ001.value+P6_SQ001.value+P8_SQ001.value+P10_SQ001.value+P12_SQ001.value+P14_SQ001.value-8/40,5*100)}
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 month ago #147921 by holch
Replied by holch on topic Having 4 different scorings at the end?!
Well, I see quite a few mistakes in your expression.
First of all you said that the suquestion codes are B1A1, B1A2, etc. not B1_SQ001, so you should use this.

E.g. B1A1.value.

Then you use SUM and "+", this wont work. You need to create sume like this:
Code:
{sum(B1A1.value,B1A2.value,B1A3.value,...)}

Now you still have an correction factor at the end, but from what I can see you do not need to write it like this, because you can already calculate this correction factor = 10/45*8 = 1,777 and you can substract that. I would first create a hidden equation with the sum and then discount this correction factor.

If you don't write your calculations into an equation question, you will have nothing in your database later. Then you can read this score into the end message.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: Reveb
The topic has been locked.
  • Reveb
  • Reveb's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 1 month ago #147923 by Reveb
Replied by Reveb on topic Having 4 different scorings at the end?!
Hey holch,

Thanks for taking the time to reply,

To make sure subquestion codes aren't B1A1 etc.
The Question Code = B1
Anwer codes are B1A1 for answer 1, and B1A2 for answer 2.
The subquestion code is just SQ001.

Then i have 15 questions.
B1, O2, P3, B4 etc. they are build up the same but the the B1 changes into the one it is that time.

So this is what i got as the assignment:

1: question 3,5,6,8,10,12,14. ((assesment score-8)/40,5)x100
2: question 1,4,11,13. ((assesment score-4,5)/23,5)x100
3: questio 2,7,9 ((assesment score-4,5)/16x100
Total: all questions ((assesment score-18,5)/85x100

So to do this i should make 4 equation questions (Hidden).
Fill them in with : {sum(B1A1.value,B1A2.value,B1A3.value,...)} ( So answers instead of question code?)

Then how do i call the answers into the end message if i may ask?

Thanks already for the quick reply and help!

Reveb
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 month ago #147925 by holch
Replied by holch on topic Having 4 different scorings at the end?!
No, the question /subquestion code should be correct. Your explanation confused me a bit.

Then how do i call the answers into the end message if i may ask?


Just like you would call the answers to the other questions. Let's say your calculation for B1 will be stored in scoreB1, then you just call it via {scoreB1} into the end message.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: Reveb
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 month ago #147926 by holch
Replied by holch on topic Having 4 different scorings at the end?!
Try with a small example first and see how it works.

E.g. take the first two answers of your first question and calculate a score and see if the result is correct. This makes it easier to find errors.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: Reveb
The topic has been locked.
  • Reveb
  • Reveb's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 1 month ago #147928 by Reveb
Replied by Reveb on topic Having 4 different scorings at the end?!
Hey,

Thanks for the quick reply's again :)
But i'm kind off confused now.

So there are 15 questions all with 7 answers.
They have different assesments so when they pick 1 of the 7 answers they get that assesment score. Then after they filled in the survey, the answers have to be calculated so let's say:

B1A4 + B4A2+B8A5-8/40,5x100 (if that were the answers they picked.

So now i should make an equation question. For each 4 score groups. (or every question?)
And fill in the code:
{sum(P3_SQ001.value,P5_SQ001.value,P6_SQ001.value,P8_SQ001.value,P10_SQ001.value,P12_SQ001.value,P14_SQ001.value-8/40,5*100)}

Or how would you use the algoritme ((score-8)/40,5)x100 in Limesurvey.
The topic has been locked.
  • Reveb
  • Reveb's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 1 month ago #147930 by Reveb
Replied by Reveb on topic Having 4 different scorings at the end?!
As for now i tried making a hidden equation question named CHEST.
In the question box i placed: sum(P3_SQ001.value, P5_SQ001.value, P6_SQ001.value, P8_SQ001.value, P10_SQ001.value, P12_SQ001.value, P14_SQ001.value - 6)

Then in the end message i tried getting the score in, as following {scoreCHEST}.
The {scoreCHEST} was a undefined variable.

And i don't know how to check if it even calculates the code from above. The -6 was just a test number. I wonder if it's possible for u to help me. (Sorry for wasting ur free time :blush:)

Reveb
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 month ago - 7 years 1 month ago #147954 by holch
Replied by holch on topic Having 4 different scorings at the end?!
As I said before, you can't put "-6" like this into an equation.

What you also need to do is put it into {}. You should go in baby steps (that is how you should work in programming anyway. If you write loads of code and it does not work you have to debug loads of code. If you go step by step and check if it works, then you know at which step the error was.
Code:
{sum(P3_SQ001.value, P5_SQ001.value, P6_SQ001.value, P8_SQ001.value, P10_SQ001.value, P12_SQ001.value, P14_SQ001.value)}

Does it give you the correct value of the sums of the first subquestion of those questions? Try it and test it if it works. If it works, continue with the next step. If it doesn't work we need to debug this first step.

Then go for the next step and see if including "-6" into the sum works. I actually don't know if this can be done in one step. I would try 2 options:
Code:
{sum(P3_SQ001.value, P5_SQ001.value, P6_SQ001.value, P8_SQ001.value, P10_SQ001.value, P12_SQ001.value, P14_SQ001.value, -6)}
and
Code:
{sum(P3_SQ001.value, P5_SQ001.value, P6_SQ001.value, P8_SQ001.value, P10_SQ001.value, P12_SQ001.value, P14_SQ001.value)-6}
and see what happens.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 7 years 1 month ago by holch.
The following user(s) said Thank You: Reveb
The topic has been locked.
  • Reveb
  • Reveb's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 1 month ago #147966 by Reveb
Replied by Reveb on topic Having 4 different scorings at the end?!
Hey holch,

I got the calculation of the assesments to work!
Thanks for the help, and patience for me, I am not that experienced so thanks for teaching me.

Last question.. Is it possible to show the sum of the assesments let's say 10, as 'You scored 37 out of a 100' in the end screen.
So it makes the 10 into 37?

Cause i got a list that shows it like this:

0 = 0
1 = 10,6
2 = 17,5
3 = 21,9
10 = 37

Etc.

Is there a possibility for that?
You would help me out alot :)

Reveb
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 month ago - 7 years 1 month ago #147982 by holch
Replied by holch on topic Having 4 different scorings at the end?!
What a weird calculation you have there. First you sum up points, then you correct them and then this value is again transfered in another value? Couldn't this be done easier by giving the correct scores since the beginning? Anyhow...

You could work with "IF" and do something like this (not tested, not sure if it works exactly like I wrote, but should be something along this line). Assuming your equation question where the score is calculated is called "score":
Code:
{if(score==0, "Your score is 0 out of 100",)}
{if(score==1, "Your score is 10,6 out of 100",)}
{if(score==2, "Your score is 17,5 out of 100",)}
{if(score==3, "Your score is 21,9 out of 100",)}
{if(score==10, "Your score is 37 out of 100",)}
I am sure that there is a more elegant solution, so maybe Tpartner or Denis will be able to improve on this. As I said, it is not tested, there might be minor mistakes in the syntax that make it not work immediately, so you might have to play around a bit. Again, go step by step, test the equation first with something simple, maybe create a simple question with outcomes 0,1,2,3,10 and see if this equation works. Then you can connect it with the score. This way you always have at least a pointer to where the problem must be located.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 7 years 1 month ago by holch.
The following user(s) said Thank You: Reveb
The topic has been locked.
  • Reveb
  • Reveb's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 1 month ago #147985 by Reveb
Replied by Reveb on topic Having 4 different scorings at the end?!
Thanks for helping,

Yes, its not the same group as the other ones i got an extra group where the score doesn't need the / + and * but just the assessment points and then with the scorelist i pointed out. ( 0=0 1=10,6 etc.)

The IF code is supposed to go in the equation question aswell right?

Also if i want the score's to show at the end it has to be done in a assessment rule right? And how do i call in the score. I tried using {scorePsych} Psych being the name of the equation question. But this is not working for me.

Thanks for the help i'll try it this way and look if it works.

Reveb
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose