- Posts: 5
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to save assessment final score of multiple choice question ?
- GreenerDaddy
- Topic Author
- Offline
- New Member
Less
More
4 years 4 months ago #190882
by GreenerDaddy
How to save assessment final score of multiple choice question ? was created by GreenerDaddy
Hello,
My initial goal is to save assessment score in the database within the result of the participants. I succeed in displaying assessment information in the end message as described in the manual
My current issue is to save the assessment score to be able to work on it for report or statistics.
Reading the forum, I use then the question type "equation" and expression in the equation value to save the result of assessment. It works for single question but not for multiple choice question where I trying to get the final assessment score.
Example : 2 questions G2Q1 (multiple choice) and G2Q2 (simple choice)
G2Q1 with assessment value of 3 for each subquestion marked
SQ1 marked
SQ2
SQ3 marked
I expect that {sum(G2Q1.value,G2Q2.value)} return 6 but it returns the text {sum(G2Q1.value,G2Q2.value)}
I expect that {sum(G2Q1_SQ001.value,G2Q1_SQ002.value,G2Q1_SQ003.value,G2Q2.value)} return 6 but it returns the value of G2Q2.value
Any idea ?
Thanks for your help
My initial goal is to save assessment score in the database within the result of the participants. I succeed in displaying assessment information in the end message as described in the manual
My current issue is to save the assessment score to be able to work on it for report or statistics.
Reading the forum, I use then the question type "equation" and expression in the equation value to save the result of assessment. It works for single question but not for multiple choice question where I trying to get the final assessment score.
Example : 2 questions G2Q1 (multiple choice) and G2Q2 (simple choice)
G2Q1 with assessment value of 3 for each subquestion marked
SQ1 marked
SQ2
SQ3 marked
I expect that {sum(G2Q1.value,G2Q2.value)} return 6 but it returns the text {sum(G2Q1.value,G2Q2.value)}
I expect that {sum(G2Q1_SQ001.value,G2Q1_SQ002.value,G2Q1_SQ003.value,G2Q2.value)} return 6 but it returns the value of G2Q2.value
Any idea ?
Thanks for your help
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
4 years 4 months ago #190884
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 How to save assessment final score of multiple choice question ?
Difficult to help you based on the information provided.
Can you upload a LSS file with only the relevant questions (copy the survey, delete everything unnecessary and export it as LSS and upload it here).
Can you upload a LSS file with only the relevant questions (copy the survey, delete everything unnecessary and export it as LSS and upload it 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.
- cdorin
- Offline
- Elite Member
Less
More
- Posts: 234
- Thank you received: 40
4 years 4 months ago #190885
by cdorin
Manual: manual.limesurvey.org/LimeSurvey_Manual
Bugs tracker: bugs.limesurvey.org/my_view_page.php
If you self-host and need help, contact one of our partners: limesurvey.com
Please do not contact me via PM - thank you.
Replied by cdorin on topic How to save assessment final score of multiple choice question ?
Hello,
Could you please attach an .lss example to work directly on it?
Could you please attach an .lss example to work directly on it?
Manual: manual.limesurvey.org/LimeSurvey_Manual
Bugs tracker: bugs.limesurvey.org/my_view_page.php
If you self-host and need help, contact one of our partners: limesurvey.com
Please do not contact me via PM - thank you.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
4 years 4 months ago #190886
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 How to save assessment final score of multiple choice question ?
One thing that I can tell already, this won't work:
{sum(G2Q1.value,G2Q2.value)} return 6 but it returns the text {sum(G2Q1.value,G2Q2.value)}
For a multipe choice question, there is no such thing as G2Q1.value, there would only be G2Q1_SQ001.value, G2Q1_SQ002.value, etc.
Multiple choice questions are basically as many subquestions as answer items and the status is "Y" if clicked and empty if not clicked.
{sum(G2Q1.value,G2Q2.value)} return 6 but it returns the text {sum(G2Q1.value,G2Q2.value)}
For a multipe choice question, there is no such thing as G2Q1.value, there would only be G2Q1_SQ001.value, G2Q1_SQ002.value, etc.
Multiple choice questions are basically as many subquestions as answer items and the status is "Y" if clicked and empty if not clicked.
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.
- GreenerDaddy
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
4 years 4 months ago #190892
by GreenerDaddy
Replied by GreenerDaddy on topic How to save assessment final score of multiple choice question ?
Here is the lss file of my syrvey example
I would like the G2Q3 Evaluation questions to save the result of assessment of this group of questions
I would like the G2Q3 Evaluation questions to save the result of assessment of this group of questions
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
4 years 4 months ago #190893
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 How to save assessment final score of multiple choice question ?
First problem encountered: For the first group, your evaluation was put into the logic part, you need to put it into the question text of the equation question.
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: 11758
- Thank you received: 2753
4 years 4 months ago #190895
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 How to save assessment final score of multiple choice question ?
Second group: Multichoice questions do not have a assessment value that could be specified. It alwasy returns Y or nothing. Should be 3 though I think. Might be a bug.
So in this case you will have to do a little workaround like this: You will need to check for each subquestion if it is "Y", if so apply 3 points, if not apply 0 points and sum them all up.
Another hint: Only hide your equation questions once you know the equations are working. Because when you display them, they can give you valuable information if what you are doing is having an effect or not.
I will see if I can write the example for one of the questions in the second group as an example for you.
So in this case you will have to do a little workaround like this: You will need to check for each subquestion if it is "Y", if so apply 3 points, if not apply 0 points and sum them all up.
Another hint: Only hide your equation questions once you know the equations are working. Because when you display them, they can give you valuable information if what you are doing is having an effect or not.
I will see if I can write the example for one of the questions in the second group as an example for you.
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: 11758
- Thank you received: 2753
4 years 4 months ago - 4 years 4 months ago #190898
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 How to save assessment final score of multiple choice question ?
OK, for the second question group you will have to write something like this into the equation question:
Unfortunately somehow G2Q1_SQ001.value doesn't give us the assessment value (3 if ticked), but rather it gives 'Y'. I will file a bug report, because this is weird.
Please find my solution attached as LSS.
I have left the equations to be shown, so you can test and see what is happening and how they are changing values while you are ticking answers.
{ASSESSMENT_CURRENT_TOTAL} only works when a button has been pressed, so to have this working you need to put it one page after the last question that needs to be assessed, which I did by creating a third group. I also used an equation there, summing up the two previous equations, just to check if the calculations are right (and they are).
Funny enough, the ASSESSMENT_CURRENT_TOTAL seems to take the correct assessment value of '3' for the multiple choice question, while .value gives 'Y'. So I think this is definitely a bug.
Code:
{sum(if(G2Q1_SQ001 == 'Y', 3, 0), if(G2Q1_SQ002 == 'Y', 3, 0), if(G2Q1_SQ003 == 'Y', 3, 0), G2Q2.value)}
Please find my solution attached as LSS.
I have left the equations to be shown, so you can test and see what is happening and how they are changing values while you are ticking answers.
{ASSESSMENT_CURRENT_TOTAL} only works when a button has been pressed, so to have this working you need to put it one page after the last question that needs to be assessed, which I did by creating a third group. I also used an equation there, summing up the two previous equations, just to check if the calculations are right (and they are).
Funny enough, the ASSESSMENT_CURRENT_TOTAL seems to take the correct assessment value of '3' for the multiple choice question, while .value gives 'Y'. So I think this is definitely a bug.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Attachments:
Last edit: 4 years 4 months ago by holch.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
4 years 4 months ago #190899
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 How to save assessment final score of multiple choice question ?
Bug report can be found here:
bugs.limesurvey.org/view.php?id=15549
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: DenisChenu, tpartner
The topic has been locked.
- GreenerDaddy
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
4 years 4 months ago #190912
by GreenerDaddy
Replied by GreenerDaddy on topic How to save assessment final score of multiple choice question ?
Hi,
THanks. Unfortunately I'm not able to import your file. Seems not to be a valid format
THanks. Unfortunately I'm not able to import your file. Seems not to be a valid format
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
4 years 4 months ago - 4 years 4 months ago #190914
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 How to save assessment final score of multiple choice question ?
I accidentally exported a lsq file, instead of a lss file. When I have my notebook, I'll upload the correct file.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 4 years 4 months ago by holch.
The following user(s) said Thank You: GreenerDaddy
The topic has been locked.
- GreenerDaddy
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
4 years 4 months ago #191005
by GreenerDaddy
Replied by GreenerDaddy on topic How to save assessment final score of multiple choice question ?
Thanks
I'm looking forward to testing your file
I'm looking forward to testing your file
The topic has been locked.