Welcome to the LimeSurvey Community Forum

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

How to calculate score and show in reports

More
7 years 8 months ago #162195 by shru123
A survey called pre-test which has 70 questions

Each question has four options i.e radio buttons

e.g

1.High availability which is expected in technogoly

a. 9.9999%
b. 99.999%
c. 999.99%
d. .99999%

Suppose there are 3 users who have submitted the survey successfully
User1 select b option
User2 select a option
User3 select a option

And Correct Answer for this Question is "a" option
User selecting the correct answer will score 1 and rest users will score 0

So as per above example

User1 score 0
User2 score 1
User3 score 1


This i need to show in reports when we export the data.


How to do this....
The topic has been locked.
More
7 years 8 months ago #162196 by tpartner
Use Expression Manager to load an equation type question with the "score".

Code:
{if(Q1 == 'a', 1, 0)}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 8 months ago #162197 by shru123
where that "a" option can i store in limesurvey

Means

The correct answer where can i save in limesurvey
The topic has been locked.
More
7 years 8 months ago #162198 by shru123
Everytime a new survey is circulated to users will have different questions and different answers.
The topic has been locked.
More
7 years 8 months ago #162200 by tpartner
Then, you will need to use an additional equation question to store the correct answer value and reference that in the solution I provided above.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 8 months ago #162313 by shru123
Additional Equation means ...

Can you provide some link or example.
The topic has been locked.
More
7 years 8 months ago #162339 by tpartner

Additional Equation means ...

Simply that. Insert another equation question containing the correct answer code.

Sample survey attached:

File Attachment:

File Name: limesurvey...1-09.lss
File Size:15.4 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose