- Posts: 10
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
multiple choice with negative assessment values
- jucajuca
- Topic Author
- Offline
- New Member
Less
More
5 years 9 months ago - 5 years 9 months ago #170693
by jucajuca
multiple choice with negative assessment values was created by jucajuca
Hi,
I'm trying to create an online quiz. One of the questions is a multiple choice question.
What I want to achieve is the following: For each right option the user gets +1 point. For each wrong option the user gets -1.
For example: Which words have more than four letters
- Alligator (+1)
- Spider (+1)
- Duck (-1)
- Dog (-1)
If the user picks two wrong choices the overall assessment should be decreased, even if it results in a negative number.
However I have the following problems:
- Multiple choice questions do have an assessment value that can not be set to 0.
-- > This causes every ticked choice to add more to the assessment.
--> Can I disable this behavior? - This would solve the problem.
********************
- I tried creating an equation question like so:
{sum( sum(G1Q00004_SQ001.value == 'Y', G1Q00004_SQ002.value == 'Y') - sum(G1Q00004_SQ003.value == 'Y', G1Q00004_SQ006.value == 'Y'))}
It seems that if the result is negative Lime Survey ignores it. So the assessment goes back to "Unkown".
So the equation does not fully work. because of the problem mentioned above. And it is not a clean method (I would have to take two minus points for each wrong option).
Thanks for your help!
LS: Version 3.12.1+180616
I'm trying to create an online quiz. One of the questions is a multiple choice question.
What I want to achieve is the following: For each right option the user gets +1 point. For each wrong option the user gets -1.
For example: Which words have more than four letters
- Alligator (+1)
- Spider (+1)
- Duck (-1)
- Dog (-1)
If the user picks two wrong choices the overall assessment should be decreased, even if it results in a negative number.
However I have the following problems:
- Multiple choice questions do have an assessment value that can not be set to 0.
-- > This causes every ticked choice to add more to the assessment.
--> Can I disable this behavior? - This would solve the problem.
********************
- I tried creating an equation question like so:
{sum( sum(G1Q00004_SQ001.value == 'Y', G1Q00004_SQ002.value == 'Y') - sum(G1Q00004_SQ003.value == 'Y', G1Q00004_SQ006.value == 'Y'))}
It seems that if the result is negative Lime Survey ignores it. So the assessment goes back to "Unkown".
So the equation does not fully work. because of the problem mentioned above. And it is not a clean method (I would have to take two minus points for each wrong option).
Thanks for your help!
LS: Version 3.12.1+180616
Last edit: 5 years 9 months ago by jucajuca.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
5 years 9 months ago #170741
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic multiple choice with negative assessment values
I would ignore assessments and use pure Expression Manager to calculate the "score".
Something like this in the equation question:
Sample survey attached:
Something like this in the equation question:
Code:
{sum(G1Q00004_SQ001 == 'Y', G1Q00004_SQ002 == 'Y') - sum(G1Q00004_SQ003 == 'Y', G1Q00004_SQ004 == 'Y')}
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
- jucajuca
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
5 years 9 months ago #170743
by jucajuca
Replied by jucajuca on topic multiple choice with negative assessment values
OK thanks,
I manually set in the DB the assessment value of the question to 0.
How can I add the result of the expression manager to the overall assessment of the Survey? - At the end we will display rankings based on the score of the participant.
I manually set in the DB the assessment value of the question to 0.
How can I add the result of the expression manager to the overall assessment of the Survey? - At the end we will display rankings based on the score of the participant.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
5 years 9 months ago #170747
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic multiple choice with negative assessment values
Again, I say ignore assessments and do everything with pure Expression Manager. You can use Expression Manager to tailor the text/HTML for your rankings display.
- manual.limesurvey.org/Expression_Manager#Tailoring.2FPiping
I have no idea why you would manually adjust the database.
- manual.limesurvey.org/Expression_Manager#Tailoring.2FPiping
I have no idea why you would manually adjust the database.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- jucajuca
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
5 years 9 months ago #170784
by jucajuca
Replied by jucajuca on topic multiple choice with negative assessment values
THANK YOU!
I think the documentation is a bit misleading. It should be clearly stated that the assessment tool can not be used in combination with Expression Manager.
And it took a long time to figure out "where" the data is stored. If someone is wondering the results of a expression are stored in the code/value of the question. So basically you can use questions a variables.
I think the documentation is a bit misleading. It should be clearly stated that the assessment tool can not be used in combination with Expression Manager.
And it took a long time to figure out "where" the data is stored. If someone is wondering the results of a expression are stored in the code/value of the question. So basically you can use questions a variables.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
5 years 9 months ago #170794
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic multiple choice with negative assessment values
That's not exactly true - the Expression Manager qCode.value variable will return the assessment value. I just find it easier to stick with pure EM.I think the documentation is a bit misleading. It should be clearly stated that the assessment tool can not be used in combination with Expression Manager.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.